Wednesday, 30 March 2011

Flash Game Development: part 4, +Other updates

Here's the changes I made to the Flash game today- I added a player sprite, which took the whole day. No transparency yet. Also sped the top speed up a little.

The feedback I got back on it from various classmates and family was that the charge didn't really have enough of an increase in speed to be worthwhile, and that it was hard to tell which surfaces were walls, or even whether it was from a top down perspective or a side-scrolling one. I think having the character in, possibly others plus shadows should fix that problem. I might have to edit some tiles to make it clear where the floor ends and the wall starts (the fact that the walls are full top-down view and the character is 3/4 view doesn't help, I may have to make some new tiles for "joins" as well.)

I solved the problem of charge being too slow by speeding it up. I imagine if you hit a wall at that speed it would incur a penalty, so you have another incentive not to use it, and so you have a loss of control as well.


Other updates

I suppose this week I got "back in the game" in regards to our group project, which I had been slacking on over the past few weeks in favour of other projects. I regret it, so I'm trying to make up for it by getting the final boss battle back in, which was my job, but got cut because I was becoming a liability. So far I've fixed one bug that was the biggest nusciance (Our game is a spelling game, and the bug was the fact that the random letter generator seemed to have times when it would never give you the letter you needed next, even after a long wait, making it mostly a waiting game)- I got the boss battle code in from my prototype, but it suffered an unexpected bug which meant it wouldn't even enter the battle in the first place. I gave up on that one since I'd been in the lab all day, and the main problem had been solved. I suppose this is something I need to keep up.


Character concepts for the main character. I wanted to avoid her looking too much like she was built out of an identikit. I was low on time so had to finalise quickly before I'd wasted the whole day doodling. I went with a woman with normal casual clothes, and a random pixel logo on her shirt. I tried to go with a sort of "everyman trapped in space" look, and the jumpsuit I thought of first seemed a bit too official looking.





Regardless of whether she's the final main character, in case I get another idea, I have a character in there now, and a bunch of working sprites. This is much better than nothing, and she'll have a place in the final game regardless of what that place is.

Thursday, 24 March 2011

Flash Game Development: part 3

Okay, so here it is so far.


Please pretend there are collisions on the walls. The walls are the darker grey blocks- the floor is one colour in most rooms. (Light grey or light brown)

Or, you know, just go through the walls. But then how will I know if the pacing's correct? I don't mind if you do to just explore the place, though.

Feedback would be appreciated, but just do whatever you want with it now, except steal it.

http://dl.dropbox.com/u/24204166/LBOS.swf

Evidently there's no sprite for the main character yet. The location is supposed to be a space station, possibly full of plants that may or may not kill you depending on if I have time.

Space bar to charge. Green bar is your charge, yellow bar is the charge for the charge. How obvious is this...?

Monday, 21 March 2011

Fiddling around with Game Maker

I decided it could be interesting to try out some free game making engines, since I was in something of a slump on my personal game, and I'd made heavy progress on my Flash game, possibly due to the excitement of creating a game combined with the excitement of trying a new language. I'd heard a lot of good things about free-to-use-but-costs-money-to-own-a-complete-version game making tool Game Maker (Which is an apt name) and that day our fates crossed, and I downloaded it, sat and read the Terms and Conditions for about two hours, and went to bed. In the morning I went to class. After class I finally had the opportunity to try it out.



On the first opening I was given a free optional tutorial on the side which told you how to construct a game and use most of the features. I'm an overentitled pro, so to me tutorials are for squares and n00bs, I was done with that shit six years ago and I wasn't looking back.

I took one look at the blank screen and realised I had no clue what I was doing. I followed the tutorial for a while until I reached the point I decided to just read the rest and not actually do it. I'd also made a mistake somewhere along the way which made me realise it would take a while to complete the example game, and I didn't feel like making a game that had been made before. I wanted to get right on to making something, regardless of whether it worked or looked terrible. So I'd absorbed, but not fully understood, most of the tutorial, and decided that instead of a game where you click on things with the mouse, I'd make a character move in four directions, possibly put collisions in there if it's easy. (And to me it's always been hard. By hard I mean I've never done it. I'm dreading its arrival on my Flash Project)

