Kuest - 4K

This years entry from Bullsquared, Kuest - 4k can be found at:

http://www.bullsquared.com/gamesSingle.jsp

Puzzle/Adventure game. Find the 4x1K coins hidden in the 50+ rooms with various puzzles to solve and of course a few little pitfalls… And evil little monsters eager to zap your health.

Can you let me know if animation is smooth? Just tried on Apple Mac, and runs like a dog and choppy as hell…

Few issues to take care of before uploading to java4k.

  • Once in a while get blank screen (it appears isActive() returns true sometimes when applet loads… no messages/exceptions… can’t find cause yet!)… Browser refresh fixes…
  • Mac issue mentioned above… (Also g.getFont().deriveFont gives different text sizes on Mac too… Noticed this last year!)
  • 200+ Bytes left. (If pack200 is working). May improve graphics and add animation to the main character… or use textured graphics… dont know yet… Plenty of space for new rooms/puzzles but more rooms would probably make it too repetitive… Suggestions?

Steve

Do you mean true? If so, at what stage? Otherwise, see http://www.java-gaming.org/index.php/topic,21403.msg175192.html#msg175192

Have played a bit. Need to return sometime and make a map. Those creatures are evil. They can lurk in walls (is that a bug?); if you push a block into them they move through it into your space (so so much for my plans to trap one); there seems to be no way to kill them.

Oh, it’s smooth in Linux (64 bit, Java 1.6.0_15 IIRC), but the title screen text is a bit out of position. Perhaps use the 200 bytes for FontMetrics? I know polish isn’t really what this competition is about, but…

I’ve been coding rather cautiously after finding problems with Appletview and Webstart. I hadn’t experienced this when using a web browser though. Which one are you using?


        // Wait until the graphics context is valid
        while(!isActive()) Thread.yield();                      // Appletviewer
        while((gs=(Graphics2D)getGraphics())==null) Thread.yield(); // Webstart
       do { ... } while (isActive());

Thanks for the tip about deriveFont and the Mac, I have a version of Falcon4k that makes the text bold using that. Better go test it on my aging powerbook :wink:

Edit: Game is fun, excellent puzzles, lovely large clean graphics;although I find that it takes several goes before I get the right idea, particularly if there’s a monster hassling me, and I hate to restart.

[quote]Have played a bit. Need to return sometime and make a map. Those creatures are evil. They can lurk in walls (is that a bug?); if you push a block into them they move through it into your space (so so much for my plans to trap one); there seems to be no way to kill them.
[/quote]
Yeah, the lurk in walls can happen but it doesnt affect gameplay really so left it… Yeah… You can’t kill em… Generally most of them can be avoided with correct manouvering, with a few you just have to take the hit, but have been generous with health packs in these cases.
Thanks for trying on Linux, hadn’t tested yet… May experiment with different fonts or simply left align text instead of attempting to center it. (or may see how expensive FontMetrics is).

@Alan. Thanks… Will try some different templates… The one I am using (below) works 50% of the time in Applet viewer and 90% in browser… (i.e it runs all the way down to the end and returns at the isActive() check… The problem I find is there are 100s of templates on this forum, most of which have problems and finding the correct one (thru 10s of different posts is a nightmare!)… ps. Have just fixed my last years entry (Revolvoman)… It went a year without the isActive() check… (I always wondered why it was slower after a refresh… Doh!)
ps Falcon seemed to work find on Mac too (although not quite a smooth as pc… mind u a lot smoother than my game!)

[quote] public void init()
{
// create Images
enableEvents(AWTEvent.KEY_EVENT_MASK);
new Thread(this).start();
}

public void run()
{
                            // Variables and create levels
			for(;;)
			{		

                              	// Kuest 4K game code here
			
				if (getGraphics() != null)
					getGraphics().drawImage(b, 0, 0, null);								
			
				try
				{
					Thread.sleep(16);
				}
				catch (Exception e) {}		
			
				if (!isActive()) {							
					return;
			
			 	}
			}
			
}

[/quote]

Worked just fine on Apple Mac OS X Snow Leopard (10.6). Not being able to reset the blocks in rooms ruined the game for me, though. Oftentimes I would accidentally push a block and that would make it impossible to finish. Silly.

The number of rooms and the quality of your graphics are very impressive for 4k.

Man, that win animation is scary.

Out of curiosity, how are you saving the data for all the different rooms?

Very nice!
Well Done!

Played great on Firefox 3.5, Win XP Pro sp3.

Graphics and gameplay were really good.

Thnx Xyle

[quote]Not being able to reset the blocks in rooms ruined the game for me, though.
[/quote]
Reseting the blocks would make it too easy, part of the challenge is working out where to push all the stones/sliding blocks… Admittidly it is fustrating if you push one in the wrong place and have to restart (thats why I included the ‘s’ restart key), mind you am used to this having played loads of similar adventure games in the 80s…

[quote]Man, that win animation is scary.
[/quote]
Hey Congratulations… Didnt expect anyone to complete it so quickly… Maybe I made it too easy. .How did you find the difficulty level? I may add in another 10-20 rooms (mostly with sliding blocks which the most fun)…

[quote]Out of curiosity, how are you saving the data for all the different rooms?
[/quote]
All the room data is generated algorithmically in a 3x3 array

levelData[x][y][room]

, apart from the doors/coins which I enter manually in the array at my desired places. I have another array of integers storing the rooms (each room is 1 int, which generates a unique room in the above array when passed thro the algorithm). So have enough space for 100s of more rooms… If I could be bothered… (Which I can’t as it was pretty tedious making sure all the room exits matched the next room, maybe a few more as pjt33 completed it pretty quickly).

Hah. I thought it would be a generative procedure and you spent a while finding seeds to get a working map. Great minds think alike… Except that I might have written a program to generate the rooms, check their connectivity, and flag up ones which might have an interesting puzzle.

I thought the difficulty level was reasonable. The first puzzle I came across (the blue key 4 to the right of the starting room) I thought for a while to be impossible. Most of the puzzles made me think, and while some of them had more pieces than they needed you have to be quite careful. It’s also worth noting that I made a map, and without it I think I would have wandered in circles, run out of health packs, and died.

[quote]Hah. I thought it would be a generative procedure and you spent a while finding seeds to get a working map. Great minds think alike… Except that I might have written a program to generate the rooms, check their connectivity, and flag up ones which might have an interesting puzzle.
[/quote]
Hehe… It didn’t take long for somebody to figure me out… Very accurate. Actually, I did also write a Level Generator… ie… A little program which for example, gives me all rooms with 1 switch and > 1 sliding blocks, or rooms with a left exit at position 3 and top exit at position n… for example. To write some AI to find rooms with an interesting/solvable/clever puzzle would probably take me months, so a lot of manual room checking took place. Saying which… Am trying to find some more slider levels… Tedious but fun when one potentially interesting one crops up…

Uploaded: http://www.java4k.com/index.php?action=games&method=view&gid=282

Added some textures, fixed blank page bug, monsters smile when zapping ya and text is now left aligned (looks ok now on Mac… Dont know about Linux).