STEAM GROUP
eXplorminate e4X
STEAM GROUP
eXplorminate e4X
51
IN-GAME
814
ONLINE
Founded
September 24, 2014
Language
English
Location
United States 
Ail Apr 17, 2020 @ 6:39pm
Resources, guides etc. to make your own 4x-game?
After critizising other games for what I don't like about them and what I would have done differently, I came to the conclusion that the only way to make sure to actually get a game that I completely agree with the design, would be making it myself.

As of yet I've only done the "fun-part" of game-deving, which was coding AIs of already existing games, where the actually hard part of UI, engine, etc. all was already in place.

I figured that several people who are here probably went through the same and may know about ressources. What engine to use, how to learn how to use it?

I was thinking about Unity, because I've already used it in the past. But I never bothered to try and figure out how to do anything but starting Visual-Basic and clicking the run-button.

Another reason for posting this is creating some sort of accountability for myself, so I won't wake up tomorrow and have forgotten all about it. Maybe even make this thread some sort of diary and discuss the ideas of design and receive feedback.

So what's the general idea of where I want to go?

I want a really simplistic 4x-lite-game. Think of Moo1 but even more simple.

The economic part shouldn't burden you with any repetetive tasks or even worse math-puzzles or build-orders. When you get a new planet you decide what it will specialize in and that's it. No adjusting of sliders, no allocating of population, no queuing of buildings. You can change what it does but that will be discouraged by it having to change it's infrastructure for the new task. The idea is that you'll have to pick the best compromise between what you need the most and what the environment is most suitable for.

Combat will only be ship-to-ship and all sort of invasions are abstracted. For that I really liked the original Endless Space, before it's add-on. Incase you don't know: A planet got automatically invaded by hovering your fleet in it's orbit for long enough. Other than invading, there will be no way of damaging the colony from space.
The general idea for that is that you distribute your ships strategically as you see most advantageous fit. One big fleet at one position or many small ones at different positions or anything in-between. I'm also thinking about a rock-paper-scissor-system of basic ship-types, where it's your choice of whether you want to specialize, which makes you vulnerable to the counter or mix it up, which makes it harder to counter.
I'm also thinking of combat just being automatic because due to how I imagine it there will be a ton of small engagements, which would be tedious to all play out. The majority of the game would consist of repositioning your ships.

Victory-condition: Grinding down every last colony of your opposition is rather tedious, when you already know you'll win regardless, so I'm thinking about a completely arbitrary way of winning via accumulating victory-points. Maybe one way of specializing your planets is to produce those. They won't benefit you in any other way so it's a trade-off, that you can only afford when you feel save doing so.

To sum it up: I want to abstract away everything I consider tedious or repetetive and only leave in the parts that I actually enjoy.
Last edited by Ail; Apr 23, 2020 @ 5:00am
< >
Showing 1-15 of 83 comments
Nasarog Apr 17, 2020 @ 7:11pm 
Interesting. I can get you in touch with a few of the smaller devs I know that might be able to help. Interested?
BlackSmokeDMax Apr 17, 2020 @ 7:25pm 
I don't know if Quill18 has done any 4x versions, but he has done some create a game guides, I think even in unity. He does this on both his twitch channel, and on his second youtube channel which IIRC is named Quill18creates (or something along those lines) So, maybe take a look there. Best of luck!
omzh Apr 17, 2020 @ 8:19pm 
Just to add, I've started take a bit of a look myself at the idea, however I have less programming experience than yourself. One thing to mention is that FrEee is an open source remake of SEIV in development, and Star Ruler 2 is open source as well, which I briefly looked at to try and understand how the systems work. You can download the code from Github and peruse it to learn how they made those games work, although Star Ruler 2 is probably a better place to start.

I think the important part is first understanding and writing out how your game mechanics will operate so you can code it. Personally the first thing I want to figure out is map generation in UE, as I have an idea of the mechanics but I want to focus my learning a bit. From what I've heard Unreal is good for coding for beginners, but I'm not sure how well the engine works for 4x games.
Last edited by omzh; Apr 17, 2020 @ 8:20pm
Ail Apr 18, 2020 @ 6:07am 
Thanks for the hints on the ressources, I will check them out.

