Monday, April 6, 2015

[Progress] Designing the dungeon - part 1

Finally! It's time to create a puzzle dungeon [by hand]. Designing a solvable puzzle while keeping it interesting/fun is a lot tougher than I expected. For the time being I'll just populate it with some simple puzzles until I figure out a better way to implement them (thinking smaller rooms, but it causes a lot of problems with my sprite scaling -- this is with interpolation turned off). Ideally, the doors would just transition the player into the next room, but the problem with creating so many small rooms, is it'll mean I need to create more physical rooms. That'll start to make things really messy.

Initially I had an idea of how to create the puzzles in my head. Create a start and end point, draw a solution line, and populate the map around that (by hand, since I figured it would be faster than learning and creating an entire algorithm dedicated to it.

Although you see the character unlock the door after moving the two boulders in, this is just because I spawned some keys into my inventory. I need to figure out a way to create a check for those two boulder points to change the state flag on my locked door to "unlocked". Something like this (pseudocode for the mode part):

globalvar nodesActive
global.nodesActive = 0;

And create a collision event of some sort for when the node and boulder collide. And then to reset the counter of nodes active when a locked door is used. Or create_instance(); when the nodes are active and make an invisible key become visible on the map.

Eventually there'll be more than just pushing the boulder into the nodes, such as traps, keys/chests/treasures. But for now I'll need to look over various texts about Sokoban design logic:

It's a shame Game Maker had removed their in-house transition functions. For the time being, I just have been using room_goto(); which does exactly what it sounds. It's a bit disorienting when I am doing test runs due to the fact you continue moving unless you release the movement key as you enter the dungeon.

Another change I had to make while trying to get the room changes to work properly, was to start relying on instance_create(x,y,obj_player); in the room creation code rather than physically placing obj_player into the room editor itself (although having multiple clones moving simultaneously was briefly amusing).

It's a start though!

No comments:

Post a Comment