Log In  


Cart #flat_golf_club-0 | 2024-07-31 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Flat golf club

What is this game about?

"Flat golf club" is 2d minigolf game. Complete all 15 levels without going beyond the step limits to get the golden medal.

Levels includes different types of obstacles:

  • Walls.
  • Water.
  • Sand.
  • Oil.
  • Arrows which moving the ball.
  • Electric floor.
  • Bouncing walls.
  • Timing electric floors.
  • Timing arrows.

Multiplayer up to 4 people:

Enjoy competition with up to 4 people using one controller.

Want to create your own level?


Draw your level in tile map:

Go to code and select tab 2 -- levels --
Increase this const:

amount_of_levels = 15

After that, go to function "get_level" and add one more "elseif" according to examples:

function get_level(index)

	if index == 1 then
		return create_level(0, 0,
		                    15, 6,
		                    12, 3,
		                    1)
	elseif index == 2 then
		return create_level(15, 0,
		                    34, 11,
		                    17, 8,
		                    2)
...              
	elseif index == 15 then
		return create_level(44, 40,
		                    60, 62,
		                    53, 48,
		                    1,
		                    false)
	end
end

How does works "create_level" function:

--[[
	for everybody, who wants to add his own level
	cb_x, cb_y - begining of level in tilemap
	ce_x, cb_y - ending of level in tilemap
	s_x, s_y - spawn poitn in tilemap
	steps_limit - limit of steps for this level
	is_have_clock - bool to set the presence of sound  
]]
function create_level(cb_x, cb_y,
	                     ce_x, ce_y,
	                     s_x,  s_y,
	                     steps_limit,
	                     is_have_clock)

2



[Please log in to post a comment]