r/java 2d ago

I developed an Android RTS game in Java

https://www.youtube.com/watch?v=k1GLmnUOrz0

Hello! After 6 years of development, I am happy to finally release of Norse Expansion Medieval RTS for Android! You can get it on Google Play: https://play.google.com/store/apps/details?id=com.norseexpansion.norseexpansion

It only took about 240k lines of code, almost all Java (and some C++ for an Audioengine). Graphics are rendered in OpenGL.

This project made me love Java and hate the surrounding technology like gradle and Androidstudio.

154 Upvotes

40 comments sorted by

24

u/gufranthakur 2d ago

Where do I even begin, simply amazing. 6 years of development is really something for a game, game devs are really built different haha.

The game looks good, it sucks I can't try it because I dont own an Android. But this is genuinely impressive, and lovely

14

u/gottlikeKarthos 2d ago

Thanks for the kind words! We dont do things because they are easy, we do them because we thought it would be easy lmao. After 2 years I thought I was almost done haha. You could in theory play it on PC using Play Games Desktop but maybe I will do a iOS/ Steam version in the future if the game does well enough to justify that. Thx again, cheers!

2

u/gufranthakur 2d ago

sadly I also use a mac, or else I would have used bluestacks to play the game

10

u/A_random_zy 2d ago

Gradle is something I hate with a burning passion. There is so many incompatibility BS with gradle.

Maven just works. Doesn't matter which maven version, Doesn't matter which java version, Doesn't matter pom version etc etc. It just works. Only 1 time when I needed a special maven version due to some issue in an obscure java 8 framework which would only compile on 1 version of maven.

Anyways downloaded it. Will try and let you know. Any way to support you if I like it? I see that the game ks free...

4

u/gottlikeKarthos 2d ago

Absolutely lol, I had so many gradle issues especially after upgrading the IDE and it was hard to find out the fix. And I dont want to become a gradle wizard like a lot of people on reddit seemingly are, I just wanted to make the game lol

Thanks for playing, there are cheats and custom battles to unlock for a few bucks if you want to support. I will also make some new content and fix some minor bugs that came up in the coming days. Hope its fun, cheers!

2

u/Known-Volume1509 1d ago edited 1d ago

GP's comment is not true though. (And congrats on your game, man!)

Gradle has been evaluated by Google more than 10 years ago together with Maven and Ant, and they decided to go with Gradle. Maven has a fixed lifecycle that does not match the Android multi-configuration, multi-build variant output requirements. Gradle with its task-based model and caching per task is actually much more flexible for Android builds. In general if you would replace Gradle with Maven for Android builds, I recon your builds would be slower, not faster.

I mean where do people even get this urban legends that Maven is faster than Gradle? Is it clear enough that to build your project you need the Google Android plugin for Gradle, that here is kapt that processes annotations, then you needs resource merging with AAPT and so on. How much of this slowness is really due to the build tool, so Gradle in this case?

I use Gradle at work every day but for non-Android stuff. I'm not forced to use it, I chose it because it is magnitutedes faster than Maven for my multi-project builds.

2

u/gottlikeKarthos 1d ago

Thanks, and interesting knowledge drop! Honestly recently gradle has been working pretty well for me (apart from the caches folder always becoming gigantic), but I've been intentionally putting off upgrading Androidstudio lol. I guess at the end of the day every technology comes with its own headaches lol, we can be glad it works most of the time.

3

u/chabala 2d ago

I've heard one can build Android apps with Maven, but working examples are hard to find. Feels like spending innovation tokens on getting an Android build working in Maven might be counterproductive if it's not really supported and will need continual tweaking, but avoiding Gradle is very enticing.

Really just want someone in the Android project to announce 'you know what, modern Maven is fast and stable and we're ditching Gradle to go back to that'.

2

u/DanLynch 2d ago

I don't think Android ever officially supported Maven: they went directly from Ant to Gradle. But there was an unofficial Android Maven plugin back in the day, and it was very popular before the coming of Android Studio and the Android Gradle Plugin.

0

u/pjmlp 1d ago

Gradle is only around thanks to their deal with Android, it would have faded into irrelevance alongside Grails otherwise.

5

u/Decent-Decision-9028 2d ago

okay the real question is when are you going to open source it ;)

21

u/gottlikeKarthos 2d ago

On my deathbed or if I win the lottery lol. I would probably get flamed pretty hard for some of the coding antipatterns I used lol, some of the code is pretty spaghetti, I started this project to learn to code and it shows xD But hey if it works it works

4

u/Decent-Decision-9028 2d ago edited 1d ago

I don’t blame you, I don’t know why you got many downvotes for that! By the way this is coming from someone who opened sourced his website and the two tools behind it. Eventually it worked out!

3

u/gottlikeKarthos 2d ago

