11 March 2016 - Forum Rules

Main Menu

Preferred Lauguage to code a RPG

Started by Madsiur, July 09, 2012, 09:59:32 PM

Previous topic - Next topic


Hello everyone,

Second post here, I lurk often but I'm not really active here. So here's my dilemma: I've been modifying FF3us for almost a year now and learned a lot about what is in the ROM and other stuff related to sprites, SNES harware, ASM, the SPC-700, and bits about other games too. The thing is, my hacking project became so huge it might take 5 years to finish, no joke (or even more!!!). I love ROM hacking but with the available programming tools today I was wondering if there would be a quicker way to do a nice project that has some magnitude.

There is a lot of option and I wanted to know if some of you could give me a real expert opinion. What about the difficulty of creating a RPG that would be somewhat close to a Final Fantasy on the GBA/SNES, in terms of smootness and graphics? I'm on my 3rd year of programming and I can code well in Java, C# and C++ mainly and I have a rough idea of the classes that would be required for such a project but I never coded any other game than minesweeper, tetris or a Wolfenstein 3D clone (much more shorter, square and ugly though) as for games . So what would be the best language to code a FF clone?

I'm reading all kind of opinions in random threads (other than here). Does the XNA framework environment offer good speed, smoothness in a 2D environment if well coded? Could we say better things thing about openGL (or other libraries) and C++ (for a 2D game ?!?). Should I go with something I don't know like Python or RPG maker XV/XP/2003 that offer scripting with Ruby and RGSS3/RGSS2 (not to mention the coming FFVI SDK...)? Or should I attemp coding a GBA game in C and assembly ?

What would be the least time consuming option that would offer the most possibilities, given that I know how to code (but not how to choose a language for a project...) o_o



You shouldn't be concerned about which language or library is up to the task. It's hard to find one that isn't.

I'd be worrying about which language or library lets me work most productively and maximizes the chances of the project being completed and coming out well. Writing a game for GBA has the cool factor, but if you're already familiar with C++/openGL or C#/XNA, those are probably more practical options. Then, there are concerns beyond programming. You would need graphics, music, and other content, and you would need to manage everything.

If you're seriously considering something like this, start with a project outline. Figure out what needs to be done in terms of programming and content. You don't need to nail everything down, but you should have an overall idea of what needs to be done and identify those details that you will need to iron out out later on and when.

And if you've never written a complete game before, you probably also want to start by making a simpler game on the platform you plan to use. It wouldn't need to be anything novel or great, just something small and fun that will bring you through the paces. It will help prep you for a larger project and give you a better idea of whether the platform in question is the one you want to target.


Thanks! I'll keep your advices in mind. You're right that I should worry more about graphics than coding because I'm not a a good pixel artist but then again I think I could find tile sets and sprites too. I'm a bit throned between this project and a FFVI advance editor that I would expand through out the versions. I want to start by a monster stats editor first. Plus, I want to keep ROM hacking because it's fun, but more on a research level than an actual hack. I will have to choose.

Why do I have so much projects and some much little free time to invest in them...


The XNA devkit for PC comes with source code for a basic RPG (a couple hours long) with scripting, so you might be interested in that.


Quote from: Madsiur on July 10, 2012, 10:39:10 PM
Why do I have so much projects and some much little free time to invest in them...

If I had the time, I would spend it all on my hobbies, but alas, unfortunately life doesn't work that way! Unless you're already rich, I guess.

You might also consider targeting different platforms at once (e.g. mobile) and base your language choice on that. A tile-based RPG in the vain of the old FFs shouldn't need that much processing power, so it could be a good idea to have a wider target audience by making it cross-platform.

syntax error

I recommend plain C and allegro library for easy understandable and portable code.
My first game projects were in Quick Basic.


I recommend Flash and ActionScript 3. Nice stuff, has plenty of features you'd find in a nice hardware engine and it is platform independent.


I recommend C#/XNA from experience. Excellent performance, great flexibility, and it's very easy to use and distribute.


I'd recommend C for the core engine and the scripting language you're most comfortable with for event editing and what not. I prefer Python for scripting, but it can be rather cumbersome to embed. Lua is dead easy to embed (or port, I did a GBA port in a few hours), so that might be a good choice if you don't have a strong preference for something else.

The reason I recommend embedding a scripting language is the inherent complexity of RPGs. Either you have to code every event in your low level language, or you have to write your own event system, which eventually grows into a programming language of it's own. It's easier to just use a scripting language from the start. (Unless, of course, you don't mind designing and implementing a domain specific language. Most people can't be bothered.)

Of course, you'll want to consider your target platform before settling on a language. It's important to consider what's available and well supported on the platform or platforms you intend to develop for. Given your target (SNES/GBA like), you might want to consider targeting the GBA, which has good C dev kits available and can be emulated on wide variety of platforms.
Current ProjectsFinal Fantasy EngineSMB Special for NESStudio Karatorian
@loop: lda (src),y — sta (dst),y — iny — bne @loop — inc src+1 — inc dst+1 — dex — bne @loop


Quote from: Karatorian on August 10, 2012, 08:46:01 PM
Lua is dead easy to embed (or port, I did a GBA port in a few hours)

In the event of a firestorm, the salad bar will remain open.


I say, you should consider it carefully if it is worth using a scripting language when you could just do the same job in your existing programing language. There is a cost to adding a scripting engine, even if the actual engine is premade.


I'm making one in C# and XNA right now, it's proving time and time again to be the best choice.

I've experimented a lot with SDL/Allegro/SFML and they all seem to have significant drawbacks:

  • SDL can't do per pixel alpha blending, even on the latest versions it completely screws up, I remember on the latest versions it would actually corrupt the sprites if you turned blending on
  • SFML is pathetically bad at font rendering, and their developers are too up their own arses to bother fixing it, or any of the other myriad of issues it has, also their API is always unstable, because they drastically change it with each release
  • Allegro feels more dated than SDL, and that's saying something. Admittedly I haven't spent too much time with it, but I know there's a damn good reason why I gave up early, it may be something to do with their 'support' of OS X

XNA and C# get you some extremely powerful tools for building a game engine, the only downside is if you intend for this to be on the Xbox or Windows Phone, you can't use a scripting language unless you make your own, as the DLR (dynamic language runtime) that bindings to Lua/Python/JS use is unavailable on these platforms, mainly due to performance/memory constraints.