game updating , discussion

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Ferbguy
Posts: 51
Joined: August 29th, 2012, 10:54 pm
Location: Georgia

game updating , discussion

Post by Ferbguy » September 5th, 2012, 6:08 pm

i am going to do a personal project. I am going to code a game using art work and 3d effects. Just to help understand it. but what i am wanting to know is how to make the program so that anything i add to the files will end up in the game. This way i can add things to the game such as items and whatnots without having to go back in the .exe.

Paradox
Posts: 22
Joined: July 14th, 2012, 4:11 pm

Re: game updating , discussion

Post by Paradox » November 28th, 2012, 4:07 am

Ferbguy, I don't think you can. The source isn't "exe'd" until it's built. Unless you're able to code some sort of handler that would read a local file and interpret the information. Think about how a bitmap works; there's a header that contains all the info, but the code only handles it. The only problem would be getting a function to open a previously nonexistent file. You might want to look around for a way to do that, I have no idea.

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: game updating , discussion

Post by LuX » November 28th, 2012, 1:57 pm

I once worked on a game in VB that used a ton of items. I ended up making the items so that I just had to create some files and the items would be in the game. It's not the best way, but here's an example:

Each items needs: Inventory image (image), ingame imagelist (image), inventory info file (text), stats info file (text)

The way the game would find the item, is that each had an ID number, so each item would be named like "138_inv_inf.txt" for example and if then my inventory had the item "138" it would seek for the file ID + "_inv_inf.txt" and display this. Same for images and the rest of the files. It worked pretty well and there was no need to add or edit the .exe to add items.

Downside is, that I have to pre define all the item types and stats, so the item info would store if the items is something to eat or a weapon for the right hand or armor etc. then the stats would store all kinds of damage info and so on. Hope you get the idea.
ʕ •ᴥ•ʔ

Post Reply