@omzh: Yes, I definitely want to think and write out all the game-mechanics prior to coding. I think I'll probably just write them out right here to see what other are thinking.

When I was in bed before I fell asleep, I've thinking about it quite a bit already so I want to share what I've come up with so far:

There will be 4 ressources:
Food, which is used to colonize and maintain planets
Minerals, which are used to produce and maintain ships
Research Points, which are used to develop and maintain(!) technologies
Victory Points, which need a cooler name and do nothing but determine who wins the game

Your home-planet produces 2 of each.
Subsequent planets need to be specialized for one of those ressources and will produce 3 each as a base. Planet type determines one of the ressources to have a bonus if you specialize for that.

Colonizing a planet requires you to have a ship in orbit and pay 5 food. It takes 5 turns for the colony to be set up. Removing the ship will cancel all progress and makes you lose your food-investment.
Changing the specialization of a planet will result in it doing nothing for 5 turns before it adapts it's new specialization, so it really is something you don't usually want to do.
Each planet you own costs 1 food maintainance per turn. If you can't maintain all planets you will be forced to abandon as many as it takes until you can again.

In order to produce ships, a planet needs a star-port. Your home-planet has a free star-port. Setting up a new star-port on another planet requires ships to orbit it, 5 minerals and takes 5 turns to set up. Same thing as with colonization applies when it comes to removing the ship.
The star-port costs 1 mineral maintainance per turn, so you won't want to have one everywhere and instead need to place them strategically near your front-lines.

Currently I'm thinking of having 5 basic ship-types:
Explorer, 1 base-strength, twice the range of other ships, main purpose colonization and harassment
Corvette, 1 base-strength, twice the speed of other ships, main purpose harassment and colonization
Carrier, 2 base-strength, +100% combat-bonus against artillery-ship
Artillery-ship, 2 base-strength, +100% combat-bonus against frigates
Frigate, 2 base-strength, +100% combat-bonus against carriers
Each ship has a base-cost of 5 minerals to produce and 1 mineral maintainance
You can produce ships instantly at planets with a starport, if you have the minerals. You can save up minerals to do so but you can't produce more ships then you have minerals per turn to pay for, so stockpiling too much won't let you create a mega-fleet and you are encouraged to always have some ships.
You can abandon ships to free up maintainance.
Tech will allow for bigger versions of each comabt-ship-type that are more cost-efficient than the previous tier: e.g. 2xbase-strength+1 for 10/2, 3xbase-strength+3 for 15/3 and so on

There will be a few technologies that each give a bonus to one of the existing-mechanics. A basic technology costs 5 RP to research and 1 RP/turn to maintain. The next tier of the same technology will give the same bonus but cost 10 RP and 2 RP/turn ontop of the basic technology and so on. So you are discouraged from specializing too much.

Here's some of the effects that I want technologies to exist for:
+1 output for all planets with the same type of exploitation-specialization
+1 output for all planets of a specific type, regardless of exploitation
+1 range for all ships
+1 base-combat-strength for all ships
+2 base-combat-strength for a specific type
+1 hull-size for a specific type
I particularly don't want to have speed-technologies, though as I know that this turns the metagame into a mess once you can get everywhere immediately due to high speeds and would devalue the roles of corvettes and star-ports.

You'll have to find the best compromise between building on your strengths and reducing your weaknesses.
You can abandon techs to free up the RP-maintainance they cost but would need to research them again to get them back.
You can trade techs with others and that will actually swap who has what instead of both having both.
I'm not sure if I will limit tech-choices in some way or if everyone has access to everything.

