Monday, August 4, 2025

Deformable World Sport

Simongamedev

Stage 0
Deformable World Sport

View Profile


​Good day there! Im Simon, a pupil for Software program Engineering, and I need to create a recreation!

The sport is a inventive expertise constructed from the bottom up.

I’ll develop a customized recreation engine (in C++) particularly for this recreation for the very best efficiency and to deliver a contemporary, distinctive really feel that you just gained’t discover in off-the-shelf engines.

The world is a open, procedurally generated surroundingsa terrain with caves and supplies, to discover, dig, and form.

You’ll play in first-personand you’ll select between single-player or multiplayerletting you construct solo or alongside associates.

The engine behind will probably be primarily based on the marching cubes algorithm, that can make low poly terrain dynamically, physics-driven interplay, supplies placement, and digging on the earth. this provides editable terrains with gameplay-driven terrain modifications.

For the primary few weeks of pre-alpha (v0.0.x_alpha), the sport shall be free to play on-line immediately by means of my web site. Multiplayer is one thing I’m working towards early, so that you would possibly be capable to discover and construct with others.
(The positioning will go dwell as soon as I finalize the sport’s identify and get the precise area — keep tuned!)

I need to construct this not simply with any gamers, however with a group.

I’ll be sharing progress, listening to suggestions, and I’d love to listen to your ideas, concepts, and even loopy characteristic requests.

I’m presently in the course of semester exams (So issues are a bit extra demanding), and progress shall be sluggish at first.

I am going to put up extra often in my private twitter: https://x.com/Simon336470

« Final Edit: July 29, 2025, 01:22:05 AM by SimonGameDev »

Logged

Simongamedev

Stage 0
Deformable World Sport

View Profile


Simply arrange essentially the most fundamental SDL3 renderer.

Logged

Simongamedev

Stage 0
Deformable World Sport

View Profile


I lastly have a sphere primarily based on marching cubes. the sphere simply prompts/deactivates factors on a grid, and the marching cubes algorithm construct the vertices and indices. The lighting is predicated on Flood Fill algorithm, its not good, however its an enormous step ahead.

Logged

Simongamedev

Stage 0
Deformable World Sport

View Profile


I made a decision to simply attempt to calculate lighting stage by the traditional and the sunshine course. that is the very best wanting one to this point. I’ll most likely hold it for a very long time (perhaps I am going to add a bit of of ambient lighting).
Right here I additionally determined to use the lighting stage of the closest “air” vertex, as a substitute of the vertex itself (as a result of the vertex itself already been hit by mild, so naturally the sunshine will falloff a bit), leading to way more higher shading.

(btw, I am new to the this platform, apologies if I put up an excessive amount of. I am nonetheless determining how massive an replace needs to be earlier than sharing right here.)

Logged

Simongamedev

Stage 0
Deformable World Sport

View Profile


Haha, thanks quite a bit – actually recognize it!
And sure, SDFs are a brain-melter at first, however weirdly addictive when you get one thing proper.

Logged

Simongamedev

Stage 0
Deformable World Sport

View Profile


Right now was a rollercoaster.

I began out by implementing a fundamental digicam system – that half went smoother than I anticipated. However I rapidly ran right into a realization: SDL by itself isn’t sufficient for 3D rendering. It’s nice for window/enter dealing with, but it surely doesn’t include a 3D graphics API. So I switched gears and built-in OpenGL. Fortunately, SDL makes it comparatively simple to swap graphics backends with out rewriting the complete rendering pipeline, which is a big plus.

After that, I did terrain rendering utilizing chunks. This turned out to be means trickier than the digicam. I managed to get the chunk system rendering appropriately, however lighting on the edges between chunks nonetheless isn’t fairly proper. Nonetheless engaged on that.

Right here’s a gif of me simply flying around the globe (no physics but, simply free digicam motion):
https://x.com/Simon336470/standing/1946630879553466397

I actually needed to begin on the physics system as we speak, however I ran out of time for as we speak. That’s going to have to attend for an additional session.

I’ve to check for exams this days, so later, hopefully, I’ll have time to do smoother chunk lighting and a few early physics implementation.

Earlier than I begin physics, it is a good time to ask you, let’s imagine you have got a physics physique, and a digicam, how do you “connect” them, like a primary individual controller?
I feel one of many solutions is to implement some sort of relationship element between them to replace each positions. When you’ve got finished one thing like this it will be actually useful to listen to and study.

« Final Edit: July 19, 2025, 11:08:28 AM by SimonGameDev »

Logged

Simongamedev

Stage 0
Deformable World Sport

View Profile


You go, Simon. My coronary heart is at all times open for customized engines 🙂 However significantly:
1. use the aircraft regular for fundamental lighting for a easy step ahead.
2. add a shadow map for bonus factors.
3. render out your map with ortho projection from above as top map – no colors, simply depth.
4. Easy that top map.
5. Use the distinction between the smoothed top and the precise geometry top to darken the ambient time period
6. Revenue: easy realtime sky illumination that darkens the world under timber, or in caves, or below a roof.

To start with, massive thanks Schrompf! At all times comfortable to listen to feedback. Im so comfortable you point out the lighting as a result of (as you’ll be able to clearly see) is the half I wrestle essentially the most with the engine.

The factor is, as a result of I primarily have grid of voxels (or 3D Density Subject), I can do Flood Filling primarily based lighting:
-> Skylight begins from topmost air blocks in every column
-> Floods down and outward into caves and interiors
-> Stops at opaque (excessive density) voxels or attenuates with clear blocks

Sky illumination primarily based on smoothed heightmaps does not seize full 3D complexity, particularly for caves and overhangs. Flood-fill handles interiors higher and aligns with the volumetric nature of voxel worlds. It’s quick, low-cost, and works in all areas.

In fact, I am not throwing the concept out the window, every method has it is execs and cons, and I have never tried sky illumination. I feel combining each strategies (flood-fill + smoothed top AO) may give nice visible outcomes later, particularly for floor shading or stylized look.

Total, I am new to customized engines (and to C++), and I am so bored with lighting, I need to deal with elements that I am good at, simply to hurry issues up (I believed I will be finished with in per week).
My concept is to place the sport up on-line early and develop it over time, and gamers can come and take a look at the brand new updates because it drops. I feel it may very well be enjoyable, evolving expertise for everybody Smiley

Thanks once more, I actually do recognize you taking the time to drop recommendations. Discussions like this are a giant a part of what makes constructing a customized engine so rewarding.

What do you concentrate on this course? I shall be comfortable to listen to Wink

Logged

Mkmilqueto


It is neat to observe a venture of this scope from the start. It will most likely be very arduous to stay with, however I actually hope you do.

Want I may very well be of assist however I do know nothing of 3D rendering or lighting.

Logged

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles