Generating maps in OpenRA
As some of you may know, this is my final year at the NHL. No, not the hockey league, the university! I’m happy they allowed me to work on a graduation project I’m really excited about, and with real practical value. As you may have read in the title, I’m working on generating maps in OpenRA.
Generating maps?
Yes! Remember Tiberian Sun? It allowed you to play a “random map”, where you could let the game create a new map for each skirmish game you played. Now it turns out the OpenRA team is slowly creeping closer to its Tiberian Sun and Red Alert 2 mods being ready, but one thing that hasn’t been worked on yet is this feature. And let’s be honest, who wants to play the same maps all the time?
So when my previous map generation related project didn’t work out, I decided to become more practical and take on this project, which my teachers agreed with. I spoke about it on OpenRA’s IRC channel and the developers have been very welcoming, some people already being thankful that I want to work on this. So yay!
Status
As of now I already have basic generation working. Features:
- Random player spawn points (though with a minimal distance between players)
- Creates an X number of resource fields around each player’s base, each with the same size
- Creates an X number of random resource fields around the map, away from players’ bases, each with the same size
- Works on Red Alert, Tiberian Dawn, and the Tiberian Sun developer stub
You can check my progress (in real time!) here.
Sample screenshot of tiny generated map with 5 players:
And some bots playing on it:
Research & stuff
So obviously I’m not just here to build something I think is cool, but to build something that fits with what most OpenRA players want. And for that I need you!
I’ve decided to focus my research on two things: Map balance and how interesting the map is. The idea is I start generating playable prototypes every few weeks, and I let some players play them and judge the generated maps based on those things. Then I get feedback on what to change to get closer to my goal, and I use that to work on the next iteration.
The end result is we learn how to make map generation that creates both balanced and fun to play maps. Like Age of Empires II does, in the context of the pretty big OpenRA open source project.
What’s missing
Here’s some of the bigger OpenRA map features that aren’t in yet, but which ideally would all be working eventually:
- gems / blue tiberium
- debris tiles
- trees, foilage et al.
- roads
- lakes
- rivers
- river crossings
- towns
- cliffs(RA1, TD)
- cliffs(TS, with actual height differences)
- height differences(TS)
There’s also other matters like creating balanced spawn points, and how maps will be usable and how paramaters will be editable that still need to be worked on.
The path forward
So next to adding missing features, I need to start getting a feedback loop up with players. This blog post is a part of that. Also, within a few weeks you can expect the first prototype. It’ll probably let you generate maps in the map editor or in skirmish. I hope some of you will be interested in trying it out and will have things to say on what can be improved at that point.
Contact me!
If you have any suggestions and comments, don’t hesitate to talk to me about it. You can (maybe) catch me on OpenRA IRC as tmsbrg, or you could talk to me on my newly made twitter account or via e-mail(check my contact information at the bottom of the page). I’ll also be posting some updates on Twitter including whenever I make a new blog post, so if you’re interested you can follow me there.