Page 1 of 1

Developing a JRPG

Posted: Tue Feb 02, 2016 6:54 pm
by megalukes
I've been developing a small rpg game lately (something like Chrono Trigger/Final Fantasy V) and I've been wondering if you guys ever had some issues I'm having at the moment. My main issue with this kind of game is not programming itself, it's how to keep track of what's happening in the game. In a rpg game you need to manage dialogs, cutscenes, inventory, event flags and so on. How do you guys organize this stuff? The idea I've been working on so far is having a .lua file containing all the data of a single map (events, npcs, triggers, warps). So let's say I have a map called Map001.lua. Its data would be contained in a file called Map001_data.lua so both would interact to create the gameplay.

Any tips? This is my first experience creating an rpg using Love. I used to develop stuff in RPG Maker before so I don't have a game editor to ease all the work now.

Re: Developing a JRPG

Posted: Tue Feb 02, 2016 7:09 pm
by RainbowOverdose
Serialization? You could use a txt file (or any other format, it's depends of serialization) containing all the data like dialogs and then simply load it to the Map001.lua.
Just my opinion, i have no idea about rpg really, and much less about file organization in those.
Ah, and there are some utility tools, i supose some should help.
i find this one particullary useful.

Re: Developing a JRPG

Posted: Tue Feb 02, 2016 7:25 pm
by Kasperelo
I've also been wondering how to structure all those things! Would also greatly appreciate an answer :)

Re: Developing a JRPG

Posted: Tue Feb 02, 2016 10:42 pm
by sanjiv
I use "scenes." The scenes can then call upon other entities, like people, places, etc. This way if a place or person is affected in a previous scene, the current scene will automatically consider that effect.

So in the callback functions (like love.draw() and love.update(dt)), I have functions like game.scene.draw() and game.scene.update(dt). In order to switch between scenes, I set game.scene=newScene, and run game.scene.load(), or something like that.

(edit): For your project, each scene might always have a game.scene.map, game.scene.HUD, etc. You could even have game.scene.trigger={false,false,false} in order to affect things like game.scene.trigger[2] and stuff.

Re: Developing a JRPG

Posted: Wed Feb 03, 2016 3:56 am
by NightKawata
Yeah, in regards to sanjiv: You could always look at something like RPG Maker 2003, and break it down.
Learn how it sets everything up, and figure out how to emulate that.

In reality, what he refers to is gonna be in RPGXP or RPGVX, but learning to break down how that entire flow works is gonna help you in the long run. Build a database akin to the ones used, and have ways to easily manage and build upon it.

Should be somewhat of a jumpstarter for ya.