RPG game skeleton design

Hi, everyone, I’m new here and I come from a Visual Basic background. Now I am using Java with Eclipse. I have a game design related question, but I’m not exactly looking for code examples unless it’s useful to explain it.

In any language, I have never tackled a large project of any sort. After programming a basic engine, most everything i did revolved around The graphical system, to get an animated character on the screen. My latest plan is to program an RPG game from the ground up. There are lots of tutorials that help in doing that, but none of them focus on the big picture. That being the overall design that you want to build an engine around. So here I am with a design question related to placing the game mechanics.

Does anyone have a suggestion on how I could structure a game engine skeleton. An outline is basically what I’m looking for, with perhaps a little additional detail on how the different components might fit together. The idea is a top down rpg, very much like a Zelda game or Ultima, but with more depth to the interaction. I have many ideas of what to put into it, but I’m not sure how I would structure the code, to allow me to create a stable file format for a game level.

So I’m starting from scratch. Unfortunately I don’t have a formal education in game design or programming, so I’m basically learning from forums, Safari books and other tutorials on the web. Any pointers on how to manage a large project (how to break it up into components) would be very, very, helpful to me. As for Java, java specific code would be perfectly fine, but I’m just learning the ins and outs of the Java language, so I have to translate it to pseudo code to make it neutral for now.

Thank you in advance if anyone can help.

This sometimes helps to give a summary: (Goal) a Wasteland/Zelda/Ultima/Bard’s Tale type rpg game engine. All based on the original titles and not on the modern enhanced versions.

I haven’t worked on any projects specifically of the type you mention, so I’m not particularly qualified to give advice here, but I’ll just offer a couple general suggestions to get you started.

  • I think a good first step would be decide how much you want to do yourself and how much you want to outsource to existing libraries and frameworks. For example, do you want to use something like LWJGL and deal with things like rendering directly, or would you rather use something like LibGDX as a base and build your game on top of that? Do you want to implement things like A* yourself, or use existing solutions where possible? I won’t advocate for one over the other, but for a project of significant scope like you’re proposing here, those will be key questions to answer.

  • I think for any kind of RPG-like game of significant scope, incorporating a scripting system is probably a good idea, so that might be something to plan ahead for. I’ve only used JavaScript with Java myself and tend to recommend it because it’s easy to integrate, but there are of course other solutions as well.

  • Whichever way you go, modularity is probably a good goal and will allow you to develop and test aspects of the game in isolation. For example, a pathfinding system is a good candidate for something that can be developed largely in isolation, with dependencies mostly in the form of data that’s passed in (dependency injection). Once you start to have some useful modules available, you may find it’s more or less self-evident how they should be linked up to form the overall game framework.

Please have a look at my project http://www.java-gaming.org/topics/java-2d-multiplayer-coop-rpg/35974/msg/340836/view.html#msg340836 and tell me if this is something you had in mind. This is a typical top down perspektive which is used by the most rpgs. I could give you a few tips for example on tile based map rendering and using programms like Tiled a graphical map building tool which will save a lot of work for you.

My first suggestion would be:

  • Uninstall Eclipse.
  • Install IntelliJ Community Edition.

You can thank me later. ;D

I would like to hear the reason for this suggestion. Many people use Eclipse and are happy with it. I can’t compare it to any other IDE, as i never tryed another one, but i also can’t see any reason to switch.

@Topic:
As you said, you want to tackle a large project, a big RPG. Therefore i suggest you to plan the features you want to include in your game. Do you want to interact with objects in the world? How does this interaction look like? Will you be able to select different Classes (Mage, Warrior, Archer…) or is there only 1 Class? How does the Skill-tree look like? How do you Level-Up? Is it Open-World or are there different levels you will walk through? How does the Quest-System work? Which types of quests are there?
And i guess there are many more questions. So i would think about those things and then think about their implementiation.

If you have never tackled a larger project, let alone a large game project and haven’t much experience in Java either, picking a RPG as your first project is asking for failure. If you don’t want to finish it and take it as a learning experience, then go for it. But if you want to finish something, choose something else for your first Java based game. For reference, I’m coding for 30+ years now, 16 years in Java (at work and in my spare time), I have a degree in computer science, a lot of experience in graphics programming and have done several non-commercial games on various platforms. I’m working on my RPG for almost 4 years now in my spare time and it’s just now that I’m seeing some light at the end of the tunnel. And that’s not caused by the coding itself, at least not entirely. Nothing that I coded felt very challenging to me, but it’s still a lot of work. Then comes content creation and/or the search for pre-made content that’s free or cheap and has a fitting license. Then comes dialog- and quest design and writing etc. etc. And I’ve already cut some corners by leaving out some features like magic spells and such.
What I’m trying to say: It takes a lot of time to finish a RPG.
About the actual question: I started with the visuals and a basic feature list. I then started to implement one feature after the other into the game. Pretty straightforward. If a design didn’t work well, I refactored that part. But that didn’t happen very often.