Haha thanks, and wow impressive, did it oss attract more customers or land you new jobs or how did that work?

4

u/Decent-Decision-9028 2d ago

Got a sponsorship and eventually transferred ownership. I already had a job at that time, so yeah it worked out well!

2

u/gottlikeKarthos 2d ago

Ah sweet, nice success story!

3

u/-HumanResources- 2d ago

Don't worry dude. Most games code is spaghetti haha.

2

u/scadgek 1d ago

It works if it works indeed, you'd be surprised at the amount of spaghetti code that people write even in the most serious projects. Don't be shy to share, this is the best learning opportunity if you can filter out the noise. 

3

u/jubbajubbjubb 2d ago

Congratulations!!! Java gamedev is some other kind of beast. 

It sounds like you made your own engine? Or did you use libraries? I’m in the middle of my own experimenting, just to see how far I can take Java. 

How much did you find yourself fighting or working with the Garbage Collector? Or is the scale of your program still comfortably within bounds? Ive heard arguments that Java can be tough to work in with explicit memory management requiring some outside the box thinking. 

I guess I'm asking if you’ve modeled data as many objects or as primitives and how your direction panned out after 250k lines of code. 

If you do release steam, let us know! I’d love to support and give it a go 

0

u/uyvhtvuyg 1d ago

!remind me in 8 hours

1

u/RemindMeBot 1d ago

I will be messaging you in 8 hours on 2026-09-01 03:37:34 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.

RemindMeBot is switching to username summons. Instead of !RemindMe 1 day, use u/RemindMeBot 1 day. More info.


Info Custom Your Reminders Feedback

2

u/kubelke 2d ago

looks great, unfortunately I don't have any Android device :(

2

u/gottlikeKarthos 2d ago

Thanks and sorry :/ I hope I can do an iOS and maybe even Steam version in the future. You could in theory play it on PC using Google Play Desktop perhaps. Thanks for interest, cheers!

2

u/blinkOneEightyBewb 2d ago

Looks dope will try tonight

2

u/davidalayachew 2d ago

Excellent work. Playing it now.

2

u/Minecraftian14 1d ago

How big is the building area? Can one place walls however they want?

2

u/gottlikeKarthos 1d ago

Yeah players can place everything as they want and without annoying things like wait timers (once walls are unlocked after the first tutorial levels).

The biggest maps are like 96x96 tiles big, but I might go up to 120x120 or higher for some future levels I'll add. Thanks to switching to OpenGL the FPS are not bad even with such huge maps, only cheapest phones may struggle a bit

2

u/Zalenka 1d ago

what did you use for the graphics framework?

2

u/gottlikeKarthos 1d ago

OpenGL ES 2.0, I went with basic Android canvas for years but performance just wasn't great, with OpenGL FPS like quintupled. But I have to admit that I am a total noob at OpenGL, AI coding tools were extremely useful to convert the old drawing code to the new technology.

2

u/pjmlp 1d ago

Congratulations on releasing the game and the programming language decision.

1

u/gottlikeKarthos 1d ago

Thanks! Yeah writing this much code in Java kind of ruined other programming languages for me, at least those that dont have strictly declared variable types lol

2

u/Warwipf2 1d ago

Wow that's cool as fuck. One MAJOR problem here though... what are you gonna do when you want to release an expansion to the game? Is it gonna be a Norse Expansion expansion?? I would scrap the entire project and restart under a different name.

3

u/gottlikeKarthos 1d ago

Omg you're right

Norse Expansion 2 Electric Boogaloo

2

u/International_Break2 1d ago

Please post an update when this is on steam.

1

u/Visual_Brain8809 1d ago

Based on the description of it being easy to migrate to PC, when will you have it ready?

1

u/gottlikeKarthos 1d ago

Haven't looked too far into how easy it would be to migrate this to PC, I think an iOS port is even more requested right now. But it would be cool to get a Steam version out there too for sure, even though I feel like there is a lot more good competition on PC.

Right now I'm focusing on polishing the current version, I got a lot of feedback to work through. But especially with future coding agents porting to more platforms should hopefully be feasible. Until then you could in theory play it on PC using Play Games Desktop, but dedicated PC controls would of course play better

1

u/taftster 1d ago

Gradle does suck. But what an amazing accomplishment!

-8

u/bendem 2d ago

Contains ads, in app purchases. Guess I'll pass.

16

u/gottlikeKarthos 2d ago

To each their own, I feel like I went with the fairest sort of monetization possible. The in app purchases are small addons that are in no way required, and removing the ads is a cheap purchase too. This way people from poor countries can enjoy the game for free and those that want to support can do so. Its not like i added p2w or annoying wait timer mechanics.

7

u/TisOS_ 2d ago

You won't please everybody. Take it easy, you made a generous offer with the way of monetization.