Friday, August 12, 2011

Where are we at?

Hey guys,

This is going to be a pretty long post because there is a lot of stuff that I want to go over and a lot of new things that I'm going to bring to the table. For those of you that have known about my gaming endeavours in the past, you may have remembered I was hoping to create some form of 2.5D side-scrolling platformer for something or rather.

Well - let me tell you something, that's not the easiest, especially when you're working with a language that you're not familiar with - at all. So - where did that leave me? A language that I didn't know and a game that was really awesome in my head and pretty much impossible to get down onto paper.

So, over the past months, whilst working at a real job, I've been devising a way in which I can both develop games in a form that I'm comfortable with as well as be able to produce it in such a way that it is deployable to a mass market. The more astute of you have probably realised where I'm going with this already hey?

Mobile Apps - the obvious solution to my issues. A massive market and a simple delivery system. Only one problem with it. iPhones want me to program in progressive C - i'd rather eat balsa-wood. And android is programmed in Java, a language that I've heard a lot about, and is OOP, but never actually touched. Well - after a little digging and a few advances in certain programming suites, I cam across this nifty fact - Adobes new Flash builder 4.5 has the functionality to package a Flash game up into a .apk (android application file) and what's more then that, deploy it to a device.

So - this was great! I'm going to able to program away to my hearts content in a language that I understand and am competent at and then be able to test it out on my handy nexus. The only thing that's left to do is come up with some good ideas.

I'll lay it out to you all, I have millions of good ideas for games some of which are way out of my ability to program, but also out of the technical capability of the devices I'm hoping to deploy too. I've managed to narrow my search down to just a few good ideas.
Again, those of you that have been around for a while will know that I made a fairly simplistic and overall hacked code piece of work called "Under Pressure" as part of a uni course a few years back - the engine that I used behind that game - Box2D has grown in leaps and bounds in the time that I've been away from games. Something that I'm glad about, it's that much easier to use now and coding time for it's various functions has been cut drastically from previous versions.

My time spent programming Under Pressure got me very well acquainted with most of the functionality that Box2D has to offer, and now that I have found that you can make Android apps that are built in Flash - why wouldn't I?!

For those playing at home, the three ideas that I have, which, in my head seem programmatically possible are:

1 - Side-scrolling puzzle platformer; Codename "Rain." This was the idea that I was working on in UDK all that time ago for the 2.5D game - I figured that it's still theoretically doable in a 2D physics engine.

2 - Rocket Shooter; I have seen this game somewhere before, but the delivery was somewhat lacking. Think of it this way: shooting a rocket from earth to another planet, or a goal location. Easy hey? What if I put a planet in the way? Then what? Well, as we all know from Apollo 13, you can do some pretty funky things with gravity and the like, so, this is the premise that I am basing this idea off, sort of inter-stellar golf (Futurama anyone??). With the added feature of planets that will try and suck your ball (ship) off course.

3 - Gravity mind-f*ckarama side/floor/roof scroller.

I like this one - I have to tell you, I like this one better then the others, which is why I'm digging into this idea first before I go anywhere else with it. So, think of this: point A -> B game, BUT! Activating certain powerups will flip gravity, upside-down, to the left, to the right etc. A puzzle format game so that you have to premeditate your next move, but essentially the idea is that you can't finish levels unless you do some gravity switching.

These ideas are currently in the works, and I'm sure will all go through refinement over time, for those of you that have any good ideas like the ones above, let me know! Or if you've seen these games made before.

Now - where am I at the moment? Well, I've got my programming pipeline sorted, so that's the first hurdle out of the way, I'm currently working with the new functions that working with a mobile device has given me, for example, accelerometer input, multitouch etc. I'm using the most recent version of Box2D, which is 2.1 at the time of writing this, it's in Alpha stages.

Figure 1: FlipTheSwitch Alpha 0.0.1

I say alpha like that's a joke, but it's actually kinda true - this is the game in it's most basic form. The above screen shot features a few elements. For those of you that have had any experience with Box2D, heck, for those that haven't too - I'm no artist, I admit that first and foremost - I am terrible at drawing anything, especially on computers. So I use Box2D's funky little debugDraw function which renders everything in nice basic colors for me so I can see what I'm about.

The above screenshot features three Box2D elements, for the sake of the argument, the circle is the player - very imaginative I know, but it gives the game a little variety, plus it rolls nicely when the accelerometer receives input. The green blocks in the corners are gravity "switchs" the Box2D collision detection picks up when the player hits one of these boxes, and will flip gravity in any of the four directions, for the sake of my sanity, and to not confuse myself, they're North, South, East and West in the back end.
The last element, is of course the walls - yay! Without them, the ball would just roll off the screen and onto the floor... And then out the door.

Well - what's in store for this game? What's next on the smorgasbord for this little nifty thing? Well, I'm currently working on input logic to detect when the user taps the screen, I know that there is inbuilt functionality, and will post up a working APK file once I have figured it out, but that is essentially what's next.

The biggest feature that I want to implement, and the one that poses the biggest logistical problem is this: when the player entity rolls over the say North gravity switch (this will send gravity's downforce north, or reverse it for those of you playing at home.) The entire screen should rotate so that the new gravity is represented as the downward direction. Yeah - that's what I said too :S, the biggest problem that I think I'll have with doing this is that when the borders of the world flick around, then they can and will impart some sort of force on the player - I don't want that. It is possible perhaps to make the player a static object for the duration of the rotation (heh, that rhymed) but finding out how long the rotation will take, being able to detect that... It's all a bit crazy.

I will keep you all updated as things progress on that front, but in the mean time, I'm going to finish up with the input features that I would like to get going with the phone and then I'm going to start work on developing some form of level building device so that I can chop and change as I see fit.

The biggest mistake that I made with Under Pressure was to use the Flash Professional suite in conjunction with Flash Develop - developing in two separate programs was both time consuming and led to problems I also built the individual levels of Under Pressure visually using Flash Professional, which meant that come time to change level in the game, the entire old level had to go through the rather expensive process of being pushed into an array and then destroyed whilst the new level was drawn all from one big function - not very good coding nature I know. And certainly not something that I want to include in a build for a mobile game. What I DO want to do however, is to have a levels "Class" which is called when the game wants a new level, this means that I'm not iterating over hundreds of lines of code to find the code to draw a level up.

Anyway, I'm prattling on about nothing now, so I'll sign off and give everyone an update and a working version of the APK file (it's not going to be stunning, I assure you, in the near future.

Thanks for reading all this if you got this far, you're a true hero :).

Dibs out.


Post a Comment