Long Tongue - test game

Monkey Archive Forums/Monkey Projects/Long Tongue - test game

ratking(Posted 2016) [#1]
Hallo,

I created a little test game with the free Monkey version, FantomEngine and the Jungle IDE Demo. It took my around 4 days, but I never used Monkey before.



The graphics are from opengameart.org, and are meant to be replaced sooner or later. You can play the game here (Windows only): https://dl.dropboxusercontent.com/u/10650964/_kurs/J_TelAviv_2016/LongTong-win-v1.zip

While the development went smooth mostly, I noticed that the HTML5 version gets quite laggy very quickly, and I wondered why that is: https://dl.dropboxusercontent.com/u/10650964/_kurs/J_TelAviv_2016/web/index.html

Anyone who might have an idea? My guess is the collision code, but I'm not totally sure. Is the paid version of Monkey more performant?

Kind regards,
ratking


Playniax(Posted 2016) [#2]
Nice!

I noticed that the HTML5 version gets quite laggy very quickly, and I wondered why that is

Are you using SetColor with values lower than 255?


degac(Posted 2016) [#3]
Nice little game!


ratking(Posted 2016) [#4]
Thanks!

@Playniax: Yes, the game has colored sprites, but even if I deactivate them (F4 in the game, check all options via F1) it still lags. I guess I just have too many objects?


k.o.g.(Posted 2016) [#5]
@ratking
Wenn du viele Objekte hast, meide am besten in Monkey-X for each, das erstellt in jedem Frame ein neues Objekt (Enumerator)
Versuch mein Pull einzubauen: https://github.com/blitz-research/monkey/pull/67
und gehe durch die Liste mit while hasNext.
Und bau noch einen FPS Counter ein, damit man Referenzen erstellen kann

Pseudocode (aus dem kopf):
Local list:List<String> = New List<String>()
	list.AddLast("test")
	list.AddLast("test2")
	Local enumerator:list.Enumerator<String> = list.ObjectEnumerator()
	
	'while true (Frameloop)
		'enumerator.Reset()
		While enumerator.HasNext()
			Local entry:String = enumerator.NextObject()
			Print entry
		Wend
	'wend


@other
sorry that i didn't wrote in english, but it would be to difficult to explain in english :D


ratking(Posted 2016) [#6]
@k.o.g. - Big thanks for the reply. Do I have to compile Monkey-X for that somehow? Dunno how that works...
There's an FPS counter if you press F1.


k.o.g.(Posted 2016) [#7]
@ratking
Wenn du willst, kannst du mich in Skype hinzufügen: *******
Kann dir ein paar Sachen noch erklären.


ratking(Posted 2016) [#8]
I guess I found the main culprit for the bad performance: the collision handling. I removed the collision of the enemies with the walls for now, and it runs smooth:

https://dl.dropboxusercontent.com/u/10650964/_kurs/J_TelAviv_2016/web_2/index.html (Press F10 to spawn enemies.)

I also changed the graphics.




Neuro(Posted 2016) [#9]
Cool game!! That tongue kinda reminds me of a lightsaber though. And lightsabers are cool :).