Computer Science Canada RPG Mechanics |
Author: | Zren [ Tue Dec 06, 2011 10:08 am ] | ||||
Post subject: | RPG Mechanics | ||||
My Eventual Goal is something similar to FF Tactics, 3D and all as I can't create decent pixelart to save my life. However, RPGs are First off, I attempted to make an isometric view in 3D. This led me down the spiral pit into madness of learning OpenGL in Java. This entire project was respured into motion when I realized how simple Processing did 3D objects. Though I wanted more complex things with it than it provided. So I checked what it ran on. JOGL was a disaster. Luckily I remembered about LWJGL from reading about Minecraft. I briefly considered JME, but it felt like using a very high end tool when I needed to learn the low end first. So after grasping the basics of GL, I came up with this: After implementing ImprovedNoise (2D) As you might of noticed, I haven't converted the mass of cubes into a single mesh yet. For now however, I realized I should most definitely start with the game mechanics. The renderer can be either 2D or 3D, but neither matters if the backend doesn't work. So for now, I'm going to recreate the mechanics of the origional FF first. Figured I'd post the tidbits I finish for peer evaluation as I write them. Basicly for peers to tell me what I'm doing terribly, terribly wrong. For now a LevelCurve class. LevelCurve
Output
Next up will be a Character class to store Exp (and cached Level). From there:
After that I'll probably start the battle system with just a basic Attack action. |
Author: | Zren [ Wed Dec 07, 2011 3:32 pm ] | ||||
Post subject: | Re: RPG Mechanics | ||||
Alright, the next bit of code will most likely get a fair bit of scrutiny. That because I'm still not sure how I want to do it. The character statistics come in 3 categories. - Always increasing integer (Level / Experience) - Integer that will also sometimes have offsets (buffers / slow magic / etc) ( = value + offset) - A fraction of a maximum amount. Sometimes the maximum will be buffed (HP / MP) [====----] [50/100] While #3 could be done as #2 (as the following code shows), it seems weird. The only saving grace is in a later term I create a buffStat function, it'll work on the #3 type as well as #2. #1 was easy enough, Making them part of the Character data structure. Later on I can make it more complicated should I wish. Here's the Character class so far. I skimped the non-relevant methods that aren't about Level/Experience. If you want to see the full code, check the link at the bottom. Character
Output (of a single tick):
If you wish to see the rest of the classes (Stat, Job, Weapon, Armor, EquipmentInventory) then check them out at the following Gist link. Full Code (https://gist.github.com/1444276) My next update will be a simple back and forth battle (Traditional_Turn-Based). submitted something of it's kind before here, but oh well. Following that I'll work on making into an ATB. Then I'll walk down that page. I'm purposely skipping magic and other menus as the more current system involve a charging up and a cooldown system. |