Skip to main content
gamedev.net
🔒 Locked

Snood In JAVA

Started by wameku 4 replies 600+ views
Original Post
wameku
wameku
Hey sup. I''m working with some people on a Java based version of Snood. I''m trying to brainstorm the collection or multi-dimensional array that can represent a spot for each snood, like a grid. I''m also wondering how I can implement code to span that array to scan for chains of snoods to implode when three or more touch. if anyone has any basic design ideas, lemmie know -wameku
wameku
wameku
Oh yeah, and how do I capture the mouse and hold it inside the bounds of my game until the player hits ''P'' ? can i use a keypress event? and would I constantly read for the mouse coordinates ina mouse motion event? and if the coordinates exeed the bounds of my ''box'' I change the x to the boundary?

i dunno, Its late.
peace.
role
role
use implements MouseMotionListener,KeyListener

why do u want to hold the mouse inside your game?!


make me sick!!
wameku
wameku
because the mouse controls the angle of the gun, and if the mouse leaves the window, the gun is harder to aim. Having them hit ''p'' to pause the game and give back the mouse is how www.snood.com does it. I really like the way he''s implemented it.
elendil67
elendil67
Oh, that was a great game... I remember those days... the only flaw was that the guy was too nice, he let you do too much without paying...

[  c o d e  m a t r i x  ]
When you go homeTell them of us, and say:For your tomorrow,We gave our today.
wameku
wameku
So,
I think I''ve figured out that I need a 2d array. this will represent the board.

Secondly, I think I''ll calculate the desitnation of the snood shot from the gun in real time by using the gun angle to determine the next available open spot in the 2d array.
I''ll simply determine the angle

but for chains of snoods.
Should I implement another array and store my known chains in there? or should I just calculate this real time as well. with an isInAChain variable? I''m kinda confused as how to implement this.

and for the hanging snoods.
same thing? another collection? this is in JAVA so I really would like to be as efficeint as possible in my code-crunching.

graphics seem to be the easy part, once I have the game functioning.

And for the levels. should I store the available levels in a text file that I read with a tokenizer? that seems to be the most accepted format.

fun fun fun!

-wameku.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.