Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Blitz Coding - 360 Degree Movement

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
531 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Sep 28, 2011

This is how to do 360 Degree Movement in Blitz Basic

Download the source code:
http://dl.dropbox.com/u/8673694/You%20Tube%20Files/Blitz3D/360_Degree_movemen...

Visit the blog:
http://www.coffeeinducedgames.co.uk

Some optimizations have been made to the source code thanks to rck109d

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (amcadam26)

  • You can clean up the code in two important ways: firstly, use atan2 instead of atan like this angle# = ATan2(MouseY()-tankY, MouseX()-tankX) with that you can remove the "corrections" section :) secondly, always use cos with x and sin with y ;set shells mx value sh\mx = Cos(angle) ;set shells my value sh\my = Sin(angle) and ;Draw line for tank turret Line tankX,tankY,tankX+20*Cos(angle­),tankY+20*Sin(angle) I first learned programming this kind of stuff in blitz, good memories
  • @rck109d: thanks for the comments, I've included the changes in the source code download

  • what if you are using API where in drawing command you have only one place to put number of degree. example: al_draw_rotated_bitmap(*bitmap­, pos_x, pos_y, rotplace_x, rotplace_y, DEGREE, flag); ?

  • @MarkoLaizc which API do you mean? degree probab ly just wants a figure between 0 and 360. But not knowing which API this is I'm not sure

  • Ya a new video! and i think im first right?

  • @anidude98 Yeah, you're the first, congrats!

see all

All Comments (18)

Sign In or Sign Up now to post a comment!
  • thank you so much for making this video... i spent allot of time trying to rap my little brain around the math in this :p

  • Thank you so much! :)

    I'm happy that you are back

  • I see that you use CamStudio for your videos?

    Can you make tutorial how to record HD videos with that so if you upload i will get same quality as your videos. And what codecs you use?

    I tried CamStudio but never got HD out of it.

  • Do my eyes deceive me? Has amcadam started making videos again? For that I subscribe and take off my hat. On a more serious note, Thanks and welcome back. I always liked your videos man, hope you keep at it and good work.

  • thank you for uploading

  • Yaaay!! Back :)

  • Wow you are back - ACE!!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more