PDA

View Full Version : Best way to read/write to an inventory database


TheMarkers
09-30-2008, 02:52 AM
Hey One and All,

So im scripting a game in actionscript 2.0 and now i've faced a roadblock. My game has an items inventory that has yet to be implemented.

I know I want to read/write to a database. This database will contain a list of all the items collected and when an item is used in game, the inventory will update stock accordingly.



Now im not even sure where to even begin or even start deciding whats involved. Can anyone point me to some proper documentation or pose suggestions on where to start?


I know its a bit of a vague question, but im just looking for insight! Thanks all! you've always been helpful.

Headshotz
10-06-2008, 03:37 AM
Flash reads from files easily but can't write to them without the help of some external script. Php is probably the easiest and it's supported by most servers.

A quick google search gives some nice starting points for you:
Like this (http://www.myacrobatpdf.com/8056/building-database-driven-applications-using-flash-php-and-mysql.html)

Just as a note: make sure you work on the security for it a bit, any kid on the internet is capable of hacking a badly coded highscoreboard/inventory/etc. All they would need to do is decompile your file to check variable names and then start posting whatever they wanted to your php script.


Edit: This is assuming your game is based online so you can use server side languages.