Compare commits

..

3 commits

2 changed files with 37 additions and 2 deletions

View file

@ -1,5 +1,40 @@
# My own SpaceSim written in Java
pretty self-explanatory idk what else to write...
<div align="center">
# My own SpaceSim written in Java!
</div>
<div align="center">
# Preview:
</div>
<img
alt="image"
src="https://git.dvorakmortonxd.dev/dvorakmortonxd/space-sim/raw/branch/main/src/main/resources/preview.png"
style="width: 100%; max-width: 1280px; aspect-ratio: 14 / 9; object-fit: contain; height: auto;"
/>
# This is my work-in-progress game about space, it currently includes:
- Main menu with cool hovering effects (like the planet hovering and it highlighting when you hover your cursor on it)
- a rocket detaching and landing animation on the ZX311 planet
- an observatory and a walkable land on the ZX311
- neat and buttery smooth movement
- thats about it. I plan to add more stuff to the planet and a way to travel to more planets but I'm gonna need more time for that :)
# Why did I make this?
Well I've always liked space games (especially galacticraft and ad astra modpacks in minecraft) and I thought it would keep me going on making a game about it, I also thought it would pretty much fit into this weeks theme ("Outside") on Terra, so I just went for it! also I wanted to learn to make games in java since one of my favourite games (minecraft) is written in Java and I wanted to learn java for a long time, also it would help me in school since right now we are doing C# in school which has a really similar syntax to java :)
# How do I play? what are the controls for the game?
Well it is pretty basic, the main menu is just click and go so basically you only use your mouse cursor there, and until the rocket lands there aren't any other controls except the debug ones (I'll mention them at the end of this section), and when you land, theres only the basic WASD movement (however the W/S keys are used mainly for doors and stuff, since you cant really walk forward/backward on a 2d window lol) and space to jump (this one is self-explanatory). Now to the debug keys, if you opened this game in a terminal, then you can use the Control key (Ctrl) to get the players X and Y position (though it says the upper left corner of the players sprite since that's where it renders), and also this one you can use whenever but the Slash key (/) will skip the rocket's animation and will skip you to all the way to the part where you land so you can move immidiently (this will work anywhere so it's not really just the skip, it's basically a teleport to landing site and activates player movement).
# How do I install/run this?
well you need any java 21 runtime (like temurin-21 or openjdk-21-jre) and then you just gotta install the .jar file from the [releases page](https://git.dvorakmortonxd.dev/dvorakmortonxd/space-sim/releases) , ORRR.. if you are on a MacOS, I included the .dmg build with an integrated runtime meaning you can just install that one and it'll run without any other requirements! I also have linux .tar.gz builds on earlier versions however I built this one while on vacation so I can't really build it for linux without any access to my desktop at home, and I can't build a windows .exe executables since I don't use windows at all, sorry :(
## how was this made?
I made it using Java 21 and the Swing library and Java's 2D Graphics :)
# Thank you for playing/reviewing this project! below theres a few credits I thought made sense
## docs I'd like to keep close
Swing tutorial (Oracle): https://docs.oracle.com/javase/tutorial/uiswing/ JFrame, JPanel, key listeners, timers, etc.

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB