• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Programming a game similar to Bioshock hacking

K

Karrlem

Guest
Hello all, so I'm trying to figure out how to go about programming a puzzle game similar to Bioshock's hacking minigame.
Here's a video of what it looks like:

also a screenshot:
 

Neptune

Member
Its kind of hard to answer a question like this without creating the entire game in pseudo code.

But if you want to avoid using a ds_grid, you could run a for loop that creates an instance for each cell -- assigning each cell of the grid different values depending; doing so would atleast give you a good way to access individual "blocks" or cells when clicking on them... Etc.
 
No, I want create a game with a similar playstyle but you guide a different object around.
You know that the Bioshock mini-game is pretty much a copy of Pipe Dream...? It is slightly different, I guess, but only slightly.

Anyways, are you still changing the location of the blocks like Bioshock? And then a "different object" is going to move through the "pipes"?
 
N

Never Mind

Guest
Its kind of hard to answer a question like this without creating the entire game in pseudo code.
Agreed.

You'll have to keep track of:
  • the state of each piece (revealed? or not?)
  • the type / sprite of each piece
  • current selection (either by an identifier or x/y position on grid)
  • type / sprite of the piece you have stored
You'll need to be able to:
  • determine pieces that are "connected"
  • store the parent of "connected" pieces
  • move your selection (either check for existing object in the direction your trying to move, or simply add / subtract from your selected grid coordinates while keeping them clamped within the grid)
Check things like:
  • Does the newly revealed / swapped piece connect to the start point? If so.. set "connected" (check their type or sprite to determine whether their sides line up).
  • Does the newly revealed / swapped piece connect to another piece that is already "connected".
  • Does the newly revealed / swapped piece also connect to the end goal? If so.. YOU WON!
Extra note:
Perhaps when a piece sets it's parent to another piece, it also has the parent store itself as a child.
That way when you win you can follow the list of children and change their sprites to be full of liquid (or whatever) one at a time. Thus, animating it flowing through.
 
Top