Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    246
  • comments
    175
  • views
    154182

Dual Analog - Target Practice

Sign in to follow this  
SteelGolem

140 views

[journal dump]

i want to do the timing now. [working] i had to go look it up. apparently you go with timeNow = DateTime.Now; and find the elapsed time with timeElapsed = (timeNow - timeLast).TotalSeconds; [working] ok, i added bullet support. press any button and the bullet fires. i can add a noise now to that if i wanna. lets go back to the list we made up last time. [working]

todo list:
- limit face motion radially, not with cartesian (like crosshairs)
x add timing
- finish actual game >> elaborate <<
- sound effects
x compare atan2-sin-cos vs sqrt methods
- dead-zone the analog sticks

i'm getting closer to the game part being done. getting the bullet going was one step. i wrote it all as commented code (the comments actually stayed in the code, i just coded around them) there's nothing being doen with any collision between the bullet and the target yet because the collision detection routine isn't written yet - it just returns false all the time.

i changed back to the sqrt method because i wanted to use some of the stuff we got out of it. it came in handy when i wanted to direct the bullet. i'm going to need to go back through the code and make it more readable. its a mess.

as i played with it a bit more, i realized that the bullet is coming from the upper left of the face. that's not right. we need to offset it a little to make it come from the middle of the face. thats gonna be easy.

todo list:
- limit face motion radially, not with cartesian (like crosshairs)
- finish actual game (need to specify more)
- sound effects
- dead-zone the analog sticks
- refactor the code for readability
- make bullet come out of middle of face instead of top left corner

i'm gonna fix the bullet start loc first. [working] fixed. i wasn't initing the bullet's sprite - and then i did, but i did it wrong. so that was a bit of fun. i should eventually introduce a vector class soon to make my job even easier. lets look at what we need for a finished game.

we need to have the bullet collide with the target. when that happens, the score goes up by one point. we might have a sound effect play there, like a crash or explosion or something. the target will be moved somewhere randomly on the window, and you have to shoot it again. we'll have a 1:00 min timer counting down to zero and when it gets to zero, its game over. we need to display the score and the timer to the player as they play.

i'll do the collision test routine next.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!