GP2X Pssst!


TheMinder said:
Oddly enough, I've been eagerly reading/downloading and printing off this thread ready to alter the source so it reads 'TheMinder wrote this' at the end !
That made me laugh. Go for it. :lol:
peelie said:
recently i have been superficially following thread and not yet had time to implement and test your recent code.

but i know it is here for me to look at when i have more time.

thanks!
It is basically your fault that this thread was not allowed die - so you better had. ;)
 
Last edited by a moderator:
Vilmos said:
Put your name all around it in sickening colours that flash and blink and confuse the player.
That's not a bad idea, but for now I am going with the Spectrum loading border :
bonus.gif

(It loses something as a still image.)
 
Last edited by a moderator:
Thank you for putting all this effort up to keep us informed on your progress Mr.Jabberwocky. :)

I think the graphics look really good, well that was until I saw the spectrum boarder. :p

I had a go at compiling the latest code that you released, on my laptop with vista and it works fine. I just had to include stem.cpp in the codeblocks project and change the compiler settings to the one on my setup.

I wondered why Robbie was not moving but then I should of read that you mapped the keys to the numeric keypad. You certainly can't get lost in the source code with all those comments! It was easy to change.
 
Uprising said:
I had a go at compiling the latest code that you released, on my laptop with vista and it works fine. I just had to include stem.cpp in the codeblocks project and change the compiler settings to the one on my setup.
I made the zip before closing the project - so code::blocks had not saved the extra file in its project settings. :blink:

You are the only downloader. :(

I had given up going to the bother of making it available. It has come on a bit - the asparagus now grows leaves. When I get the bl**dy thing to bloom I may put up another zip. Essentially the game play will then be complete. After that sound and a menu.
286b01a41c6a9e404cec45b965b3cec06g.jpg

Uprising said:
I think the graphics look really good, well that was until I saw the spectrum boarder. :p
The border looks great when it is running, just like the real thing - it loses a lot as a static image.
 
Last edited by a moderator:
I actually think that the thread could serve as one of the best SDL/C tutes there are around, especially when it comes to making a homebrew game.

I know it would lose something if it was taken out of the context of the thread but it's informative for a wider audience i reckon and could possibly be stolen and posted far and wide in a slighlty altered fashion.

Of course it might be a complete pain in the arse to do and keep doing until the very end, especially if it seems no-one is doing it step-by-step, but there's value in this type of thing - i can feel it in my water !!!
 
I hope people will find this useful. I am not much of a programmer or a teacher which I hope is a good thing in that others will realise if a klutz like me can do it, so can they.

I do not have a database of C and SDL commands in my head. Many times I have to look things up, but there is no shortage of reference material on the web. All you need is a general idea of the basic programming concepts such as operators, loops, variables and data storage - such as arrays and structs. When you know how you want to implement something using these things, you can use any language just by having a reference for the language at hand.

I think it is very important to have an idea of how a computer works. You want to know the basic processor, address bus, data bus setup and always remember that there it is nothing except sets of switches. Concepts like numbers and graphics are only tools to allow your mind to cope with millions of on-off states.

I like C because you are never too far from this fact. It is easy to stop yourself getting carried away with the language and think what you are really trying to get the hardware to do. Once you start using classes you are forcing yourself to use a concept that you should pretty much be using anyway. It is another 'language' consideration that takes your focus off the hardware that lies underneath.

The game functionality is about 99% complete. The first four levels naturally present an increase in difficulty - except possibly that the spider/bee combination is arguably more difficult than the next spider/bee/worm combo. After that each level will increase the rate at which bugs appear - but that is missing at present. When a bug first appears I think it may be necessary to have it wait a fraction before scuttling into the playing area. This is because if the player is near it may be slightly less frustrating if they have some chance to of avoiding it. However this will mean more work than I currently have the stamina for. There is also at least one odd programming bug that I have had no joy in sorting.

There is no sound, no menus and no display text but here is the current .gpe to download.
 
Last edited by a moderator:
As long as you have the motivation you will be able to finish it. :)

I think this thread is useful for someone who is looking to create their first game especially if its SDL. It shows how much work must be done as well.

I tried out the latest download and I think it has progressed really well. Once you have done it will be a very decent addition to the gp2x homebrew. :) Great job!
 
Thanks for your words of encouragement. I did not realise I had given the impression that I was giving up. Although if I was not doing this for my own entertainment the general apathy on these boards would be enough to dampen the most ardent passion.

All this talk of the scene dying is like a self-fulfilling prophesy. The GP32 died overnight - but at least it kept going until the 2X arrived. We seem to have a situation where just the suggestion of a new device has done the job. I guess people can't enjoy what they have if there is a promise of something better to come. We can only hope the f200 revives some interest. Especially once everyone is writing homebrew after reading this. :lol:
 
Don Miguel said:
Er... u're wrong, i think 8)
Am I wrong that the scene is dying, or am I wrong hoping the F200 will rejuvenate it ? Or am I wrong thinking that I have not given up ? You are probably right - story of my life.

I think I have squashed the bug by rewriting the collision detection( for the 20th odd time). There has not been much to say lately, since it has just been a matter of adding new objects, sticking them in the object list and slapping in appropriate handling functions.

