GP2X Jabber's Log-fire


Mr.Jabberwocky

Bloke with a brick on his head
Joined
Sep 27, 2005
Messages
402
Website
Visit site
The purpose of this thread is to document the development of a homebrew game by someone with no skill. This may help others, who are just taking the plunge into game making, to avoid my mistakes. The hope is that it will allow those with experience to share it and maybe inspire others to have a go.
I will post reports of how it is going. If you want to suggest anything please feel free. I may be going about it in the totally wrong way, so anyone is welcome to suggest better ways.

This is not going to be about code so much as about the overall process.

The plan is to recreate the Nintendo Game and Watch called Fire. On the surface, this may seem like a good idea. No concept to come up with and it is very simple. The bad news is I played it twenty years ago in Boots and have not owned, or used it since.
Did the fire chief have a part in the game or did he only sound the alarm clock ? What was the difference between game A and Game B ? Although research is generally frowned upon in any 'How not to' guide it appears I may have to do some.

So the first lesson in how not to write a game is to choose something you have little or no knowledge of.

On the plus side I should be able to steal the graphics. Anyone can knock together a few lines of code but graphics require skill. Also the sound is so basic it requires no skill either.

Here is an image of the real thing (well the box - but it does have a picture on it) :

firebox.jpg

I am off to the Wiki to install a Devkit with codeblocks.
 
Could someone please hand me a towel? I need to clean the sarcasm off my monitor ;)
 
I think you posted in the wrong thread. There is no sarcasm here. :D

Well, devkitGP2X is a pretty big download. Unfortunately codeblocks seems to be down at the moment.

Instead I looked for a screenshot of G+W Fire that I could steal the graphics from. This was a lot harder than I expected but I found one. It seems Fire was released in two forms. Originally it came as the one pictured above but then was produced as a wide screen model. Sadly they replaced the distinctive ambulance and building with crappy colour versions that do not really go with the characters. No doubt many will see it as an improvement (just 'cos it's colour :blink: ) but I prefer the original. Of course the only suitable image I can find is of the colour version.
The great thing about this picture is it is shown in reset mode where all the images are showing. My first task will be to extract the graphics into a usable form. I have stretched the image to 320x240 from 270x180. I hope to do away with the colour and reproduce the original building and ambulance.
320_240.jpg
 
Hmm... if you intend to deliberately create a bad game, then I'm mistaken. *smacks his sarcasm detector*
 
Hey, Jabber. If you get a working game done, how about having two graphics sets? One with colour and one b/w? Let the user choose which one to use. Shouldn`t be hard and would be a neat feature.
 
BradN posted on Sep 21 2006 at 02:34 AM said:
Hmm... if you intend to deliberately create a bad game, then I'm mistaken. *smacks his sarcasm detector*
I thought it might be a useful resource for anyone deciding to have a go at devving for the GP2X if I were to document my first attempt. I am hoping it will illustrate how involved, or otherwise, it is to create a simple app, and attract contributions from the more experienced to guide the newbie dev.

There are those here who speak in acronyms, like yourself, and those of us who don't. This is for those who don't. The last thing I expected was this sort of negative put down.

I am not setting out to create a bad game. I am trying to reproduce Nintendo's Fire. There is a strong possibility it will be bad and my way of making it flawed. But that, in a way, is the point. We learn from our mistakes and the mistakes of others.

I hope to encourage others with this and show that you don't have to be a total geek to enjoy the open source capability of the GP2X. I am presenting this as a 'how not to' guide to show I have no pretensions to being a 'proper' dev - just someone who wants to explore the GP2X a bit further than installing an emulator or two.

Please, could someone confirm that the link to codeblocks is down and it is just not me ? -> codeblocks
 
Last edited by a moderator:
Also down for me.

For the record i actually think this is a good idea, especially if you keep the diary updated as fully and as detailed as possible (i like it as a general idea, and other devs on sites have done it before - it often helps to see the process, successful and unsuccessful etc).
 
I'm not able to get to CodeBlocks either, from more than one connection.

This is a great idea and I'll help anyway I can, my noughts and crosses game was tough enough without any sprite colloision and things of that ilk, so I'm rather looking forward to seeing your accounts of programming.

Anyone trying to become a dev will produce things they look back on and shudder, other things will always be useful for reference. Pretty sure this will be a very useful reference piece (and posibly a funky game as well!) :)

If there's anything I can help with, give me a shout.
 
xnopasaranx posted on Sep 21 2006 at 12:11 AM said:
Hey, Jabber. If you get a working game done, how about having two graphics sets? One with colour and one b/w? Let the user choose which one to use. Shouldn`t be hard and would be a neat feature.
That is a great idea. Thank you for the suggestion. Further research has revealed that the original figures were just stick men and lacked the great expressions of the wide-screen version. I still don't like the colour graphics but prefer the new figures. So I will attempt to create a mix of the old ambulance/building with the widescreen figures as one option and have the colour background as another option.

