Development Diary Archives - April 2003
|27th April 2003 - Build 423|
First things first..
Stein has been busy stuffing around with some graphics and has drawn the following frames,
Now 'Don't Panic', he was feeling a bit frustrated at the time and the graphics are only a bit of fun (looks like Jumpman Jr..) but it does show what quality Jumpman will eventually (and hopefully) look like. (hey if it was upto me, he would have a cat logo on his shirt and stripped red shoes to match my new Subaru Impreza). Though Mr Glover did say he liked the graphics..
I also started working on the other game graphics (which Stein has now taken and will work his magic on them). The thing I want Jumpman to have is nice fluid graphics but still with a little retro style (ie. the chunky girder slopes). It does bring up the problems of making sure everything flows when things can change at any point (due to game flow). For example, the ladder graphics really need to have a top graphic element, a repeating graphic element (for the middle of the ladder), aswell as a bottom graphic.. As Ladders can be made out of many individual objects (so they can vanish, be added too etc..) then I had to think of a way to join multiple objects (which can change at any point) to create a nice looking graphic element.
Take the following ladder segment, if we repeat the base image 3 times then it will look like the image on the right (which still doesn't look that bad)
but it just doesn't flow, if we have 3 separate images then,
The ladder looks a look smoother (ofcouse these are my hack images and not the final images that will make it into the game) (well the default graphic set). The same has to be applied to all the graphic images. Girders being the worst as they slope which make a lot more sub-graphic elements.
I had a few days off this week (thankfully) and got shit loads done on the editor.. You can now create and navigate Levels within a game file. (Ie. the Forward/Backwards buttons work). Levels can be deleted aswell I added a Recent file list to the load menu and checks for dirty levels before exiting. (ie the game needs to be saved). Put on some tooltips (exciting stuff I know) on the Toolbar buttons. Levels can also be individually saved and imported. Doesn't sound like much but it was all a lot of work.
I've also added the Image / Sound / Music managers which allow you to insert graphics/sounds etc.. into the game file which the rendering engine will use. Ofcouse you can have many images so each level can have its own graphic set if you want (would make it large though ). I've also put in support for the Library system I developed which allow elements to be either imported (or linked) to resource libraries. This would allow all the graphics/sounds etc.. to be put into an external file and linked to within the game, thus making it a lot smaller. The library editor is a separate program which I may put into the main editor at some point in the future. Images (either Bitmaps, or Jpgs) are further compressed to reduce their size.
The sound and music managers look basically the same (but don't have the picture preview bit, only a play/stop section). I made some dumb mistakes in the sound manager.. Free'ing memory twice. I should know better after so many years of programming ;*(
The Image manager will probably change a bit as I add proper sprite support to the editor, but for now it works..
I also added the Fmod support code I had to the editor (which will also be used by the rendering engine). Its a great little sound library which is easy to use.. I've added a link to it (aswell as NeHe's openGL pages) above under my email address. I've limited it to only handle WAV files for the sound effects and MP3/OGG for the music (Ogg is much better I think) but I think that's enough.
Also started working on the Game Information / Settings dialog which allows you to give the name of the game, who made it, the number of lives and the order the levels are played etc.. The order can be changed via the Move Level Up / Down buttons (Disabled as there isn't a level selected in the list box). Again another boring picture of a dialog..
Man.. What a week.. Time for some rest I think. I'm starting to get to the point where I need to start on the openGL stuff.. I'm a total newbie to it (plenty of DX experience though) so getting the bog standard draw object on screen will be first.. But I love a challenge (and I've had plenty of them in my life).
|20th April 2003 - Build 417|
Happy Easter Everybody..
Been a slightly quiet week.. Had a few other things go on and some odd working hours.. Well the Loading of a game is now in.. It's makes a huge difference being able to save your data.. I did end up running around my tail for a while with the load.. would load correctly but as soon as you changed the property of a object the editor would crash.. turned out to be an un-initalised string trashing memory (well sort off, it killed of the 'this' reference for the class so the code would run but had lost it's data..). Was a real fun problem to track down.. My fault though.. I'm usually very careful with handling strings for that very reason.. Still got to put in the code to load/save individual levels but basically thats just a wrapper around the exiting level code (which already works when saving to a game file)
Got in a new Monkey Bar object which Randy has suggested.
It doesn't look like much in the editor. But should add a bit of spice to the game play as jumpman would have to traverse the bar to get to the other side and hoping he doesn't get shot in the process. Monkey Bars can be horizontal as well as slope down (not up )
Also worked on a little on the game graphics until Stein works out the character design. I just took the original sprites made them a lot bigger, added a simple inner bevel.. (Macromedia Fireworks is really good for fast dynamic effects like that). The blank area is for the monkey bar swing animation which still needs to be done.. Although very blocky, the sprites will do for getting something up and running.. Ofcourse would like to get something that looks a lot smoother and more fluid when he moves.
Also worked on the other graphics (ropes, girders, ladder etc.). The above graphics have to change as openGL wants textures on even multiples of 2. (But It can use sub-textures within a bigger texture).
Speaking of openGL.. Starting learning how it all works and have found NeHe Productions (web link) a great site for the openGL beginner (and advanced) programmer. He has a lot of Tutorials clearly written on all aspects of openGL and has a lot of example demos (with source) that people have done.. Will be using Orthographic projection which is basically drawing polygons via screen cordinates and not 3d-space (which then has to be projected). Should be able to get some nice alpha effects so girders can fade in and out.
Some of the other things I did this week where mainly refining some of the bits already in. For example, you now can't dynamically create a jumpman player character on a level.. One is automatically created for you when you create a new level. You can't delete him either so there must always be one on the level. I've also been trying to fix a problem with the toolbar icons not being displayed (until you run your mouse over them) but not having much luck with that.. Gotta love windows programming.
Oh.. I also got in Undo which remembers the last 10 changes made to the level.
Late Update: Copy and Paste is now in . Makes creating levels a LOT easier.
Don't forget not to eat too much chocolate (none for me.. nobody loves me anymore.. but life is like that..)
|13th April 2003 - Build 412|
Well It's been another very productive week on the Editor. Managed to get in all the code to Create/Edit Ladders, Ropes (Blue) and Chains (Green). Actually once I had in the first one, the other 2 came within a few hours hours as they are basically the same object (as far as the editor goes) and the only difference is the editor rending code.
And with a little work the first level of the original Jumpman..
I have to Thank Randy Glover who has been very helpful in answering my questions in a very timely manor and for playing with the editor and giving me feedback.. He has also suggested adding in some new basic object types to enhance the game even furthor.. Many thanks Randy..
Created a new object called a 'Trigger'. Triggers (like Bombs) will run a little scriptlet when they are passed over to allow for things to be controlled (varied) in the level. Triggers can be placed on Girders, Ropes, Chains, Ladders etc..
Also created the Bullet object, which is the first dynamic object of Jumpman. Placement position on the map doesn't matter (ie. it doesn't come from that spot).. It's just used to note that there is a bullet object (or several) for this level.
The Bullet allows you to specify the Minimum and Maximum times between reappearing on the screen. Also you can set the direction it comes from (or a random direction) aswell as what triggers the firing of the bullet (again several selections). If you want say upto 3 bullets then you would place 3 bullet objects onto the level and set the attributes for each one.. Giving each one a different attribute would certainly make for some uncertain behavior.
I've also started working on the Saving and Loading of the Jumpman Game. Remember that a Jumpman Game is just a collection of Jumpman Levels. I want to be able to both save both the game and each individual level.
I'm using IStorage/IStream persistence methods which in short is like creating a file system within a single file, which can contain directory's and file data. Each object in Jumpman-UC knows how to persist itself. Each object writes its properties to a stream using IFF (ah.. Long live the Amiga).
Here is a example layout of a game (with a single level) using a freeware IStorage viewer that I got off the net.. You can see the various elements within the file.
Each file is also protected by a MAC (bit like a CRC) to detect for any corruption of data. The other thing with IStorage containers is that they can be created in ram so copy/paste becomes a lot easier. At the moment only the Save actually works (well I think it works ) and about half the load is in (at the object level, not at the game level).
Hopefully the coming week will be just as productive.
|6th April 2003 - Build 405|
Been a rather hard week at work and I've had a new distraction playing FreeLancer which is a modern day version of another 64 classic 'Elite'. Its an extremely exceptional game. Despite all this I did get some done on Jumpman .
Well I can create girders now which makes it instantly look a lot better. Bellow is a sloped girder (both unselected and selected) with a bomb and Jumpman on it..
The Girder probably has the most complex rendering code in it (for the editor anyway) as not only is it made out of lots of little segments but the entire object's outline has to be calculated for the editor selection code (it's based on selecting polygons), so not only does the inside polygon rendering has to be done but also the outside which is only the edges (and not all of them) of the inside polygon. Anyway it was a fun routine to write to trace the girder on the map (depending on shape, length and slope) but turned out simpler than it sounds. I basically worked out that if I keep the top two edges of the girder polygon in an array all I would have to do is append the same data (feeding backwards) to that array (adjusting Y for the girder segment height) and I would have my bounding selection shape.
The Girder can be shaped a little more finely than the original 64 jumpman so more steeper girders can be made (and interacted with). This pic contains 4 separate girders with the left most one being a vertical girder. Vertical Girders ignore the slope value and just use the Length. Again if the object is not-active (can't be walked on) or not visible it is drawn in a darker colour to signify this.
The Girder properties checks the slope as apposed the length of the girder. if you make it to steep it will automatically adjust the slope to the maximum allowed for that length. If you want the Girder to slope upwards then you just need to give it a negative value. (ie. -4 in this example)
You will also be able to override the footstep sound for when jumpman runs over it, so if you use different graphic types in the game (a mixed set of girder graphics for example) then a different sound will be played.. if this value is not set it will play the footstep sound as defined in the player properties.
I also got some more editor dynamics in.. Objects are drawn in the order they are created so you can end up with objects behind each other. I added in support for a Draw in Front/Back mouse menu which will change the order of the rendering.
The Girder object is now drawn behind the Player object. There is also the ability to 'Lock' an object which will stop it from being moved (and dragged) if it is selected in the editor. It doesn't locks the objects properties.
Note, that changing the Rendering order will have absolutely no effect in the actual game. It's only an Editor function.
Will try and get the Ladder, Rope and Chain (not sure what else to call it) in this week, and then the persistance stuff (saving / loading) which I also need to copy/paste objects in the editor.