This hell of a week is finally over! And I learned a lot. And I finished a game, for once!
The aim of this week was to complete a game, which is a personnal challenge for me. I've written tons of prototypes in various languages, but never really something playable, with rules, a beginning and an end.
I also wanted to test LibGDX, and to write some Java, because why not? I'm really familiar with C# and .NET, and I wanted to see the other side. I'm surprised how good it was to develop with Intellij Idea and Java. The debugger may not be as good as Visual Studio's to me (but thats probably because I'm too used to it), but it still does an excellent job! Java is full of nice surprises. Doing reflection is really easy, for example. Also, the naming conventions are way clearer than .NET's to me (Where EveryThing Public Is PascalCase... pretty much).
I learned a lot about what makes a game technically : the update-render cycle, how to handle input properly, how to use states to greatly simplify your code, etc. How to planify everything on paper before actually jumping into the code - this bought me a lot of time. Its good to just read your sheet and code without thinking about "what".
It was trickier than I thought to make a "turn-based" game like this. There is a lot you have to do with states and all to do this correctly. As the end of the week was approching, the code became uglier and less organized quickly...
The tools I used:
- IDE: as I said, Intellij Idea (the free Community version). Its pretty good. Navigating in it is a pleasure, with magic shortcuts like Ctrl-N to find a class by name and "double shift" to find... any symbol. It also helps a lot with Gradle (and it went really well to add dependancies with this too! I admit I'm really surprised). And the git integration is quite good!
- Graphics: GIMP and (at first) Paint.NET. I wasn't really fond of GIMP before trying it for this gamejam, and my, its good. I love the modularity of having separate windows for everything. And its super fast and stable! It works really well for (bad) pixel art.
- Texture packing: I used libGDX's tool for this, which you can find here. Apart from some minor defaults (not remembering the path of the tiles), it works pretty good and is fast once your JVM is hot.
- Text editor: for code examples viewing etc, vscode <3
The things I regret:
I took waaay too much time writing the "roguelike engine", and the engine in general. By "engine" I mean displaying a tilemap, sprites on it, having collisions and movement. This took me like... half of the week I believe. I'll check on my commits later. And that is while reusing some code from an old C++ tile based project of mine.
I regret not having time to fully do the localisation... Its the first thing I implemented "just to see", to make the game playable in French and English! But in the end the build shipped is only in english, as I didn't have time to do proper translations of all the hard-coded strings. But once again, it was stuff that didn't needed to be here for a 7DRL, so it doesn't really matter.
I wish I could have implemented other level generation algorithms for the different floors... In the end, everything is cellular automata, as I had a previously working implementation of that in C++. This page lists different stuff you can use to generate levels... ahh, next time!
I also lost a lot of time on pathfinding. I wanted to use the A* (Wikipedia page) search algorithm, as it applies well to roguelikes, being grid-based. But in no way I would have had time to implement A*... I started being depressed about it, until I learned that LibGDX has an implementation of it! And a good one with that. I just had to implement a way to turn my tilemap into a graph, and feed it to that. I found some useful code on the net for that too! In the end, the game has really decent pathfinding imho. (I encountered implementations like this one and couldn't see myself writing something like this...).
I can't draw. I wish I could. But I'll learn eventually! I also didn't want to lose too much time on that... Making content is tough enough!
The things I don't regret at all:
Java. Its really easy to write, really fast to compile (on my machines at least, the main one having a 10yo Xeon CPU and 32gbs of RAM). The language is pretty good for object oriented stuff of course (abstract classes, virtual methods by default...). The reflection is really easy to use, with the .class field. And the standard lib is filled with goodness, such as String.format/System.out.printf, for good old C-like printing <3, tons of containers like HashMap, Deque, etc... Missing a Tuple, but hey its so easy to write yourself.
I missed some of C#'s features like "var" and... thats pretty much it. There is probably a couple of others but I can't remember them right now... I'm really surprised how good Java is (became? I'm too young to tell). I didn't miss the allman style and the naming conventions thats for sure!
To finish, I will say that it was an excellent exercise. It allowed me to test my programming level, my game-making knowledge and taught me how to organise my time, I guess. I will definitely do this again next year, hopefully!
Get 7drl - EldritchRL
Leave a comment
Log in with itch.io to leave a comment.