I don't think this is what was meant to happen.


So I started off with a character. I had to add both a press and a release event for all four arrow keys on the character, which I suppose could well be minor for objects in completed games, I don't know.

What surprised me was that you give objects "move" commands, which move them, rather than controlling their x and y locations manually like with most other programming languages. I tried using the collision events and before long I'd got collisions for every direction in, with just one event. Oddly, to make it work, I set the character to not move while collided with a wall. This overrode all the move functions on the keys, which I thought was a very weird system.








But the character collided with the walls from above in a way that made her head seem like it was colliding with them. Think moving a lot of little paper cut outs around. How could I make her look like she was walking up to the wall before stopping?

I made the bottom parts of walls (which I'd made look different not knowing I'd do this) a different object, with no collisions on it. After that, the character moved up against walls as if her feet were her centre of rotation, rather than her whole body.



I was quite impressed by how much I'd achieved on my first (technically second) go, and continued to play around with it. I added a door, which led to another room (making the rooms was pretty simple, as it comes with a level editor- you don't even need to use tiles, and you can set your tile size. Beyond that I'm not sure how it works exactly, it seems to allow you to change the grid after objects are down, so presumably you can have several different grid systems at once.)

The room allowed me to put in a flash transition by simply picking one out of a box, which was great. But what I realised afterwards was that my door and its event only led to the start of room 2. How was I going to make a door that lead back the way I came? I didn't want to make a new object for each door, but I couldn't figure out how to put a variable on the door to determine which subtype it was. All the doors would lead to the start of room 2. At this point I called it a day and thought I could return to it if I ever got bored. Which probably won't happen. Still, overall I was proud of what I'd achieved, and the new language I'd tried to learn, regardless of whether I'd stop here. I was also impressed at how what I made in a few minutes looked better than almost all of my previous 2D attempts.

Here's a playable version.

Tuesday, 15 March 2011

Flash Game Development: part 2

