Here I am before you, one more time, asking for wisdom.
I want to design an RPG, from scratch, using C++ and SDL. I started out by creating some sort of abstraction (dunno if that's what you'd call it) from the "ugly" SDL functions, using OOP. Now, unlike my other unfinished projects, I'm trying too look ahead, to plan and by doing so I concluded that there are MANY things which I'll have to deal with when trying to complete this project (duh). My idea is a FFV-ish kind of game, and by that I mean a 2D tile-based RPG.
One of the problems I came across is how to store resources in general. Things such as maps, object lists, dialogs etc.... I'm thinking XML might do the trick, however it'd be great if you could suggest me other ways. (I checked out http://www.sdltutorials.com and http://lazyfoo.net/SDL_tutorials/index.php
Given that these tasks and others are quite annoying to put into practice using only C++ I'm thinking about resorting to a scripting language to handle most of the "High-level" parts of the game. So, I'd code the more low-level stuff with C++ and I'd use that same code with a scripting language, I know that this is possible (I got the actual idea from some open-source RPG's such as "Adonthell") but how can I actually do it?
Any help on this matter would be great!! Specialy regarding the scipting language, which and how to use.
To store values in a file the most common now adays are XML and INI parsers. In my opinion, INI has more features and is easier to code with. Maybe I'm old fashioned?
If I were to do something like that and didn't want to write the whole thing in C++, I'd write the script interpretation routines in Python, which has a very good string manipulation library and is garbage collected, and write the graphics handling code, which should be much faster due to the sheer volume of data and because graphical slowdown is more noticeable than an interpretation slowdown, in C++.
What I mean by this is that you don't not actually want to write the game in the language itself. That's too specific a problem. Instead, you want solve a more generic problem and write an engine for FF5-esque RPGs.
I think INI is better suited for configuration than state.
Of course, XML is for pussies. Real men serialize structures into a stream of bits which is later compressed.
So, what you're saying is that I should code stuff like event handling and rendering (and other low-level stuffs) in C++ and leave the rest up to python?
Why is XML for pussies and could you explain me a bit more of that "real men" aproach?
Python will do the job for you. You can also consider using Lua which has become extremely popular in game development due to it's speed, ease of use, etc... To build onto what helios stated, you don't want to program the actual game in C++, you want to build the engine. Think of it this way... you need to program the tools that allow you to create the game, sort of a game maker. For example, you'll want to build yourself a level or game editor where you can create objects and events, build maps, set enemy loot tables, etc... and a scripting engine to handle things like NPC behavior, maybe AI, quests, things that would be extremely annoying to create in C++. Either of helios's options for config data will work. I've seen them in ini's and many large games use XML. Just as an example take Blizzard's ridiculously popular MMORPG World of Warcraft, the core engine is written in C/C++ and there are a number of tools used by game designers to create the levels etc... the rendering is handled by OpenGL calls and scripting is via Lua. Much of the config data, preferences, UI states, etc... are stored in XML files, and everything is piled into some freaking gargantuan database.... SQL Server maybe?
I guess my programming knowledge isn't enough yet to tell apart humor and seriousness. XD
Ok, engine in C++, scripting in Python, gotta learn python a little better and I gotta find out how to "glue" them together. I have a vague idea of a library which was meant for such task, but I gotta look into it a little better, any suggestions?