The player has five lives to start and the game ends when these are used up. A score is being accumulated, but there is no way to tell these things since no text output is implemented. Luckily I have manged to salvage a text function from the G&W Fire code:

CODE
void drawGraphicTextStr(SDL_Surface *screen, char string[], Sint16 x, Sint16 y, int iColour) {
int iLen = strlen(string);
SDL_Rect fontLocation = { 0, 0, 16, 16};
SDL_Rect textLocation = { x, y, 16, 16};
SDL_Rect putLocation;
int pos=0;
int val;

// select the colour requested
switch(iColour) {
case TXT_RED:
fontLocation.y = 0;
break;
case TXT_YELLOW:
fontLocation.y = 16;
break;
case TXT_BLUE:
fontLocation.y = 32;
break;
case TXT_GREEN:
fontLocation.y = 48;
break;
}
for(pos = 0; pos < iLen; pos++){
val = string[pos] - 32;
fontLocation.x = val * 16;
putLocation = textLocation;
SDL_BlitSurface(fontgfx, &fontLocation, screen, &putLocation);
textLocation.x += 16;
}
}


It takes a surface to display on, a string, the co-ordinates and a colour as its parameters.

This requires a bitmap image of the font pointed to by fontgfx. The image has four copies of the font, arranged in ascii order, each made a different colour, placed one above the other. I have added a colour selection option that simply changes the Y offset by the height of the characters to point to the requested colour.

I had a bit of trouble with this that is worth a mention. It seems that SDL alters the the contents of the destination rectangle if the blit is not fully on screen. I had no idea it did this and was getting odd results as I assumed it was constant and was relying on it for positioning the characters. To circumvent this I have added a copy of the destination rectangle that SDL can destroy without losing my information.

Now that this is functioning, the score and lives can be displayed. Also messages and a menu can be added. Maybe even a high score table.
 
Last edited by a moderator:
I'm sure people are still following this. The GP2X scene is not dead, it's just hibernating. It needs a big wave of new releases to wake it up.

Anyway, keep on going Jabber! :)
 
Hmm, I was trying to give moral support since I know that last 1% takes immense effort to finish. I didn't think you were done forever. :)

So far it is a well done thread, worthy of being made into a programming tutorial article on some fancy SDL page. Most of all I like your writing style. If you can make me chuckle while reading about C then you have a gift because reading C source code is dull.
 
Had some spare time. I have to agree with Vilmos! Since this thread is entertaining, I collected the posts of Mr. Jabberwocky in a single HTML file: http://seb.fotons.nl/Jabberwock.html. Keep up the great work, Mr. Jabberwocky!

(Should anyone read the HTML file; If I've made mistakes, please correct me. I hope you don't mind the cheesy captions).
 
Wow! Thanks Sebastian ! That's brilliant. Can I include it as part of the final (If I ever get to finish it) archive for downloading ? I am lost for words.
 
Mr.Jabberwocky said:
Wow! Thanks Sebastian ! That's brilliant. Can I include it as part of the final (If I ever get to finish it) archive for downloading ? I am lost for words.
Of course :) It's your writing. I'll keep it updated, if you want to change anything (like the cheesy titles I chose), just let me know.
 
Last edited by a moderator:
Vilmos said:
Hmm, I was trying to give moral support since I know that last 1% takes immense effort to finish. I didn't think you were done forever. :)
Thanks Vilmos. I am putting the menus in and it does take that extra bit of dedication. Since the the actual game is complete (except for sound) I keep finding myself 'play testing' it more than necessary and not getting on with the job.
Sebastian said:
Of course :) It's your writing. I'll keep it updated, if you want to change anything (like the cheesy titles I chose), just let me know.
Thank you again Sebastian. My middle name is Cheese, so it is all looking good to me.
 
Last edited by a moderator:
Menus! Pah!

The trouble with menus is that we have become conditioned to judge a game by the menu. Subconciously we know that the game will only be about ten percent as good as the menu.

This is because the game will have been written by a fat, overpaid programmer with nothing to prove.

Development of the menu, however, will have been dumped on the new member of the team. They will be bursting with a fresh vitality and eager to impress their new employers.

Subsequently, if a game has a boring menu, the gamer's perception of the product is immediately lowered. Even if it is a great game it will be tarnished.

Luckily PSSST is such a sad little game that a post-it note as a menu would enhance it.

The best way to write menus would probably be to write a function for each one. So I have gone for a different approach. There is one set of menu handling routines and the menus are just data supplied to them. Due to lack of planning and a ridiculously large font they are a bit of a hatchet job - but they seem to be working after a fashion.

I have also spent some time sorting out the main control loop. As I have been bolting things on it had, quite quickly, developed into something nasty. So I have slapped some comments in as that always gives the illusion that you know what you know doing.

The end is in sight - thank goodness. Just a high score table and the sound and I can go back to sleep for another year. By then I may have aquired an f-200 and it will be time for a new guide - How to totally abuse a touch-screen.
 
I have discovered there is an on-line flash version of PSSST.

It is here ->PSSSST ON-LINE

Sadly they seem to have done away with the bugs having their own individual movement patterns. Also the they have implemented it so both cans freeze the wrong type of bug, rather than just one specific type. They have also added a 'smart bomb' type of bonus. SACRILEGE!
 
Back
Top