Advertisement

How to create a dwarf fortress like game

Started by November 18, 2017 05:09 PM
5 comments, last by Infinisearch 6 years, 9 months ago

I'm looking to create some kind of simulation like game similar to rimworld and dwarf fortress.  I would also like to include a way to control units through programming, similar to screeps, I'm even thinking of using JavaScript as well.  I would like the graphics to be separate from the actual game, so that people can make their own if they don't like the default on (the game will be open source).  Are there any languages or engines that would be good for this task?  I mostly program in functional languages like racket, but I know some python, Java, and JavaScript.  I know how to use unity somewhat, but I'm not sure that it would be best for this.  Also, I'm not sure if this is important for picking out the right tools, but I am thinking of including a feature to run parts of the simulation at different levels of detail, for example, you could "zoom in" on a battle that's happening and see each individual shot, or you could just get the main idea of the battle, like if you won and how much gold you got or something like that.  Thanks for any suggestions.

I believe you shouldn't focus that much on frameworks or engines, as long you can get the job done.  I would start making a small prototype (covering a subset yet fundamental functionalities) then re-iterate to improve it. On my blog, I'm building a prototype from scratch using C and SDL (which is also cross platform), maybe it can help you.

Advertisement

Standard engines are Unreal and Unity. The former uses C++, the latter uses C# which is quite close to Java. These engines are mostly aimed at 3D games. For 2D, pretty much anything could work. From Python, the standard solution is Pygame, although it uses somewhat old techniques for painting onto the screen. For Java, there is libgdx and lwjgl. C and C++ typically use SDL2. At Windows there is the DirectX stuff, which I know literally nothing about (not a Windows user).

My list is far from exhaustive, but it may give you some starting points.

 

As for programming the game, the biggest problem is overscaling. In your mind it's all simple, intuitive, and easy. Getting that into a computer is much more work than one thinks. So start small, very small, and expand in small steps.

On 11/18/2017 at 11:09 AM, Vityou said:

I mostly program in functional languages like racket, but I know some python, Java, and JavaScript

Uh oh... you've got your work cut out for you.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

I'd suggest for your first iteration you start with Python.  It's very good for rapid prototyping and constant refinement, is very capable, and is fast enough that it's become the de facto language in the AI community where the sort of massive data crunching you're envisioning is the lifeblood.  The learning curse is shorter, too.

Once you've stabilized at the conceptual and functional level, you can start replacing bits piecemeal with C or C++ implementations for speed, because Python be like that.

There are plenty of third-party libraries available for Python for choice things like graphics, sound, and using the GPU for massively parallel number crunching like you might want for handling the updates of 1000 minions while maintining framerate.

Also, it's portable to any desktop and many other devices.

Stephen M. Webb
Professional Free Software Developer

I recently saw these books on amazon... they might be of interest to you.

Procedural Generation in Game Design

and

Procedural Content Generation in Games

-potential energy is easily made kinetic-

This topic is closed to new replies.

Advertisement