Ludum Dare: The Monastery & Bathyscape11

Show off your Legend of Grimrock art, fiction, music or whatever!
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Ludum Dare: The Monastery & Bathyscape11

Post by petri »

Neikun wrote:Just started playing the Monastery. Sancsaron is kill stealing everyone! haha
Hehe, he's a badass! Please let me know what you think about the game when you have played some more!
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: Ludum Dare: The Monastery & Bathyscape11

Post by JohnWordsworth »

@petri: That's great advice. I'll probably give the next one a go and will definitely gear up for a tool-chain that can publish to the web. Did you consider using emscripten to build your C++/Lua version for the web? I've got Lua working in a browser via asm.js thanks to emscripten and it's pretty cool. I know SDL is supported too, but not sure about SDL_image and SDL_mixer.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Sol_HSA
Posts: 681
Joined: Fri Mar 02, 2012 3:10 pm
Location: Nowhere whenever
Contact:

Re: Ludum Dare: The Monastery & Bathyscape11

Post by Sol_HSA »

Emscripten has built-in sdl_mixer support, at least.. quite probably sdl_image too.
Reminder: moderators (green names) don't work for almost human. | http://iki.fi/sol/ - My schtuphh..
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Ludum Dare: The Monastery & Bathyscape11

Post by petri »

I considered using emscripten but I ended up rewriting the game in javascript, mostly for the learning experience (yay, my first javascript program!). The lack of coroutines, strange variable scoping, and trying to squeeze program flow into callbacks made me appreciate Lua even more :)

E.g. I don't know how the following can be expressed cleanly in javascript:

Code: Select all

messagePrint("Blablabla")  -- slowly prints a message to screen
waitKey()
messagePrint("blablabla")
waitKey()
encounter("small_room", "rat", 5) -- start an encounter with rats
messagePrint("You won!")
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Ludum Dare: The Monastery & Bathyscape11

Post by JKos »

Great games, both of them, for a 48 hours effort. I also loved PoR, Secret of The Silver Blades etc. so was immediately at home when I started The Monastery. If someone someday makes a game similar than classic SSI Gold Box games, with a slightly updated graphics, UI and game mechanics I would definitely buy it.

I have some experience in JavaScript and you really can't stop the code and wait for key press, so your callback stack-solution was pretty cool and innovative (for me at least).
I have also started to develop a simple turn based strategy game and it was surprisingly tricky, with JavaScript you have to think a bit differently.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Ludum Dare: The Monastery & Bathyscape11

Post by JKos »

I couldn't put his away from my mind and created a simple example which demonstrates how it's possible to implement waitKey with javascript. Of course it uses callbacks, because it's the only possible way to do it and that forces you to split your code to another function every time you call waitKey, but I think it's still readable.

Code: Select all

<!DOCTYPE html>
<html><head></head>
<body>
    <script> 
var keyDownCallback = function(){};
var keyPressed = false;	

window.addEventListener('keydown',function(event){
	if (keyPressed) {
		keyPressed = false;
		keyDownCallback(event);
	}
});

function waitKey(callback){
	keyPressed = true;
	keyDownCallback = callback
}

function showMessage(msg,callback){
	//print your message slowly here
	console.log(msg)
	if (callback){
		callback();
	}
}

//Synchronous game flow starts

function start(){	
	showMessage('Wait',firstPhase)
}

function firstPhase(){
	waitKey(secondPhase)	
}

function secondPhase(){
	showMessage('Continue. Blablaba',function(){waitKey(thirdPhase)})
}
	
function thirdPhase(){
	showMessage('Third phase')
}
	
function end(){}
	
start()
	</script>
</body>
</html>
Yeah, JavaScript sucks in many cases, especially in turn based game-development :)
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
SeyProdumen
Posts: 18
Joined: Fri Jul 26, 2013 7:00 pm
Location: Norway
Contact:

Re: Ludum Dare: The Monastery & Bathyscape11

Post by SeyProdumen »

I just had my first "play-through" (well...) and reached the undead monks - total party kill. :mrgreen:
Post Reply