Sutyimok and the Haunted Treasure

mormord

  • Posts: 94

Sutyimok the Forest Ranger got tired of breaking one bow after another during his never-ending fights with bandits and decided to get some magical stuff from a nearby dungeon. However the dungeon is filled by the ghosts of the fallen.

Link: http://www.stencyl.com/game/play/5252

Basically this is a maze game where you need to outsmart baddies like in Pac Man. Instructions are on the first level, but they're simple - arrow keys to move, avoid ghosts and drop obstacles with space to distract them. Obstacles are removed after a period of time so have no fear from blocking paths.

The game is still under development - needs some animations on stairs and obstacle graphic (now its just a black block), etc... Maybe even some difficulty settings. Consider this one the hardest for now. Levels are randomly generated - some of them are impossible to beat, sorry for this.

Sorry for the crappy graphic, I'm really bad at drawing. Also, if the music drives you mad, you can mute it with Stencyl's build in volume controller (press numpad minus). Evil laugh is from Halloweens, music created with MuseScore.

Any feedback would be welcome.

« Last Edit: July 14, 2011, 01:48:10 pm by mormord »

KungFuFurby

  • *
  • Posts: 487
Hey, that's pretty unique to have some sort of a random level generator! I don't mind the graphics myself, and the music isn't half bad for a game like this.
Hi, all! I'm KungFuFurby, music composer. If you're looking for some music for your game, just PM me.
My Works List for Non-Stencyl Games
My Works List for Stencyl Games

Rob

  • *
  • Posts: 1268
I love maze game. The instruction menu is nice and clear. Maybe I have yet to reach the advance level but would like to see exit tunnels like pacman (left to right, top to bottom). Do you really random level generator? Can you explain more on this? Some nicer graphics would help the experience too. Anyways, well done.

Not to nitpick too much - do you mean hunted, hounted or haunted. I see some inconsistencies around.
GOLDEN RULE #1 : SAVE YOUR GAMES FREQUENTLY
IOS/XCODE DEBUGGING
http://www.stencyl.com/help/view/xcode-ios-troubleshoot/
WATCH STENCYLWORKS VIDEO TUTORIAL BY SUNRISEKINGDOM
http://www.youtube.com/watch?v=KDfRfjzr9j4&feature=channel_video_title

mormord

  • Posts: 94
Thanks for the feedback. First, it supposed to be 'Haunted' I just like mistyping things (hopefully I didn't mistyped this time. So the thing that the ghosts do :D)
Exit tunnels - great idea! I don't know why I didn't think of this since the whole game is inspired by an article about PacMan's Ghost AI (I use a different one, but still :) )
I don't know how far you made but the levels (except the tutorial one) only differs for the amount of ghost upto the maximum of three (One ghost doesn't challenge me, I struggle with two ghost, and I sometimes beat three ghost. Four ghost would be pretty impossible in this side not to mention it would slow down the game to much - I tried it)


The maze is an array of zeros and ones that means wall and walkable. The graphical tiles are set after the generation. So this is the algorithm:

0.) Fill the whole place with walls
1.) Create the outer rectangle of walkable tiles
2.) Create the cross in the middle
3.) Repeat this 5 times:
3./a) Choose a point (tile) inside the outer rectangle, choose an X direction (left/right) and an Y direction (up/down)
3./b) Create two path from the tile to the chosen ways. The path ends when there is already a walkable tile.
4.) Finish the generation by setting the stair positions walkable (stair positions are fixed) and put the slow-down walls to the right and left sides (you start 3 seconds before the ghost and without it you would be able to rush to one of the exits)

Graphical tiles are only affected by 7 nearby tiles. It's like a big if-then-else problem which is quite ugly and hard to explain. I used bitflags and an array to prevent this, but still, it's ugly. Even uglier because I'm new to Actionscript and I was half finished in design mode when I realized I have to use code-based behavior for this. If you wish to take a look at the code I can post it too.
I think I'll swap step 2 and 3 to make the maze look more random (and give you less chance to stuck right where you start)


Rob

  • *
  • Posts: 1268
It does sound like it's generating random level. Just make sure you fine tune it such that we do not get stuck.

I also like to see if we can get the exit stair to be more prominent. Noticed that in some levels we can get more than one stair. Is that intended?

p.s. The word hounted is currently in both you game name and also your game icon.

« Last Edit: July 14, 2011, 02:08:52 pm by Rob »
GOLDEN RULE #1 : SAVE YOUR GAMES FREQUENTLY
IOS/XCODE DEBUGGING
http://www.stencyl.com/help/view/xcode-ios-troubleshoot/
WATCH STENCYLWORKS VIDEO TUTORIAL BY SUNRISEKINGDOM
http://www.youtube.com/watch?v=KDfRfjzr9j4&feature=channel_video_title

mormord

  • Posts: 94
I corrected the text, I will recreate the game icon tomorrow, thanks for pointing it. There are always two stairs (except tutorial level) on fixed locations. This supposed to make the the game easier. Also I added exit tunnels on two or more ghosts levels. One ghost gets pretty shocked by the number of routes it has to hold against you and stays in the center which is no fun.

Rob

  • *
  • Posts: 1268
Did you create the ghost AI? It feel pretty intelligent to me.

On a separate note, do you think Pac Man style of ghost AI can be done by your current behavior where it can continuously hunt down pac man itself?
GOLDEN RULE #1 : SAVE YOUR GAMES FREQUENTLY
IOS/XCODE DEBUGGING
http://www.stencyl.com/help/view/xcode-ios-troubleshoot/
WATCH STENCYLWORKS VIDEO TUTORIAL BY SUNRISEKINGDOM
http://www.youtube.com/watch?v=KDfRfjzr9j4&feature=channel_video_title

mormord

  • Posts: 94
Yes, I created it. There is one big difference between pacman style AI and this one, so I don't think I could do it. Pacman uses an AI for each ghost. They're individuals. In Sutyimok's case, ghosts are mindless slaves to a greater being (known as the scene or the borgish way - the collective :) ).
The collective try to make the move that leaves you minimal space while never giving up the protected tiles (your space = tiles that you can reach before a ghost reaches it). So under normal conditions you can't reach the protected tiles without getting hit by a ghost. This is where obstacles come in - The AI thinks that the maze never changes. When you drop an obstacle, you lose space. "Wow, I rule!" - thinks the collective and send a ghost to finish you off. In good case, when the obstacle is removed, you win space, potentially enough space to reach the exit before the ghosts (well the collective should say "Hey, you're a cheater! Noone is allowed to make new paths!" :D

KungFuFurby

  • *
  • Posts: 487
The game malfunctioned on the fifth level when the treasure chest was placed right on the player.
Hi, all! I'm KungFuFurby, music composer. If you're looking for some music for your game, just PM me.
My Works List for Non-Stencyl Games
My Works List for Stencyl Games

mormord

  • Posts: 94
Ooops... That chest should have been appear on the opposite side :) Thanks, corrected. I just saw a ghost flying through the walls so surely there is a bigger problem here too :(

KungFuFurby

  • *
  • Posts: 487
Maybe you should check and see if the obstacle is right on top of the ghost when the player places it down. If so, obstacle placement is denied.
Hi, all! I'm KungFuFurby, music composer. If you're looking for some music for your game, just PM me.
My Works List for Non-Stencyl Games
My Works List for Stencyl Games

dineyin

  • Posts: 110
hey, this game is pretty cool. The ghost AI is great, at first I thought it was just a simple "Move towards player kind of deal. After playing for a bit I realize that it's actually trying to cut me off and block my path, it's really something. Also the level generation is pretty slick.

One thing though is that the Ghost AI is just too good, and there' no intuitive way of predicting where the ghost is going to move next. When I'm playing I kind of just pick a random path and try to move away from the ghost, but since I can't really predict what the ghost is going to do I can't really try any sort of strategy. I think this is one of those cases where the AI is having more fun than the player.

I would try either dumbing it down or slowing down the ghosts a bit.

Also the high movement speed combined with the fact that due to the player collision box it's really hard to make quick turns into hallways without perfect timing. In my game which has very similar controls, I made the collision shape for the player a circle of the size of a tile, and that made the movement between tiles a lot more forgiving and fluid.

Great, work, keep it up!

Rob

  • *
  • Posts: 1268
Not sure you realize that you can drop some obstacles to deter the ghost. But a lot of times, I ended up trapping myself.
GOLDEN RULE #1 : SAVE YOUR GAMES FREQUENTLY
IOS/XCODE DEBUGGING
http://www.stencyl.com/help/view/xcode-ios-troubleshoot/
WATCH STENCYLWORKS VIDEO TUTORIAL BY SUNRISEKINGDOM
http://www.youtube.com/watch?v=KDfRfjzr9j4&feature=channel_video_title

dineyin

  • Posts: 110
well I know you can place down the obstacles, but I'm not really sure I understand when to use them. if the ghost has two hallways to get to me, if I just block one off, then he will just go to the other one and reach me  :'(

and there's no point on blocking off a path from a ghost that is right behind you since you both move at the same speed he is never going to catch you.

Again, I'm sure there is a logic to where I should put the obstacles, but it just seems like it's hard to predict what the ghost is going to do when I place one down

mormord

  • Posts: 94
Maybe you should check and see if the obstacle is right on top of the ghost when the player places it down. If so, obstacle placement is denied.
Sure, good idea, I will do it. Just need to figure out how :)

Also the high movement speed combined with the fact that due to the player collision box it's really hard to make quick turns into hallways without perfect timing. In my game which has very similar controls, I made the collision shape for the player a circle of the size of a tile, and that made the movement between tiles a lot more forgiving and fluid.

Thanks for the suggestion, with circle it is far better! Also I slowed down a game a little, now the figures go with 8 speed instead of 10.

well I know you can place down the obstacles, but I'm not really sure I understand when to use them. if the ghost has two hallways to get to me, if I just block one off, then he will just go to the other one and reach me  :'(

and there's no point on blocking off a path from a ghost that is right behind you since you both move at the same speed he is never going to catch you.

Again, I'm sure there is a logic to where I should put the obstacles, but it just seems like it's hard to predict what the ghost is going to do when I place one down


Ok, the one ghost case is simple enough to explain:
You drop an obstacle in an alley. If there are not too many routes nearby, the ghost will approach you from the other end of the alley, while you are waiting near the obstacle. Now you can put a block on the other side, so the ghost can't reach you. You're trapped, and the ghost can't affect anything (of course it could, if it was a little bit smarter to realized, that obstacles get removed after 10 seconds) so it try to stay as close as possible waiting for wonder. Since you placed the first obstacle sooner than the second one, it will be removed first. You can rush to the stairs and the second obstacle still holds of the ghost.

If you take a look at the attached file, you see a working trick for two ghosts. The two ghosts go to corner the player. However the player can block both of them, and when the first obstacle is removed, he/she has a free way to the stairs.