War:
When you are at war with someone else, having a ship in their orbit will destroy an existing star-port and blockade that planet. That means it won't produce it's usual benefits and cannot change specialization. Having a ship there also allows you to invade a planet. That costs 5 food and 5 minerals (think of that as population with weapons) and takes 5 turns in which at least 1 ship of your fleet must remain present or you'll lose the progress and the investment.
I'm thinking of a fortress-specialization for planets, which makes it immune to invasion and starport-destruction at the cost of the planet not doing anything else.

When you engage an enemy fleet, you can always choose to retreat. Both sides make that decision at the same time, so they can end up both retreating. If neither side retreats, combat takes place.
In combat every ship picks their targets. Bigger ships can target one ship for each tier. Type-advantage-bonuses apply.
This is repeated until one side has no ships left. (I think it won't take more than 2 rounds, though) Combat can also end up in both sides being destroyed... which helps the defender, as this is enough to prevent invasions.

Victory is obtained when someone has more than double the victory-points of their strongest contender and at least 3xgalaxy-size VPs. For example, in a 50 star-galaxy you need 150 VPs while noone else has more than 75 VPs. This will have a huge impact on how everyone interacts with each other. For example: Someone who had a rough start will probably not go for any VPs at all and just try to position themselves better economically, while bigger empires can afford to have part of their planets produce VPs and compete directly against the biggest other VP-producer. You might also be forced to switch some of your planets to VPs if someone else threatens to win that way. You may also try to ignore VPs completely and take out others before they can win that way. I think that this creates an interesting dynamic.

Diplomacy will have 3 stances towards others: War, Neutral, Alliance
War means you block enemy colonies when your ships are there
Neutral means your ships can hang around enemy colonies without impacting them and won't engage in combat with them
Alliance means that the planets of your ally extend your range
cancelling an alliance will force you to retreat each ship outside of your range to your closest planet
You'll also be able to swap technologies and trade ressources directly

I want two options for the AI, besides of difficulty: Competetive and In-character. The competetive option tries to make the best out of the circumstances and play with more awareness of the victory-condition. The in-character option will just try to play along their factions advantages and leader-traits.

Lower-difficulty-level will be: Player gets bonuses
Higher-difficulty-levels will be: AI get bonuses

I might need to up/down-scale all the costs and production-values of things in order to smooth the difference between difficulty-levels. Having a bonus of +1 when the base is 3 might be a bit too much. And I really want to avoid using floating-point-values for anything so the math can be easily understood and calculated in your head.

I currently don't want any rubberbanding- and anti-ICS(infinite colony sprawl) mechanics as I first want to see how it plays out without them.

The idea that things that take 5 turns to complete is in relation to what I expect the travel-times to be. I might tweak it slightly.

For other game settings, I'm thinking of really limiting them to enemy-factions and galaxy size as I feel that too many options may just make it harder to make a decent AI.

Factions: I think having a faction each with a bonus for one of the things (basically like having a maintainance-free-tech) in the game makes sense. Of course a lore explanation as for why a faction is good at what it is good at, will need to be fabricated.
Last edited by Ail; Apr 18, 2020 @ 6:17am
Ail Apr 18, 2020 @ 6:11am 
Originally posted by Nasarog:
Interesting. I can get you in touch with a few of the smaller devs I know that might be able to help. Interested?
Yes. Now that I typed out how I envision the game-mechanics, I will try to go through the Unity-tutorials as a next step and then see whether I feel I need guidance with something in particular.
Nasarog Apr 18, 2020 @ 7:24am 
Originally posted by Ail:
Originally posted by Nasarog:
Interesting. I can get you in touch with a few of the smaller devs I know that might be able to help. Interested?
Yes. Now that I typed out how I envision the game-mechanics, I will try to go through the Unity-tutorials as a next step and then see whether I feel I need guidance with something in particular.

Let me know.
Mezmorki Apr 18, 2020 @ 10:37am 
Ail - I've been working on a design for a few years now. Most of the time has been spent organizing all the mechanics into a comprehensive set of design documents. My sense is that it's important to have most of the major systems worked out "on paper" from an intended gameplay experience before getting to far ahead.

I've also been messing around with a range of game design tools. I had also signed up and got about halfway through a C++ coding course (which is what unity uses) to better understand programming concepts. I've done some light programming in the past (mod scripting for elder scrolls / fallout games) which shares a lot of similar concepts but the syntax isn't applicable.

BlackSmokeDMax Apr 18, 2020 @ 2:05pm 
Originally posted by Mezmorki:
Ail - I've been working on a design for a few years now. Most of the time has been spent organizing all the mechanics into a comprehensive set of design documents. My sense is that it's important to have most of the major systems worked out "on paper" from an intended gameplay experience before getting to far ahead.

I've also been messing around with a range of game design tools. I had also signed up and got about halfway through a C++ coding course (which is what unity uses) to better understand programming concepts. I've done some light programming in the past (mod scripting for elder scrolls / fallout games) which shares a lot of similar concepts but the syntax isn't applicable.

C++, are you positive of that? Rimworld is made with Unity, but uses C#


Mezmorki Apr 18, 2020 @ 5:27pm 
Oh yeah, maybe C# is right.
Tragic Apr 19, 2020 @ 3:03pm 
There is a lot of resources around for making a RTS game of some kind. I can not think of any examples, but I know that when I was looking at books to learn programming there was a number of RTS game books that start you from nothing to having a working RTS game. So that might be a good place to start.

As for C++.... that is really an archaic language imo. I mean it is powerful, but also tricky. Pointers and manually handling the stack is just a massive arse pain. C# is a zillion times easier and nearly as powerful. Unfortunately Unreal dose not use it. Unity uses C# though.

I have been playing in HAXE recently to make my newest game and been very happy with it. HAXE is a object programming language that is kinda like C#, but even more flexible, not a loose as LUA .. sorta inbetween. What is great about it is that it can target other languages in the compile. So you can program in HAXE and then target C++ or Python or pretty much anything. Making your code universal across any platform. There are some performance hits from that, but nothing that can not be eaten by modern computering power. If you are making a engine that need every ounce of power in a modern computer you would already be a expert in programming!
BobbyBullets Apr 19, 2020 @ 5:10pm 
Ray Fowler might be a good contact, as would Steve Hawkins of Alliance of the Sacred Suns. Both of which I could get you in touch with.

I will say that Unity's tutorial system is very in-depth and a very good resource.
Vuyek Apr 19, 2020 @ 8:37pm 
Take a look at Godot
https://www.youtube.com/results?search_query=godot
I am not sure that this engine would work for a 4X game, though...
but I am fascinated by it. Uses python and/or C# I think.....
Tragic Apr 19, 2020 @ 9:01pm 
Godot is a cool one, but under developed. I think I would recommend it for learning gamedev, but not for anything practical. The simple fact is that Unity and Unreal do everything it does and more and way way better and have much large tool repository and user base to get help.

That being said Godot will be huge in time would be my bet. Kind of like how Blender went from a pile of shit, to a curiosity to a serious contender.

There are lot of awesome engines though.. engines are the new craze. There are some really neat ones that work very well but are focused instead of "everything and the kitchen sink" godot/unity/unreal style. For example my last game was done in Duality, which is a c# engine designed just for 2D stuff. Cutting all the other crap out is really cool. Kinda like writing in Focus or Zen Write
Last edited by Tragic; Apr 19, 2020 @ 9:05pm
Emperator Orionii Apr 20, 2020 @ 1:30am 
About the game design:
0. Stick to a small scale, that's a good decision and don't forget it down the road.

1. Play 10 Min Space Starategy from http://goblinlunatics.blogspot.com/. It's a quick and minimalist turn-based 4X but not yet another GalCon. They have a total of 3 ship types where only one actually fights other ships and achieve quite a good level of variation by messing around with bonuses. Technology improvements are simple upgrades to aspects of the game but spiced up with combos where if you have high enough levels in two fields you unlock something special. Like +1 speed when starting from own planet. Speaking of which, speed is basically constant throughout the game, tech only extends directly the range but not speed. There are some combos that can give you a situational speed bonus. It works well so I'd say you are on the right track to limit ship speed in your game :).

2. Write down your design doc somewhere where you can edit it (unlike random a post on the forum). Word document or Google doc if you want to share.

About implementation:
C# is the programming language I've worked so far so I recommend it wholeheartedly. Strict typing and documentation on hover (at least in Visual Studio) are huge productivity boosters in the long run. Don't get lured by loosely typed languages, they'll get you small stuff (less than a screen of the code) fast but won't scale. I also suggest you pick an engine instead of rolling your own. Making your own will give you a lot of flexibility but you'll have to labor 3+ months before getting to the game logic. Unity if urghhh in my opinion but at least it solves graphics, sound and UI for you and comes with C# scripting. I have no experience with Godot since they got C# support but I'm under the impression it is more or less a Unity clone. I have seen some GitHub repos for TBS game engines but I haven't tried any of them...

If you pick Unity engine (and the same is probably true for all other game engines) you'll have to write some of the boilerplate code of your own. Kind of an engine for your particular game, stuff like a translation of game logic objects to Unity scene object, save/load system and what parts of game logic get updated when. I suggest you learn about software architecture before starting for real. Model-view-controller architecture serves me very well in my Stareater project so naturally I recommend you the same.

You already worked with Jeff, Brent and me so you are welcome to ping us. Jeff is constantly online at DG discord, Brent and I are there for most of the days.
Ail Apr 20, 2020 @ 9:07am 
Thanks for the replies, everyone! :)

