Monday, August 22, 2011

Alpha v0.0.3

Hey guys, a little update on how the game is going.

I've been experimenting with cameras and the like, and I've got to be honest, the maths is mind-boggling. Anyone that's dealt with coding and knows about x co-ords and y co-ords I feel you.

I've run through a few tutorials from various locations with no avail, the issue that I'm facing is that I am trying to get the interface overlying the background which contains the box2d world.

This sounds fairly simple, but is overtly complex... I'm now trying a few different types of cameras to get things working properly. On another note I have been putting a lot of research into advertising and revenue within the game, the plan is to release two versions of the game once it goes live, one for a one off payment from the market and one free from the market which contains ads in order to keep revenue.

In the mean time, let me give you a bit of an update on how things are going and where I'm at with everything. I have got the collision detection down pat, I now have an efficient way in which to instantly check between two objects and issue a boolean to be one or the other. That sounds complex, but basically means at any point in the code I can essentially write:

isCollision(objectA, objectB) -> do somefunction().

This means that I can do a variety of checks for collisions with the various parts of the level, the major updates that I have in mind will include some interesting things with gravity and magnets (HOW DO THEY WORK?!)

In the mean time, I don't have anything to deploy to the market yet, but I'm hoping that once I put the camera into code I'll have something that I feel is solid enough to put up as a download for all ya'l peeps!!!

David out.

Thursday, August 18, 2011

Alpha v0.0.2

Ok - so since my last post there has been only a few changes to the build - I'll be honest with you, what shows up on the screen isn't very different. But the back end has been modified pretty heavily to allow for an expanding range of levels etc.

The major thing that is included within this build is the ability to play it on a Android phone. I've made a Accelerometer listener which will change the force applied to the player (ball) and tapping the screen repeatedly will now make the player 'float', which I will soon be modifying into a jump function.

Another addition is camera panning and scrolling with the players movement, I'm still tweaking, and it's a bit of a mind bending thing to try and work out. I think that the best way for me to go about this is for each level to have an x and y bound that will restrict the camera when the player reaches the edge of the level. Otherwise the player will try and stay in the centre of the screen.

Finally, I've also signed up to be a developer with Google, it's $25 and for ever. The only thing that I haven't done in order to get my game up onto the market is to get some icon graphics and some screen shots.

I'm not uploading any variations to the market just yet, as I want to keep some cards close to my chest as it were, in the mean time, here are some screen shots to show you what's happened to the game so far. As I keep on re-iterating; there are a lot of back end changes that are happening at the moment to ensure that when the times comes to develop levels and to make the game into a fully fledged program.

Next update will come when I've had some more time to work on the structure of the levels and the end - of - game event listener.

Thanks all for your time.


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.

Saturday, August 6, 2011

A new blog, a new development idea.

Hey guys, so this is the new blog that I'll be using to develop my games on from now on. I have previously been posting under the title of Punch Card Studio, but have recently renamed with the intent of starting a new game.

I will be making a Flash based game with a box2d physics background.

But further from my last blog, I'm going to start off by producing some written tutorials on how to set up a programming environment and the typical Hello World program that many new programmers will want to complete when getting their hands on a new API.

I am currently downloading box2d. And will start on a tutorial on how to get it set up and integrated into Flash before too long.

David Out.