GP2X New Gp2x Game Almost Finished


reiboul

Peace sells... but who's buying?
Joined
Jul 16, 2006
Messages
587
Age
36
Location
France
Website
Visit site
Hi all!

As I'm wish to learn SDL, I started coding a game some days ago.
As I have most of the functions working I plan on a first release, but I never succeeded in compiling anything for the GP2X... I had another thread, but started this new one with a more eye-catching title, asking for someone to compile it and tell me how he did it, because I have very little experience at compiling :( (I tried to use Open2x toolchain)

Here is the source!

http://membres.lycos.fr/reiboul/tower.rar
(left click to go to download page)

By the way, I also need some clean graphics, if anybody is interrested in drawing a better scrolling background, and a logo for the game (which I call Tower2x at the moment, never really thought about a name ;) ) ;)
 
:( it looks like the rar is corrupted :(
Blah told me about bg1.bmp which is corrupted (only 1 file bg.bmp is required) and header.h missing!
I will check this out this evening at home, as well as your archive Ksmiler ;) thank you very much!
 
Not sure if this helps but here you go. Moved some code around so its all in the main file for now :p
Had to disable 2 lines of code cause it made the game exit its main loop fast.

http://www.freewebs.com/ksmiler/files/tower.rar

(SciTE + Devkit2X i used to compile it. I have compiled it for windows (tested) and GP2X (not tested))

Code:
			{
			// then handle player and print it
			done = ( p.physics(screen, obj) || done);
			if (done) p.currentClip = 6;

			}

Those lines are usefull, at least in the releases to come
done is the bool that exits main loop, either by pressing q (or start), which is handled in the event loop, or by falling on the fire, which is the value returnes by player::physics(screen, obj)
more, you can't move the player if you don't call for it's physic function :)

Actually it is useless because the physics never return true. I disabled it for testing ;)
Also, if the game is over, you change the character's sprite

Blah also told me he didn't find the header.h! But you don't seem to ahve problem, as the archive you sent back is complete :)

What interrest me also, is to know exactly how to compile with open2x, because I won't ask everytime I need to compile somethin ;) and I already did some changes since the last time I uploaded!

Anyway, good day to you ;)
 
Last edited by a moderator:
Hey Ksmiler your build works flawless!! I'm very pleased to see my first game working on the GP2X ;) too bad the character can't move because you disabled the physics :(
Now if anybody can tell me how to compile this on Open2x (or any other IDE easily installable on Ubuntu) it would be damn cool for me ;)

Many thanks for this 'proof of concept' build Ksmiler ;) First release very soon!
 
Open2x toolchain should work like any other gnu toolchain, just prefix everything with "open2x-" (ie open2x-gcc) and use $OPEN2X/bin/sdl-config, etc, etc.

But I guess you knew that.
 
Open2x toolchain should work like any other gnu toolchain, just prefix everything with "open2x-" (ie open2x-gcc) and use $OPEN2X/bin/sdl-config, etc, etc.

But I guess you knew that.


Unfortunately all I know about g++ is g++ main.cpp -o name :( I copy-pasted on the internet the command to compile with SDL on my PC, but can't get them working for the GP2X :(
I tried many commands like
open2x-gcc -c -Wall -I/usr/local/open2x/include `/usr/local/open2x/bin/sdl-config --cflags` demo.c -o demo.o
open2x-gcc demo.o -o helloworld.gpe `/usr/local/open2x/bin/sdl-config --static-libs` -lgcc -lm -lg -lpthread -lSDL

but they all barely works, from black screens to white teared and buggy screen (if they ever compile)

That's why I need your help on this, guys ;)
 
Last edited by a moderator:
w00t! I finally compiled this f***** game :D

I used this command:!

open2x-g++ Main.cpp -L"/usr/local/open2x/libs" -I"/usr/local/open2x/include" `/usr/local/open2x/bin/sdl-config --cflags --static-libs` -static -lSDL -lSDL_ttf -lfreetype -msoft-float -lm -lg -lpthread -static -o out.gpe
 
Back
Top