I'm 10 parts into a 15-part Unity-tutorial-series on YouTube and feel that I have a basic idea of most of the concepts that I need for what I'm intending to do. I think a few more episodes and I'll have everything.

It's kinda funny how I know eventually understand the concepts that I've never really understood when I was working on DG. I really was like: Give me my C#-scripts and leave me alone with anything related to the engine!

While I've mostly worked with C++, the brief experience I had with C# convinced me that I like it much more. There really wasn't anything that I wanted to do that wasn't at least as easy or even easier to do than it would have been in C++.

I've also watched a video about the advantages of Godot, so it seems like a good alternative which potentially could be even better for my purposes. But I think Unity can't be "wrong" either, as it's widely popular and I know a lot of games that are based on it. I also know that UE4 would have been the wrong choice as doing "non-shooter-stuff", while possible, isn't really the core and debugging supposedely is more difficult.

I'm gonna give "10 Min Space Strategy" a try. Btw. I had recreated an ASCII-version of GalCon in the past. It had exploration (you wouldn't know who the owner of a system is until you visit it), diplomacy, trading, relatively good AI and the way to control it was actually a lot faster than the original UI with clicking stuff. You would just type the amount of ships, #of the destination-planet and #of the target-planet. So you could play it all with the num-pad.
Each Star was just a number with the amount of ships in brackets and the owner was color-coded. But yeah, GalCon was a bit too simple for my taste. However, it really delivered in the aspect of how I liked engagaging ship-management.

My basic idea is merging two games that I really like: Through the ages and Moo. I love the "you can't have everything"-economic-system of TTA, that constantly forces you to make compromises between what you'd want and what you can realistically have. However, it lacks the whole spatial-aspect of things having a location relative to each other and military is completely one-dimensional in this game.

Another aspect that I haven't spoken about is the direction of artstyle I could go. Something realistic-looking is out of question. I also don't want Pixel-Art. I'm actually kinda tempted to go into an anime-style-direction. Mostly because that's what I feel comfortable drawing myself and that wouldn't look like shit. Question is, if this wouldn't be considered as too appalling to some folks. :D

Also: While I haven't decided on a final name, after some thinking back and forth, I came up with "ExoTerra", which I feel is a reasonable compromise between "not sounding too generic", "not sounding too convoluted", "being somewhat descriptive of what kind of genre it is" and, most importantly, "not being already taken by another game" (it is taken by a manufacturer of Terrarium-Equipment though, but with a "-" between Exo and Terra)
< >
Showing 1-15 of 83 comments
Per page: 1530 50