Real-time RPG Framework design

Started by
4 comments, last by FrontBack 8 years, 9 months ago

Hi everyone! smile.png

So, I'm currently working with some other guys on a real-time action RPG in Unity 5 (to give you a "real-life" example, Kingdom Hearts). Due to our budget (basically none, so we can't afford any premade tool from the Asset Store), I thought it was a better idea to write a generic framework for us to simplify the development of the game itself and to make the code almost completely reusable, in case we wanted to make some more (like sequels and stuff like that), or even to sell it on the Asset Store.

Anyway, I decided to make this framework, but I almost immediately bumped into a serious problem: how am I going to design the framework itself? How will I manage the data from and to the game objects?

Anyway, the how-am-I-going-to-write-it part shouldn't be such a big problem.

I realize this may not be an easy question, because it's kind of vague, but I'm confident in your skills and, most of all, your patience tongue.png

Advertisement

You're right your question is too vague. If you really want advice for structuring the code you need to be able to more clearly specify what your needs for a system are and what your current problems are with respect to implementing or designing that system.

That said, your plan strikes me as a bad idea. For two main reasons:

  • You have no budget. This means you're basically bleeding money in opportunity cost (that is, the time you're spending producing this game that's currently making you no money is time that could be spent doing something that directly makes you money).
  • You can't answer the very basic questions about the design of this framework, which strongly suggests you're trying to build a system too far beyond your scope and which encapsulates requirements you don't actually need or haven't actually defined.

I think you'll be better off simply working directly on your game. Don't work on a "generic framework," it's going to take more time in the long run as you struggle with problems you don't actually need to have and thus decrease the net profitability of your game. A "generic" framework that hasn't actually been proven to be generic enough to ship multiple games on won't fetch a very high price as middleware, and similarly reusable code is only useful if it's actually resuable and proven to be so... claiming that you're writing it doesn't make it so, and you generally need to put it through it's paces anyway to know whether or not it is.

Instead, focus on writing the game you want to write. Refactor things as you go and notice you could make them reusable across different aspects of the game. You'll ship sooner, and once you ship and start making money you can take a breather, assess what you want to do next and what the strengths and weakness of your codebase are (based on what you learned while making an actual game), and take the reusable parts forward to your next game.


and take the reusable parts forward to your next game.

those reusable parts will be the beginnings of your "framework".

but you won't know exactly what those parts are until you start on the _second_ game. When you start on the _second_ game, that's when you'll want to copy/paste the re-use-able stuff into a framework, which you can then use to build the second and subsequent titles.

.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

Of course, first of all, it is feasible to write a generic framework, but it needs a very long time to work for a generic framework,i am spent a few years time to complete my generic framework.

some advice you can begin your work with other open source framework , it will save you time, and can refer or change it.

the most important that is object[data] management and interface management, you can try to do something, and as the base of you next game.

https://github.com/ketoo/NoahGameFrame [A fast, scalable, distributed game server framework for C++]

I think what he's referring too is how to manage things like stats, spells, and items.

Well, the fact of the matter is that there really is no good method. The best method is what ever makes sense to you guys. Trying to make that generic will only be overcomplicating your code and making things unnecessarily difficult.

For things like stats and the like, You'd want to always start with your base stats first. Make the stat data a property as pretty much everything you do in an RPG; attack rate, regen rate, physical damage, physical resistance, etc; depends on these stats. A component system will work well. But given you are working with Unity, you'll learn it's a pain to implement anything efficient. Just stick to simple. Make a bunch of assets, make a script component who's soul job is to store data. And that will be pretty much how you approach the stats.

You can do the same method for items as well. That is assuming that there will be no unique weapons. (Same model, different stats)

Thank you everyone for your very useful replies, from now on I'll do my best to avoid this time consuming stuff and instead focus on the game itself :)

This topic is closed to new replies.

Advertisement