War of Dungeons banner

War of Dungeons

38 devlogs
50h 4m 12s

an attempt to make a fighting game In C++ using SDL3 with future plans to use openGL for shaders.
The project is still a work in progress. It currently only shows off the biome/terrain generation and movement physics. I plan to turn it into a gam…

an attempt to make a fighting game In C++ using SDL3 with future plans to use openGL for shaders.
The project is still a work in progress. It currently only shows off the biome/terrain generation and movement physics. I plan to turn it into a game in the near future

Demo Repository

Loading README...

Jan Lukasiak

linked the rendering API so I can Issue sprite draw calls from the main loop

Attachment
0
Jan Lukasiak

Got a GPU based sprite batcher to work. currently it is only a debug window

Attachment
0
Jan Lukasiak

played around with the water shader

  • added specular highlights as part of the shader
  • layered some more sine waves to achieve a more natural look
0
Jan Lukasiak

added a water shader, I achieved this by stacking 20 sine waves in the fragment shader, this achieved a nice moving texture when I itterated over the sine waves using a time variable,
next I will try to create a new rendering API that can handle the old renderer and the new shaders

0
Jan Lukasiak

made a shader that modulate alpha of a triangle, I will use this to modulate the brightness of water

0
Jan Lukasiak

fixed a bug with biome blending where tiles arranged in the order:
#@
@#
where @ and # represent individual tile types
would create a weird visual artifact, I managed to fix this with a if statement

Attachment
0
Jan Lukasiak

worked on player movement

  • added a delta time in an equation where it was missing
  • organised the code
  • fixed screen scroll issue where the screen jumped around a bit
0
Jan Lukasiak

what I did

  • Moved the rendering code onto a separate thread
  • Cleaned up the code
  • Separated the code into separate functions

now the game is running on 3 threads in total:
1: chunk generation
2: player movement and miscellaneous
3: rendering

Attachment
0
Jan Lukasiak

devlog to account for the time I lost by having a incorrect folder name. in the time I worked on the incorrect project folder I worked on the tile and biome generation, I also optimised a bit

Attachment
0
Jan Lukasiak

added a beach biome by creating a new threshold and comparing it to the terrain heigh. This ccaused many rendering issues however I was able to resolve them

Attachment
Attachment
0
Jan Lukasiak

Shipped this project!

Hours: 22.02
Cookies: 🍪 400
Multiplier: 18.18 cookies/hr

I made a good base/starting point for my dream game. The biome blending has shown its challenges. I am proud of the auto tiling and the perlin noise procedural terrain generation.

Jan Lukasiak

added a game icon and debugged a bit. also I renamed the project to be different than the project I reused the code from.

Attachment
0
Jan Lukasiak

fixed biome blending (it wasn’t working because some tiles were rendered over the curved bits.) I had to rewrite the code to render the curved bits last

Attachment
Attachment
Attachment
0
Jan Lukasiak

tried debugging biome blending. I tried everything to get this to work added debug statements and rewrote some code multiple times however I was not able to find the issue so far

Attachment
0
Jan Lukasiak

worked on biome blending. I made 4 textures for each corner that the tile can be in. I put this texture inside the originall tileset and added some code to check which tiles are nieghbouring

Attachment
0
Jan Lukasiak

tried fixing biome transitions. In this attempt to get biome blending to work, I separated the darker bits from around the texture and the inside. I wanted to render the “mask” only near water, however, this approach is hard to get to work and is inefficient because of the ammount of needed textures

Attachment
0
Jan Lukasiak

added new tile types using libresprite (free version of asprite) and optimised rendering by not renderigng empty tiles like the ocean

Attachment
0
Jan Lukasiak

added a function to work out player spawn position to be on a piece of land in a deterministic way I did this by adding a random value to the X and Y position until the player was on a full tile

Attachment
0
Jan Lukasiak

worked on player movement and terrain generation. Also added a predictable random number function to get player spawn position. The function uses the seed that the terrain generation uses

Attachment
Attachment
0
Jan Lukasiak

work on more biome generation (stacked multiple perlin noise textures to create values for variables like temperature and humidity. these are used to generate different biome types

Attachment
0
Jan Lukasiak

added multithreading (separe threads for chunk generation and everything else) and I added some new biome types

Attachment
0
cskartikey

Tagged your project as well cooked!

🔥 cskartikey marked your project as well cooked! As a prize for your nicely cooked project, look out for a bonus prize in the mail :)

Jan Lukasiak

started working on biome generation

Attachment
0
Jan Lukasiak

worked on new cave type’s (spagetti and swiss cheese) made a unoptimised function for generating them. Need to do some multithreading

Attachment
0
Jan Lukasiak

debugged the chunk loading and unloading (moved the chunk code away from the rendering loop)

Attachment
0
Jan Lukasiak

added automatic chunk loading when player moves

Attachment
0
Jan Lukasiak

made a function that works out the first and last chunk’s coordinates that should be on the screen, I will use this to generate chunks that are on the screen

Attachment
0
Jan Lukasiak

got ofscreen chunks to unload, next step get ones on the screen to load

Attachment
0
Jan Lukasiak

added the player sprite, also managed to split up the world into chunks. currently working on loading and unloading the chunks.

Attachment
1

Comments

Jan Lukasiak
Jan Lukasiak about 1 month ago

some of the time didn’t load to hackatime correctly because I had an incorrect folder name. lost 1h of time

Jan Lukasiak

added the perlin noise tiles to the SDL window

Attachment
0
Jan Lukasiak

visualised perlin noise output for testing

Attachment
0
Jan Lukasiak

get perlin noise output to work

Attachment
0
Jan Lukasiak

work on chunk generation using perlin noise

Attachment
0
Jan Lukasiak

initialise repo by repurposing some code from an old platformer

Attachment
0