GP2X Gp2x And Databases


theBogster

Still Fresh
Joined
Apr 5, 2007
Messages
11
hi everybody,

i have recently got a gp2x and am a total beginner in terms of programming and using the gp2x
i was just wondering does anyone know if it is possible to have a database running on the gp2x as part of some game
i have been looking in the open source section and i see loads of games that can be compiled and copied over to the gp2x
lots of these games contain sound files, images etc but none of them contain any kind of database (eg - small php database)
as i say i am a total beginner in all of this so what i have asked may be a really stupid question but if somebody could let me know that would be great.
Looking forward to hearing from you guys
 
Games do not generally use databases as you know them. They usually load either a well-known file format, such as TGA or PNG for images and INI or TXT for text files, or use their own custom binary formats. Sometimes a game might have all these files packaged into a larger file, such as Quake's PAK format, but that's still not a database.
 
Hi Bogster

I not to sure about running a database on the 2x but you
you can use XML.

databases need driver to run and I not sure if there is any out
there.

XML can do alot of what a database can do
I m sure there is a way to Parser XML using C/C++
you can also use things like Xpath to query your file
it a bit like SQL.

hre is a link to some really good tutorials
about how XML and Xpath works

http://www.w3schools.com/xml/

Mac
 
If you really need a database, you could use the SQLite library in your code. It has SQl support, creates flat file databases, is small and public domain.
 
what do you actually intend to use the database for? Maybe, you are thinking too complex and a database isn't even needed...
 
Hey there guys.
first off, thanks a million for your replies, they were much appreciated.
i am new to both the GP2X (which i have to say, as far as i can see so far...seems really cool) and development.
the whole database question was just an idea that came to me and i was just curious to see if such a thing could be run on the GP2X
 
yes, it would be possible. you can run a database on linux, so you can run it on gp2x, with the right software. as orkie said, something small like sqlite would be good, as the gp2x isn't too powerful from a database perspective, and these things often require a fairly large amount of ram and storage space (depending on your data of course)

as for how useful it would be... unless you were running a website that requires a database (such as a wiki or content management system), i can't see why anyone would want to adapt a business application that requires a database (accounting, legal, crm, etc) to a handheld gaming device with limited battery life and limited input functionality
 
Back
Top