Unofficial Defold Game Jam #1

I was thinking about adding “Created/Powered by/Made with Defold” and “Made by <-my-name->” credits

I’ll see what I can do!

3 Likes

What version of macOS are you on right now? I think other people on macOS it has worked for?

Probably vsync related. Can you try editing the game.projectc within the .app … resources?

[display]
width = 960
height = 640
vsync = 1
update_frequency = 60

Mojave
macOS app, bundled on Windows does not run in Mojave. Confirmed by doing that myself.

These settings already there.

2 Likes

I’m saying try to edit the values to get something which runs well on your VM. The settings that are there are because of trying to maintain a stable dt, but if vsync isn’t working right it runs too fast. This is a general Defold engine problem.

Can you post more OS info? Like exact version, hardware. What happens if you run the binary directly from terminal?

Anyone else on macOS can test latest build?

2 Likes

Maybe it’s a permissions error. Try checking whatever is in the .app vs what’s there when you bundle on a mac directly?

Created a super dumb and simple BMFont, adding here as a zip together with some UDGJ logo alternatives as well.

You need to create a Defold font with the fnt file, then animate it on your own. If you only have non-numeric values in your string, do something like this:

function init(self)
	local upper = false
	local text = "made in defold"
	timer.delay(0.3, true, function()
		upper = not upper
		if upper then
			text = string.upper(text)
		else
			text = string.lower(text)
		end
		label.set_text("#label", text)
	end)
end

If you have numeric values, it’s a bit more complex, but this should work:

function init(self)
	local text = "made by 1337 coder"
	local function change_chr(c)
		local cb = string.byte(c)
		
		if cb >= 65 and cb <= 90 then -- upper case
			cb = cb-65+97
		elseif cb >= 97 and cb <= 122 then -- lower case
			cb = cb-97+65
		elseif cb >= 48 and cb <= 57 then -- numbers alt 1
			cb = cb-48+38
		elseif cb >= 38 and cb <= 47 then -- numbers alt 2
			cb = cb-38+48
		end
		return string.char(cb)
	end
	local function change_str(text)
		local out = ""
		local l = #text
		for i=1,l do
			local c = string.sub(text, i, i)
			c = change_chr(c)
			out = out .. c
		end
		return out
	end
	
	timer.delay(0.3, true, function()
		text = change_str(text)
		label.set_text("#label", text)
	end)
end

It looks like this:

udgj1_assets.zip (41.7 KB)

13 Likes

Either app nor binary is not working on MacOS . Looks like binary is corrupted and not the hardware problem. Are you using NE?

No NE. And it looks like @dmitriy tested building an app on Windows and it wouldn’t run either.

Can you check the permissions the binary has?

This is my full game.project

[bootstrap]
main_collection = /main/main.collectionc
render = /rendercam/rendercam.renderc

[script]
shared_state = 1

[display]
width = 960
height = 640
vsync = 1
update_frequency = 60

[project]
title = UDGJ1 - Pixcade Boss Rush
bundle_exclude_resources = 
dependencies = https://github.com/rgrams/rendercam/archive/v1.0.1.zip,https://github.com/britzl/monarch/archive/2.17.1.zip
custom_resources = 
version = 1.0

[input]
game_binding = /input.input_bindingc
gamepads = /default.gamepadsc

[physics]
scale = 0.2
gravity_y = -170.0

[sprite]
max_count = 2048

Can you build a blank Mac app and compare with binary in the version I uploaded? I would do this but I don’t have a mac handy atm.

2 Likes

Yes, there is no execute permission on binary. I added that permission and now app run fine.

4 Likes

Unfortunately I don’t know how to solve this so I can bundle on Windows and it can work for everyone on Mac. I can’t chmod the file before zipping (I tried just to make sure and it had no effect :slight_smile: ), and not sure if there are any zip tools which allow to chmod while zipping / after.

Maybe I can use docker or something for bundling.

2 Likes

It doesn’t have the execute permission: -rw-rw-rw.
Runs fine with -rwxr-xr-x

3 Likes

I have same issues with any windows build on Parallels. I believe it was ok early, when we had “variable_dt” option.

You should be able to get the exact same behaviour as the old variable_dt by checking Vsync and setting Frame cap to 0 in game.project.

2 Likes

yes, but it’s not working on Parallels and I have the same (one) feedback from a person on Win 7.
Maybe it depends on video driver…

Day 3 Update - Boss behaviour is now in a configurable format where different movement patterns and waves can be created:

Example of a wave of enemies around the boss:

	boss.create_wave("#enemyfactory", 6, 90, 0, function(wave)
		boss.animate_wave(wave, { rotate = rotate(-360) }, 2)
		boss.animate_wave(wave, { move = move(90) }, 1)
		boss.animate_wave(wave, { rotate = rotate(-360) }, 2)
		boss.animate_wave(wave, { move = move(-90) }, 1)
	end)

6 enemies at 90 pixel distance from boss alternating between rotating counter clockwise 360 degrees in and moving out 90 pixels and back in 90 pixels.

Next steps:

  • Make the boss killable
  • Add player hp and/or weapon count
  • Close the game loop so that you can defeat or fail at a boss
13 Likes

Day 3:

So, I’ve managed to create a dangerous boss - he can now at least attack hero with his axe not only with animation, but also dealing damage and it’s pretty stunning imo :smiley: Some of the bugs where detected and repaired. Still there is a problem when I’m adding another mob, but I think I know why - they share the same lua modules and data is overwritten, so I must separate them somehow.

image

@sven thanks for the font stuff! :smiley:

11 Likes

A bit late starting but finally have a working prototype to demonstrate the main game mechanic.

16 Likes

I would like to put it in GUI actually, but firstly I have a problem with creating a font in Defold out of the udgj_font.fnt file :confused: - there is no single letter showing :confused: I tried with different materials, but non of the default seems to work

Try the font-fnt material?