#Super Space Miner 2000 (space engineers 2 killer)

87 messages · Page 1 of 1 (latest)

minor mica
#

Hi! makin a thread to show off my psx space engineers inspired game ive been working on for 5-6 months now. I have a lot of expirence with game development in unity, but this is basically my first time making a game from scratch like this. I have no idea what I'm doing but I have made a ton of progress.

The Goal:
Combine the engineering, building, and freedom of space engineers with the progression, exploration, and elegance of games like astroneer, subnautica, and factorio, and then top it all off with a charming PSX y2k aesthetic. Is that unbelievably ambitious? Absolutely. But the fun part is the journey, right?

Tech:

  • C++ for core engine
  • Vulkan for rendering
  • Lua for loading prototypes and stuff
  • STB for image loading and https://github.com/SRombauts/SimplexNoise
  • Custom simple .obj model loader
  • Custom collision system to handle player movement and raycasting
  • Custom immediate-mode UI system

Features so far:

  • Character with movement, inventory, and crafting
  • Dynamic terrain generated using marching cubes, and can be mined by the player
  • Voxel-based block building on moving, dynamic objects. They can be ridden and flown around.
  • Blocks that can have states and functionality. They can contain items and perform processes.
  • Basic voxel separation algorithm that can detect and split apart constructions when they are no longer connected
  • Connected block textures (eat your heart out, vanilla minecraft)

https://www.youtube.com/watch?v=7bUl99-V8xA&feature=youtu.be

silver prawn
#

Welcome to the bikeshed

ashen basin
#

Deccer was it you who said you didn't like the font in Space Engineers or was that my coworker

#

I've always struggled to enjoy space engineers and I remember talking to someone else who agreed and said personally they thought it was entirely because of the font used in the game which I found hilarious

silver prawn
#

i did

ashen basin
#

Haha

silver prawn
#

: > that font is horrendous

ashen basin
#

Anyways where pictures

#

We demand videos and screenshots

minor mica
#

i ran into a terrible bug lol

silver prawn
#

how convenient 😄

silver prawn
#

damn

#

i did not expect this cool thing

#

this is awesome : )

minor mica
#

thanks!

noble solstice
#

very cool

minor mica
silver prawn
#

i like!

minor mica
#

im in physics hell

#

started to implement jolt and its so much work

ashen basin
#

Hm it shouldn't be

#

I guess because of your custom geometry

#

That does tend to put a lot of the burden on the user (you)

minor mica
#

just getting some physics in there was fine (if a little bit more work than expected) but getting it to integrate with everything is so annoying

ashen basin
#

Yeah you do sort of need to build the game around the physics engine

minor mica
#

jolt has so many "no-nos" that are just a pain

#

like you can't have a physics object without any mass

ashen basin
#

My physics.cpp is 1200 loc or so I guess a bit longer than I remembered

#

You can have kinematic bodies

#

Obviously not dynamic ones

#

A dynamic body with zero mass wouldn't make sense lol it would have infinite velocity at all times

minor mica
#

so if a spaceship just happens to not have any blocks on it it complains

#

which is like

#

I dont care, I just want it to skip

#

but you can't even create the body unless it has blocks on it

ashen basin
#

How can a spaceship have zero blocks and still exist

#

Just have the first block be the start of the body

minor mica
minor mica
#

anyway I just overrode the mass properties when its got no blocks

#

eventually it will use a custom shape anyway so

#

overall is fine I actually enjoy jolt and how much customization I get. But its never fun to have hours and hours of very little tangible progress

#

i desperatly want to get back to adding features

ashen basin
#

Ah yeah it definitely took me a week or so to get it integrated

minor mica
#

its also sad removing all of my hard-earned custom physics code… perhaps one day

ashen basin
#

You'll likely end up using some of it as a custom collision resolution or broadphase or something

minor mica
#

not much of it, it was mostly intersections between primitves

#

raycasting and such

ashen basin
#

Keep it around you might be surprised, I still have my own raycasting specialization in Jolt for certain purposes

minor mica
#

im not deleting it for sure

minor mica
#
JPH::RayCast raycast(Physics::toJoltVec(ray.origin),Physics::toJoltVec(ray.direction * dist));
            JPH::RayCastResult result;

            BroadPhaseLayerFilter broadFilter(BroadPhaseLayerTable{true,true,true}); // two new custom classes
            ObjectLayerFilter filter(ObjectLayerTable{true,true,false,false}); //that are annoying as fuck to use because you can't copy them for some reason

            // what the hell is the point of JPH::RayCast if I can't use it to raycast??
            physics_system.GetNarrowPhaseQuery().CastRay((JPH::RRayCast)raycast,result,broadFilter,filter,JPH::BodyFilter());

            if(result.mFraction < 1.0f) {
                Debug::drawPoint(ray.origin + ray.direction * result.mFraction);
                return std::nullopt;
            }

            return std::nullopt;

so much pain just for raycasting. Why did that take an hour

minor mica
#

finally got to what I wanted to get to!

#

terrain collisions sped up massively, using voxel data to vastly reduce tests

#

need to optimize the ship collisions, currently its just a bunch of cube colliders. But its not bad!

#

I might redo my post bc it has just text in the front

minor mica
#

i should probably find a less laggy way to record

#

i promise in game its super smooth!

minor mica
minor mica
steady dragon
#

Ooh hey this looks cool

#

You should call it 10X Space Engineer KEKW

minor mica
#

10X?

steady dragon
#

A 10X engineer is a really dumb term people use to refer to really productive engineers/coders that kinda turned into a meme

minor mica
#

my game is 10X cooler than space engineers sunglas

minor mica
#

shadows! not a perfect implementation, but pretty cool! very limited distance and a few quirks to work out but

#

its a huge improvement to the visuals I think

steady dragon
#

What technique are you using for shadows?

mighty tree
#

What is that red square in the top left corner?

minor mica
#

the shadowmap

#

its basically a depthmap from the lights perspective

minor mica
silver prawn
#

if the red is disturbing you, you could VkCompoonentSchwizzle ze red to .rrrr

minor mica
#

messing around with dithering

#

nvmd compression totally fucks it lol

minor mica
silver prawn
#

why is your sliding movement so jolty?

#

just a fragment from recording?

steady dragon
minor mica
#

I think ive just gotten used to it lol so I forget

#

its got something to do with the physics tick being different from the frame draws but I haven't had the chance to implement some sort of interpolation

silver prawn
#

ah i thought it might be your update tick