I second what EnogOlsen said. I’ve been working on my RPG for 16 months now, and it has been feeling “at 90% completion” for the last 12 months :smiley: And my experience and background is very similar to his, 30+ years programming, with professional experience, and a degree. (Although I’ve only started working with Java recently, in fact my RPG is my first Java project).

However, if you insist on making a RPG, first of all, before looking at any library, toorl or code, you must make all the design choices. TO THE END.

That means taking a notebook and a pencil, and drawing all the game menus, options, etc. and details on how it will work. character creation, with all submenus. Combat, equipment. Conversations. Item slots. Party members. World interaction. Note down all the game mechanics too. Turn based, or real time? Single player, or party? How many encounters until you level up to lvl2? how many until level 10? Then make a short list of what different subengines you’ll need to create. Conversations? Cutscenes? Scripts? Quests? Crafting? Map Editors? Everything with enough detail as if you were writing it down for another developer to materialize. Think about all details, like, how will maps respawn? what will be saved and what won’t? will the world be continuous, or area-based?

If you do it right, this should fill no less than 10 pages, but probably more like 30.

If halfway through this, you become utterly bored, confused or demotivated, well, you wasted a few hours, instead of weeks or months in realizing how BIG a RPG is. IF on the contrary, everything seems to click in, if you become more and more motivated with new ideas… then begin the technical choices. From your background I’d go for Libgdx as preferred choice, and would use as much 3rd party code as I could, but really, if the “vision” is clear in your mind, it won’t matter much.

Hours of planning can save you weeks of programming

Listen to EgonOlsen and DavidBVal.

However I think that something more important than “That means taking a notebook and a pencil, and drawing all the game menus, options, etc. and details on how it will work. character creation, with all submenus. Combat, equipment. Conversations. Item slots. Party members. World interaction. Note down all the game mechanics too. Turn based, or real time? Single player, or party? How many encounters until you level up to lvl2? how many until level 10? Then make a short list of what different subengines you’ll need to create. Conversations? Cutscenes? Scripts? Quests? Crafting? Map Editors?” is thinking about all (or a majority) of the math and functions required to make the actual game (sprite rotation, movement, drawing, collision, etc). Sadly, the “fun” part (content development) comes after the math.

I do agree with some of the others, an RPG is a bit too much because there is so much content required. Practice your skills first by making a game like Asteroids or Galaga or something.

As a person in the same situation as you, I would say to plan the structure of the game before anything. Not only what you want in the game, but what each “thing” does. For example, what each player can always do, and so on. This involves Inheritance/Interfaces. If you don’t know a lot about either one of those, I would highly recommend learning them. I’ve personally wasted weeks of coding because of it, and I ended up redoing the structure to better fit what I want.

My game I’m working on is a sidescroller 2d game, but still has a lot of the same aspects as a top down rpg game. If I were you, I wouldn’t use a bunch of libraries. It takes away from the learning process, and just isn’t something you want to use at first. Also, I would use OpenGL (I use OpenGL 2), and slick. Other than that, it’s really on you if you wanna learn it or use a library.

About a structure to an rpg game, just plan out how you want a map to be. For example, if there’s like a border for certain areas, define that “area” as an object with a set border or what not. Make the player be able to do what you want, like attack with their weapon by a press of a button. Jumping/Physics also come into play, and to me that’s on the more difficult side. You need a way of triggering like when you hit someone, so collision detection and certain methods like onHit and what not could be important.

In the end, it’s really what you want to do. There’s many different ways to create a game, and I’m just learning how it’s really not that difficult to even program it. The overall difficulty is graphics/gameplay stuff that isn’t programming, but other parts of the game. You also need to think about data management/data storage. I’m going to use a text file, but it may be better for you to use a database if possible.

Also think about if a player can have a weapon that shoots projectiles. Also the weapon in its self. Maybe you just have swords, I don’t know, but that in itself will be a separate object most likely.

I’m just going into my senior year of high school, so I have little experience in this. I’m working on my first game in java, and can tell you that it’s a nightmare at first if you don’t plan EVERYTHING out first.

Also use VBO’s. Just do it, trust me.