I love the 'if you get a working game done' bit. However I am hoping that (with the help of the community, when needed) I will see this through to the bitter end.
TheMinder posted on Sep 21 2006 at 11:27 AM said:
Also down for me.

For the record i actually think this is a good idea, especially if you keep the diary updated as fully and as detailed as possible (i like it as a general idea, and other devs on sites have done it before - it often helps to see the process, successful and unsuccessful etc).

Thanks for confirming that.

I don't know how good I will be at providing detail, but if I skip over anything that interests you, you only have to ask. Thank you for your encouraging post.

@BenScar thank you for your comment and offer of support.
 
Last edited by a moderator:
Mr.Jabberwocky posted on Sep 21 2006 at 12:35 PM said:
xnopasaranx posted on Sep 21 2006 at 12:11 AM said:
Hey, Jabber. If you get a working game done, how about having two graphics sets? One with colour and one b/w? Let the user choose which one to use. Shouldn`t be hard and would be a neat feature.
That is a great idea. Thank you for the suggestion. Further research has revealed that the original figures were just stick men and lacked the great expressions of the wide-screen version. I still don't like the colour graphics but prefer the new figures. So I will attempt to create a mix of the old ambulance/building with the widescreen figures as one option and have the colour background as another option.

I love the 'if you get a working game done' bit. However I am hoping that (with the help of the community, when needed) I will see this through to the bitter end.
TheMinder posted on Sep 21 2006 at 11:27 AM said:
Also down for me.

For the record i actually think this is a good idea, especially if you keep the diary updated as fully and as detailed as possible (i like it as a general idea, and other devs on sites have done it before - it often helps to see the process, successful and unsuccessful etc).

Thanks for confirming that.

I don't know how good I will be at providing detail, but if I skip over anything that interests you, you only have to ask. Thank you for your encouraging post.

@BenScar thank you for your comment and offer of support.


Also please consider using Project Infinity to host your project. This sort of thing is what I created the site for.

I wish you luck with this.
 
Last edited by a moderator:
Mr.Jabberwocky posted on Sep 21 2006 at 06:02 AM said:
BradN posted on Sep 21 2006 at 02:34 AM said:
Hmm... if you intend to deliberately create a bad game, then I'm mistaken. *smacks his sarcasm detector*
...The last thing I expected was this sort of negative put down. ...

I was referring to the subject text that you, yourself wrote! "How not to write a game" I wasn't trying to be insulting, so sorry if it came off as such, but I thought you were being sarcastic (or perhaps some other form of humor) when you described your effort in this way.
 
Last edited by a moderator:
Code Blocks is now back up. I strongly recommend using the nightly builds as they are far more stable and feature packed then RC2.
 
yaustar posted on Sep 21 2006 at 06:06 PM said:
Code Blocks is now back up. I strongly recommend using the nightly builds as they are far more stable and feature packed then RC2.

i tried the last one availible just a few days ago but i found that it "seemed" to have a weird sense of slowness over the typing it could be just me but i don't have this feeling when using the none nightly build. Also the code completion doesn't seem to be correct all the time but hey i know it's a work in progress and will probably get better. Just wondered if it's my pc or that anyone else noticed this being slow feeling when typing in the editor and building programs
 
Last edited by a moderator:
Sorry for the misunderstanding BradN.

Thanks for the offer of help Fluffy.

Project infinity looks like a well thought out site, I will check it out in detail as soon as.

I have taken your advice yauster and installed the nightly build. While the site was down I tried Dev-c++ and wasted a lot of time. Setting up codeblocks was a breeze in comparison. I followed the wiki guide and Guyfawke's demo built first time perfectly. So thank you to all who contributed to the wiki and Guyfawkes for his nifty little test thingy.

If anyone is following this 'how not to' guide, avoid codeblocks like the plague. It was far too easy and trouble free to set up and looks far too professional. If you are unfortunate enough to have already installed it go to the editor settings and mess with the syntax high lighting until it looks really bad.

Basically faffing about setting up this lot has resulted in not much being achieved.

However I did find this simulator that claims to be very accurate. It would have been best to have found this first before deciding to embark on this project. If it didn't exist I could have ended up not knowing exactly what I was trying to make.

The only thing I have got done is a copy of the screenshot showing all the characters done in two colours. To make it look like I have acheived more than I have, I have put it on the GP2X and displayed it using the photo viewer.
ongp2x.jpg
 
Good luck with this!

I have been playing the Nintendo Game and watch games on my DS (they were given free to CLub Ninty in japan or something, google for them) and they are still great!!! So this could be great too!
 
BradN posted on Sep 21 2006 at 02:31 PM said:
Mr.Jabberwocky posted on Sep 21 2006 at 06:02 AM said:
BradN posted on Sep 21 2006 at 02:34 AM said:
Hmm... if you intend to deliberately create a bad game, then I'm mistaken. *smacks his sarcasm detector*
...The last thing I expected was this sort of negative put down. ...

I was referring to the subject text that you, yourself wrote! "How not to write a game" I wasn't trying to be insulting, so sorry if it came off as such, but I thought you were being sarcastic (or perhaps some other form of humor) when you described your effort in this way.

I have to admit, the title confussed me a little as well :blink:

It's a great idea though and look forward to reading more.
 
Last edited by a moderator:
I am really sorry about the BradN misunderstanding. I am a bad person.

I have come up against a fundamental problem. It seems to me that to be any good at this you need a mind that could be represented by this :

mondrian.jpg

Whereas the mind of the Jabber could best be represented by this :

Jmind.jpg

Before wasting any time thinking about a design for this program I thought I would try and see if I could actually put something on the screen. Having no idea how to do this I looked at Guyfawke's demo program and it seems that SDL is the way forward. So it seems all I have to do is get the graphics into the machine and then use SDL_BlitSurface to zap them in a meaningful way onto the screen.
So I took the two colour image and used bin2c to create a file I could include in my project. There seem to be a load of sites documenting SDL but it is much easier just to filch stuff out of Guyfawke's demo. There are a few calls to initialise SDL and we are ready to go.

The first problem I ran into is that there is no straightforward SDL function to access the data I generated with bin2c, that I could find. It seems the accepted way is to load the graphics at run time. I don't like that. Look at the picture of my mind. Does that look like it is going to be able to keep track of loads of little files ? Obviously not. Besides, it is so much easier for everyone if there is only one file to install.

I found a site with a list of SDL functions and picked a likely sounding candidate for the job - SDL_CreateRGBSurfaceFrom. SDL seems to like things called surfaces and this will take a bunch of pixels and turn it into a surface. All I had to do was point this thing at the pixel data in the bitmap - and there you have it - a nice black screen. It seems this function creates a pallette that is all black and you have to set it up yourself.

To do this properly I am going to have to extract the palette as well. But I want to see a picture on the GP NOW ! Luckily the site had an example that generated a grey-scale pallette so I knicked that. Yay! Result! My image is displayed.....But.....But.....it's piggin' UPSIDEDOWN ! What the .....? Well I am sure everyone and his dog knew this, except me. I have been saving and loading .bmps for ever, but I didn't know - the obvious way to store the data in a file is upsidedown. How stupid of me to expect anything else.

Easy solution. Flip the image in the art package and generate a new source file. Picture is now the right way up - sorted.

Somehow an edited photo and few lines of code borrowed from examples, running on my GP, gives me a sense of satisfaction as if I had actually done something.

Well I guess I can't avoid doing any real work any longer....design time .... I am just going outside and may be some time.
 
upside down? ive not ran into that before with sdl. maybe its a bmp thing, but its not something I have ran into. I know sdl differs from OGL because of its co-ordinate system which makes the image upside down topright v bottom left...

i like reading things like this (you can read my design escapades for my gp2x game on http://mega-tokyo.com/blog )
 
joyrider posted on Sep 21 2006 at 10:07 AM said:
i tried the last one availible just a few days ago but i found that it "seemed" to have a weird sense of slowness over the typing it could be just me but i don't have this feeling when using the none nightly build. Also the code completion doesn't seem to be correct all the time but hey i know it's a work in progress and will probably get better. Just wondered if it's my pc or that anyone else noticed this being slow feeling when typing in the editor and building programs
No, mine seems to be fine. You might want to check in the forums about that problem. Check the options for code completion about the parser. Code completion is still considered in progress.
 
Last edited by a moderator:
Back
Top