Easiest way to make puzzle?

Blitz3D Forums/Blitz3D Beginners Area/Easiest way to make puzzle?

StOrM3(Posted 2004) [#1]
What I need is an example showing how to make a set of puzzle pieces the player must obtain, say 6 of them, in a certain order, and each time the player hits a piece on the screen, check it against, what was supposed to be hit, if out of order, reset the level, but not time, if it is the correct piece, add it to the current array of puzzle pieces player has hit, sort of an inventory display type hud on screen to show player which one has been hit, and which one is next.

I hope I am coming off clear as to what I wish to know how to do. I am trying to implement it myself, but am hitting snags as to where to put what, how to display it, make sure order is correct etc..

Thanks for any help if someone has an idea of how to do this, or knows of an example showing something similar.

Ken


eBusiness(Posted 2004) [#2]
Seems to me like you never come off clear, is it just me that can't understand what he's talking about?

Anyway, try to figure yourself, you need the mouse position, the correct piece position, and a bit of plus'n'minusing.


Bremer(Posted 2004) [#3]
I would suggest that you write down what you want your game to do. Break it down into segments. Then code each of these, as smaller bit are usually easier to do than the entire thing at once.


WolRon(Posted 2004) [#4]
[pseudocode]
Dim A(6)
;assign each piece a value (say 1 through 6)
;fill array with the 6 pieces that need to be 'hit'
hitpiece = 1
repeat
  if currentpiecehit = a(hitpiece)
    hitpiece = hitpiece + 1
  else
    hitpiece = 1
    ;start level over
  endif
  
  ;draw hud showing which pieces have been 'hit'
  for iter = 1 to 6
    if hitpiece >= iter
      ;draw highlighted piece on hud
    else
      ;draw unhighlighted piece on hud
    endif
  next
until thispiece = 6
;level up
[/pseudocode]



big10p(Posted 2004) [#5]

Seems to me like you never come off clear, is it just me that can't understand what he's talking about?

Anyway, try to figure yourself, you need the mouse position, the correct piece position, and a bit of plus'n'minusing.



Physician, heal thy self. :)


StOrM3(Posted 2004) [#6]
zawran: I already have the game done, you can play it and everything, the only thing I have left to do is the puzzles for each level. I am trying to find the easiest way to do it, since I already have a ton of code in this game, and don't want to get mixed up, and introduce bugs or something by just trying to add the puzzle code.

That is the reason for the post.


Bremer(Posted 2004) [#7]
Perhaps you could explain a little more about the game the, as I think that will help people understand better what it is you are looking for. I guess I misunderstood, and perhaps others will too.


StOrM3(Posted 2004) [#8]
Okay the game is like this.. There are several fruit items laid out in a grid format, the player rotates around the outside edge using the mouse, when the player presses the mouse button, he lauches the player object, in this case a sphere model at the objects on the grid, also, the puzzle idea is out the window, instead in its place, I would like to add a Matrix bullet time. Also besides the fruit items, you have a (?) item, which changes into one of 5 items, including +10,-5,1up,rip tombstone, clock, if you hit the clock, you get the matrix bullet time affect, but it allows you to clear off whole rows of items, no matter what the items are.

So, I have everything working including multi-hit combos, except for the matrix time affect thing, allowing you to clear whole rows off for a period of time.

Any ideas, how something like this could be added, I suppose you guys will need my source, which there is quite a bit of, as you can imagine since I am so close to being done, if anyone would like to help me out, please email me at storm3@... so I can email you back with the sourcecode and media needed, to test with.

Thanks,

Ken

Sorry all my posts seem so unclear, I wasn't aware that you guys felt like that. I hope this one is better.


WolRon(Posted 2004) [#9]
Sorry all my posts seem so unclear, I wasn't aware that you guys felt like that. I hope this one is better.
You are a work of art. Your last post just made it MORE unclear.

First you say this:
What I need is an example showing how to make a set of puzzle pieces the player must obtain
then you say this:
also, the puzzle idea is out the window
and now you say this:
Any ideas, how something like this could be added

How something like WHAT!?! could be added? You just said you didn't need it.

Seperate your thoughts into paragraphs. Seperate thoughts get seperate paragraphs.

Don't use run on sentences:
There are several fruit items laid out in a grid format, the player rotates around the outside edge using the mouse, when the player presses the mouse button, he lauches the player object, in this case a sphere model at the objects on the grid, also, the puzzle idea is out the window, instead in its place, I would like to add a Matrix bullet time.
The above 'sentence' is, AT MINIMUM, two sentences. Really it should be about FIVE sentences.

Any ideas, how something like this could be added
So, now tell us what exactly it is you want to add...