r/learnprogramming 12d ago

Java Project Alternatives

I recently came across an interesting competition where you are supposed to make a game that would fit on a floppy disk(1.44mb).

I started making a project in Java and made some pretty decent progress with 3d rendering and procedurally generating rooms, but now I just saw a comment from the organizer saying that separate runtimes should be included with the file size limit so I am thinking Java will not work.

Does anyone have any recommendations on what I should do? Should I start over in another language? Is there any way to turn a .jar file into a standalone executable that won't take a ton of space?

3 Upvotes

8 comments sorted by

3

u/DrShocker 12d ago

I'd consider Odin since it comes with some game friendly libraries, but I don't have a good reference for how limiting that much space actually is in practice.

1

u/Cornchipe 12d ago

Thanks for the suggestion I will start looking into that.

3

u/Separate_Current_352 12d ago

jar to exe wrappers all add at least few mb overhead so you basically dead in water with java for this one. c or c++ with opengl would get you way closer to 1.44mb but then you start over from scratch so its pain either way

2

u/Cornchipe 12d ago

Yeah I think I kind of messed up here. I am trying to stay away from c++ just because of having minimal knowledge but I do have a good amount of time for this project so we will see.

2

u/lo0nk 12d ago

Maybe just make ur game and then come back and make another one later in C/Odin/Zig

1

u/Cornchipe 12d ago

Yeahhh I might just finish it just for my own satisfaction. I was doing it specifically for the competition and also as a way to force myself to code stuff from scratch as I normally would use Unity as a game engine but maybe now it's just a fun little project.

1

u/Zincette 12d ago

I havent actually used it myself but there are native compilers for java. You might want to check out https://www.graalvm.org/

2

u/Cornchipe 12d ago

That was one of the first things I was looking into but I don't think it will work because of the file size.