So, last blog post I decided I should make something simple and small, seeing as I'm new to the language, and I've made similar mistakes in the past. I said making something like Knytt which was more about discovery, exploration, and nice looking scenery (so I'd probably have to draw a lot of assets) rather than something heavy on gameplay, AND art. Only when I have to focus on multiple disciplines at once I get confused.

Pictured: Awesome game ideas


So I began by brainstorming ideas on a piece of paper that was lying around. I thought exploration was a dead cert, because, A: I've made games of this genre before to fair success, and B: Due to being essentially painting a landscape, the "stopping point" was essentially variable. If the deadline loomed, I'd just cut the environment where it was, since there's no set size the game world actually has to be. This is not certain, though, since all sorts of things might get in the way that I haven't planned, even on the art side of things, not just gameplay.

I didn't rule out anything else, as despite exploration games being easy to make, there's a chance it will be TOO easy and turn into an art project rather than a game. I was thinking of Yume Nikki, a stylish yet terrifying little indie RPG about a young girl who goes inside a bizarre, and often scary dreamscape whenever she goes to sleep. it defies game design convention by mostly being walking through sinister environments for a long time, looking for stuff, getting lost, and generally losing hope. That's my experience of it, at least. And I was playing it in a lab full of laughing, happy game students throwing paper aeroplanes around and talking about art n' shit, and I still felt alone, scared and a bit hopeless. Could be because I had the earphones in, too.

Yume Nikki's first room- Madotsuki's bedroom. From here you can only play a short, next-to-impossible minigame, go onto the balcony, read your dream journal (save) or enter the dream world.


Anyway, despite being totally snazzy, the gameplay is relatively simple. Explore and find stuff. It does indeed get more complex, as the stuff you find gives you a new "effect" (or ability) which allows you a different form of interaction with the world. For instance, the knife lets you stab things like other people or doors, the bike allows you to equip it, to ride it and travel faster (almost nessecary if you don't want to spend ages looking for the effects) And completely weird ones, like "poop hair", that... Turns your hair into poop. Literally. You then drop flies around to use as markers of where you went. I like the way each effect could've been fairly uninteresting (the poop hair is essentially a marker flag) but is made to fit the game's disturbing style by being something a lot more creepy or gross.

Actually, it's a lot more complex than just moving around, but what I mean is it's essentially built around the same basic control scheme, you can always move in the same places and between the same rooms (NOTE: as far as I know. It's a deeply complex and unpreditable game by the looks of things) and there's essentially a coherent system running throughout it, with the exception of some bits on the side.

I am convinced this game is more complicated than it looks, though, so I'll need to make something even simpler. Yume Nikki was made with RPG maker, which makes a 4-directional "field" sort of gameplay akin to Pokemon or Zelda automatically, and you can mess around with this engine in any way you like. A top down game like this is perfect for exploration heavy gameplay.


I've also been thinking about speed a lot. For instance, I think speed is quite important to a game- for instance, you hijack cars in Grand Theft Auto to travel faster (OK there are a couple of other benefits but that's the big one), you get the bicycle in Yume Nikki to travel faster, despite it not making a tangible change to the game, all it does is benefit users who don't want to walk around, and thereby risk doing mostly nothing for a long time.

In Knytt, speed is important too despite having no tangible effect. Frequently you'd get stuck behind a large cliff or fall and have to walk back up again, you feel that you need speed as you play, and the better you are with the controls, the faster you maneuver the landscape. I think various speedruns of games exploit different tricks like these to try and go faster, too. In short, going fast is fun. Exploring is fun. These are just two things I have always known, yet never fused into a single game before. It's lucky, then, that I started thinking of these ideas now, when I need to make a game.

So as I was thinking about speed, I also wondered about the best speed modifiers to use. I listed them all down.

Vehicle Jakking
  • Vehicle jacking. (Seen in: Grand Theft Auto (all games), Jak II: renegade, Most games in the 00's)
Skill involved: finding. Find vehicle, it's yours. Sacrafices ground control (usually easier) for vehicle control, which is almost always icier to make up for the speed increase, and make it so neither option is better (you essentially have to chose between low speed and control vs. high speed and loss of control.)


  • Charge (Seen in: Ratchet and Clank, Barkley: Shut up and Jam Gaiden, Vanquish)
Skill involved: You hold a button to go faster, but your amount of charge is limited and will eventually run out. If you are not charging, it restores over time. This method makes the player time the times they use the boost. Vanquish did it perfectly, and was probably the game that got me thinking about speed, now I come to think of it. You hold L2 (Or Xbox-analogue L2) to charge insanely fast on your rocket boots, and this allows you to duck to safety easier. If improperly timed, you risk needing it when surrounded by enemies, and therefore not being able to escape fast enough, and dying. Basically, it makes regenerating health an actually meaningful mechanic for once, since the game revolves a lot around timing.
  • Turbos (Seen in: Mario kart, Beyond Good and Evil, Brutal Legend)
Skill involved: Hit a button, go faster for a brief period. (sacrafice control for speed once again.) It's worth noting that in all the examples I listed turbos work differently. In Mario Kart you get them out of boxes (boxes give you random powerups), and use them only once until you get another one. Whether or not this happens is random. In Beyond good and Evil, you purchase turbos from vending machines, stock them up, and use them whenever you want. I found this the most interesting, and unique. I'd often be able to stock up a load of turbos and ace any of the races you could enter. If I'd forgot to buy any, then damn. Brutal Legend, the last example, allows Eddie Riggs' kicking ride the Deuce to unleash a turbo at any time (with a slight cooldown between) at no cost except the control/speed sacrafice. This is similar to Beyond Good and Evil's seemingly limitless capacity for turbos, and makes sense given that being an RTS, it revolves around timing.
  • Turbo pads (Seen in: Mario Kart, Beyond Good and Evil, Rayman Rush)
Skill involved: The same as above, except instead of unleashing the turbo freely on a button press, it has to be unleashed when you find and drive over a turbo pad. The change is almost always automatic, with the exception of games like Rayman Rush, which allowed you to charge up further turbos for a brief period after the first one.
  • Rolling (Seen in: the Legend of Zelda (3D incarnations), Kingdom Hearts, Vanquish)
Almost entirely identical to the turbo in terms of gameplay, except it is almost always limitless in supply, and sacrafices all control in all directions for a very short speed boost. Usually used for dodging or attacking, but counts as a speed boost nonetheless. Also makes no sense, since rolling almost always slows you down.
  • Acceleration (Seen in: Sonic the Hedgehog)
The longer you run, the faster your overall speed becomes. Often control is lost too, such as in the case of Sonic where, despite the controls still being as tight at high speeds, it's harder to see what's coming, and to avoid it. Sonic makes use of turbo pads, and a slightly different form of charge, where you rev it while standing still for a while before travelling faster. (time/speed tradeoff)
  • Wind riding (Seen in: the Legend of Zelda (the Wind Waker))
By travelling in the same direction as a wind current, you gain additional speed. In the Wind Waker, this was actually necessary before you could travel in any direction at all, but it was the game that reminded me of this method. A lot of platformers made use of fans to create small wind currents that allowed for this.

Two I thought of just now are Rocket Jumping (seen in: Team Fortress 2 and similar games) and Teleportation (Portal's probably the most prominent example most of us have played). There's actually too many of these to list here, so I'm going to have to carry on before I bore everyone to death. Right, so I figured I should make a game that incorporated as many of these ideas as possible.

So that was fairly easy, but there was nothing holding the idea together. And would it work in gameplay once there was something holding it together? For instance, if it was a game about, say, a really fast woodlouse, rolling and charging might make sense, but wind and turbos would probably be out of place as to seem fiddly and un-woodlouse-like. There are things you expect a woodlouse to do, and stepping out of that zone makes it harder to get used to. Still works, yes, but I'm sure we've all played games that tried too much at once and ended up suffering for it.

So what sort of world would incorporate all these ideas of speed together? Well, it'd presumably have to be a game heavily focussed on speed. If it was the main focus, all these modifiers in play at once would both make sense and be easier to manage.
They say that I stole this, can I get a witness?

What sort of things do people associate with speed? All I could think of was Sonic, so I drew a guy who had blue hair, big goggles, and just to hit the association home, a blue shirt with "NOT SONIC" written on it.

What sort of world would involve speed? One where people race? One with a lot of roads, or people trying to, say, get to work quickly? This idea hit home, as I'm actually pretty terrible at being on time, so I went with "a world where people are too slow".

Everything started to fit together. Who better to shake up thier lives of monotony and never quite being fast enough to do everything they want to do in a day, than Sonic, or rather, not sonic, a famous speedster. Why was he here? Obviously, he's the god of speed. Scientists summoned him down from paradise to help them solve their world's problem.

Okay, so I had an idea, which I liked. I named it "Legendary badasses of speed". It seemed to have a slightly humourous edge to not only the story, but to the title too. I decided even if it wasn't my final idea, I should implement something like it now, anyway. So I made a blue circle move, and implemented a charge mechanic. This took one lesson.

After the lesson was over, I had a think about my idea. This wasn't possible. The world called for:
  • Large scale.
  • Lots of individual challenges to keep the player busy, and pushing forward the plot, within the world.
  • Shops and items.

I listed these things out in my head as I drank some non-polluted water at last out of one of the university's many water coolers. It didn't take long to realise I was about to make the same mistake again- This game was increasing in size too much in my head already, and I knew, given the deliberatley miserable look of the game, combined with working challenges into this world in the same time the rest of us would be building something simple like I should be doing, I was set for an incomplete game, and a boring time making it, and if I'm not having fun making it in this short amount of time, I know it's unlikely to come across as fun to players. I dramatically threw my cup to the ground. (I didn't). I was back at square one. Well, square two, since the speed mechanic was fine. I thought about the exploration idea and realised I was already too far away from it now that a concrete plot was in action. Regardless of LBOS' actual quality, it would have to be either dropped or made at a later date.

So... Why not... I wondered, just build a world, with speed machanics, a random character, and no coherent style in the environments? I decided to just do this. It pays to experiment. If I don't like a speed modifier, I can take it out. If I have time to implement, say, enemies, I can do it at my own pace, but it's not necessary to the game. I boiled it back down to the core things I wanted to capture. Exploring things fast.

So instead of Pokemon-style-door-linked scrolling rooms, I did a room grid (imagine a tile grid, but with rooms, all the same size, in each tile. Legend of Zelda 1 (very first, NES one), for example. Knytt also does this, as does Hero Core). The room grid meant there were now things I no longer needed to worry about, like a scrolling camera, doors, and mapping out oddly-shaped rooms. There was a standard I was going to stick to all the way through, and it also felt like I was in a much less enclosed world, a lot like how Knytt made me feel (I'm not ripping off Knytt)

DEV SESSION 2

So I thought... Let's start this off in a desert. That'll be cool. Deserts are big, open expanses to tear up, as we have seen in many a free-roaming game, not to mention great places to hide buried temples. Everyone loves buried temples (Disclaimer: Not everyone) So I implemented a tile grid for the backgrounds. This was pretty hard, but I found a tutorial for it, which I used as inspiration (I actually didn't copy it, since it will usually not work to just copy someone else's code into yours, my Dad taught me that) And then made the grid fit my screen. I drew some green blocks in paint for the desert, and some silver blocks for a sort of podium I planned the game to start on. The podium seemed to intice people to move away from the centre in what direction they wanted. (It mostly pointed up, but pointed left and right as well) To change the image on the tile, it referenced different frames of a single tile object (this is what the tutorial told me to do)

Okay, I thought, let's look at this desert podium and see if it looks inviting... Oh.



Okay so not what I thought. But... Actually... That almost looks better. It looks like we're indoors. The ground texture looks like walls, and the podium texture looks like floor.

Suddenly I saw myself in an epic space station. With grass in it (think Silent running). Immediatley I knew I'd be setting the game in this space station rather than the desert. I suddenly thought of various ideas for it. Living plants? Robots? Not too hard to do. Especially if static. Could still be interesting to look around, sort of like exploring a greenhouse full of interesting plants. If I had time, they could do something too, but it wasn't a necessity. This was a basic idea, but not one I set into motion right away, or even have set into motion as of this writing.

So I spent the rest of the day modelling rooms that lead off from here. It was actually some of the most fun I've had in game dev for a long time. Just editing levels and instantly seeing them rendered in engine. They weren't playable (no collisions yet) but still, I was having too much of a good time to care.

To change the tile layout, there was a single function that filled an array with the layout you set up, and fed that array through a loop that generated the tileset. At the start of the funtion, it was to delete all the tiles of the previous room, but I didn't get around to this, so I built the rooms by just making sure I spawned in that room instead, since whenever I went into another room the previous tileset would still be there, on top of the new one resulting in you not seeing it. I didn't need to fix this yet, so I just built them the hard way.

After modelling a lot of rooms, I called it quits. Despite seeming like they were pretty close to working, I knew I was getting ahead of myself. If there's something obvious I've missed out, I'll need to go back through all these rooms I've made and fix it for each of them. Nightmare! I decided this lot will do for now, and once the way ahead is clear, I can think about making some more. Also I felt myself running dry of fresh ideas, as I'd literally gone into the woods, and didn't know what I'd put in there. Was it going to be a huge dungeon-esque level? Just a small woods? Don't know.







I suppose this is where things start to get hard. Once the game's beginning it's easy to make a lot of progress in a few hours, but it's likely to get much harder from here on.