Defend the caves

A little prototype of a kind of roguelike defence game I’ve been working on. The idea is more or less a randomly generated cave system with a couple of points where enemies spawn. For the moment it’s set to a fixed seed, so the map won’t change, but the possibility is there. You can craft different items from what the enemies drop. The enemies spawn in a wave like fashion. The map can be altered by using the axe to mine stone.

Here’s a little gif I posted a month or something ago showing the booby trap:

https://giant.gfycat.com/UnrealisticGreenBooby.gif

Playable demo

I was rather ambitious when I initially thought of this idea, and I don’t really know where to take this prototype next. Any input would be appreciated :slight_smile:

Well first you could make a pickaxe to mine the stone :point:

I think the game looks neat with the shadow mechanics. Have you implemented any dynamic elements? You said there are spawn points which are fixed? I think your next step there would be to support ‘dynamic spawns’

Crafting is a great way to go. Maybe you should focus on making a crap ton of elements and combinations to make this game into a huge farm resources to win. Build structures and stuff.

I’ve got some ideas for some other traps and weapons one could craft, so that’s certainly a way to go.


OpenGL context: 4.5.0 NVIDIA 347.88

[... Loot placement ...]

Exception in thread "LWJGL Application" java.lang.IllegalArgumentException: no u
niform with name 'u_tileSizeInWorldSpace' in shader
        at com.badlogic.gdx.graphics.glutils.ShaderProgram.fetchUniformLocation(
ShaderProgram.java:305)
        at com.badlogic.gdx.graphics.glutils.ShaderProgram.fetchUniformLocation(
ShaderProgram.java:295)
        at com.badlogic.gdx.graphics.glutils.ShaderProgram.setUniformf(ShaderPro
gram.java:392)
        at io.github.simengangstad.defendthecaves.scene.LightShader.uploadUnifor
ms(LightShader.java:103)
        at io.github.simengangstad.defendthecaves.scene.Scene.tick(Scene.java:10
77)
        at io.github.simengangstad.defendthecaves.Game.render(Game.java:122)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplic
ation.java:223)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplicati
on.java:124)

The uniform is in the shader by that name, but I forgot to specify the GLSL version, so it should work now.

the game does not run on windows 10?

Hi

I’ve just tested, it crashes under Microsoft Windows 10 when I click on “Play” with the Nvidia driver n°353.30, I have the same stack trace than VaTTeRGeR. By the way, Simn, please put everything into the JAR to avoid such exceptions when double-clicking on the JAR:

[quote]Exception in thread “LWJGL Application” com.badlogic.gdx.utils.GdxRuntimeException: Couldn’t load file: assets/spritesheet.png
at com.badlogic.gdx.graphics.Pixmap.(Pixmap.java:148)
at com.badlogic.gdx.graphics.TextureData$Factory.loadFromFile(TextureData.java:98)
at com.badlogic.gdx.graphics.Texture.(Texture.java:100)
at com.badlogic.gdx.graphics.Texture.(Texture.java:92)
at com.badlogic.gdx.graphics.Texture.(Texture.java:88)
at io.github.simengangstad.defendthecaves.Game.init(Game.java:86)
at io.github.simengangstad.defendthecaves.Game.create(Game.java:74)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:147)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:124)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: assets\spritesheet.png (Internal)
at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:136)
at com.badlogic.gdx.files.FileHandle.readBytes(FileHandle.java:222)
at com.badlogic.gdx.graphics.Pixmap.(Pixmap.java:145)
… 8 more
[/quote]
VIrtueeL, maybe you could run the game in command line to confirm whether you have the same problem, “the game does not run” isn’t very accurate, is it?

The problem is obviously a pathing issue.

Running Windows 7, couldn’t get it to work.



Exception in thread "LWJGL Application" java.lang.IllegalArgumentException: no u
niform with name 'u_tileSizeInWorldSpace' in shader
        at com.badlogic.gdx.graphics.glutils.ShaderProgram.fetchUniformLocation(
ShaderProgram.java:305)
        at com.badlogic.gdx.graphics.glutils.ShaderProgram.fetchUniformLocation(
ShaderProgram.java:295)
        at com.badlogic.gdx.graphics.glutils.ShaderProgram.setUniformf(ShaderPro
gram.java:392)
        at io.github.simengangstad.defendthecaves.scene.LightShader.uploadUnifor
ms(LightShader.java:103)
        at io.github.simengangstad.defendthecaves.scene.Scene.tick(Scene.java:10
77)
        at io.github.simengangstad.defendthecaves.Game.render(Game.java:122)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplic
ation.java:223)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplicati
on.java:124)