..

mercredi 1 avril 2015

[Q] Help with code that retrieves character info for RPG style games? topic


Hello, I'm new to java coding and would like some help.

I want to make a simple RPG card collecting style game (like Brave Frontier, Defender of Texel, Blood Brothers, etc) for Android. Right now I'm focusing on how to write a code so when you click the character's icon in your inventory for example, it will bring up a new page with the full character sprite, stats, lore, etc. I figured it would be redundant to write a code specific to every character, so I thought it would be possible to make a "universal" code that works with all characters.

So for example, you assign an ID to a character, and when you click on the icon(a button), the code retrieves the ID and brings up the character's information.

How would I go about doing this? If I am using this method, will I also have to create, for example, a text file for each character with its stats and other info? If not, what is a way I can store the character info?

I am not looking for someone to do the coding for me; I merely want to be pointed in the right direction. Thanks! :)

xda-developers