Mine Runner

Try to make full game from MadeWithDefold Jam 2022 entry.

PLAY JAM
PLAY

8 Likes

1)Test optimization for voxel model. Vox Cleaner V2 worked good.
Have bleeding issue with models but export using blender-to-defold-sync fixed it.

2)Add more optimization.Do not draw objects if distance is big:)
3)First iteration on camera. I do not like how camera worked in jam entry.
Camera was a go that attached to player.And when player move left and right there are some jitter.
Now camera is always in center + offset.

4 Likes

Yay! Perfect :smiley: The second link is not working (yet hopefully) :wink: But I’m keeping my fingers crossed for this!

2 Likes

Fixed) Forgot to make game public :grin:

1 Like

Lose animation + camera movement on lose

7 Likes

Continue my slow game development:)

1)A lot of small fixes,optimization and refactoring:)
2)Restart without proxy collection reload :scream:
-jam version reload proxy collection on restart.
-in release version i want to always show tunnel. But reloading collection not very fast.(0.1-0.2 second in web. It will show black screen)
-so instead of reload game.collection i remove all game entities, and reset game state.(1 frame)

4 Likes

Curious what approach you took to this? I did this for Apple Spider as well, to keep the background parts of the game persistent. In my game, I created a big collision rectangle that would “kill” all of the spider game objects in their scripts, then just had some code reset the game state variables.

1 Like

I use ecs patter. So i create entities(lua tables). Every entity can create a go from factory if need it. When i remove entity from ecs world i call go.delete.
Game state is also lua table so it easy to reset it.

The main problem with that way not forget to delete or reset something:))

function GameWorld:reset_state()
	self.actions = ACTIONS.Parallel()
	self.actions.drop_empty = false
	self.state = {
		gems = 0,
		time = 0,
		start_timer = 0,
		state = ENUMS.GAME_STATE.MENU,
		lose = false,
	}
end
---@param e EntityGame
function Entities:on_entity_removed(e)
	DEBUG_INFO.game_entities = DEBUG_INFO.game_entities - 1
	e._in_world = false
	if (e.input_info) then
		TABLE_INSERT(self.pool_input, e)
	end

	if (e.tunnel) then
		e.tunnel:Destroy()
		e.tunnel = nil
	end

	if (e.gem_go) then
		go.delete(e.gem_go.root, true)
		e.gem_go = nil
	end
	if (e.box_go) then
		go.delete(e.box_go.root, true)
		e.box_go = nil
	end
	if (e.vagon_go) then
		go.delete(e.vagon_go.root, true)
		e.vagon_go = nil
	end
	if (e.player_go and e.player_go.model.root) then
		go.delete(e.player_go.model.root, true)
		e.player_go.model.root = nil
	end
end
2 Likes

Very interesting. Are you setting the entity properties to nil because they are pooled and will be re-used?

1 Like

Entities not pooled now but later if i need i can make pool for them(now only input_info is pooled)

I set to nil, because that references not valid after i call go.delete.
If i not set nil, nothing happened because entities already removed, but for me it looks better when i remove not valid values:)

1 Like

Some small steps:)

-Draft gui
-Revive logic
-Highscores table

3 Likes

Adding model in gui scene? :thinking:
Some 3d math and it worked :sunglasses: :partying_face:

4 Likes

Thats really cool!

1 Like

Add Powerups :muscle:
-x2 score
-magnet
-run(immortal, can destroy obstacles)

5 Likes