Change Player Size
Watch this video in a new window

Beginner's Guide to Game Programming Ep1 Part 8 Enumerations and Random Numbers

The Beginner's Guide to Game Programming: A Problem Solving Approach Episode 1: Makin' Pickin' Sticks Part 8: Enumerations and Random Numbers Displaying sprites off a sprite sheet with Enumeration...  
 
Customize

More From: LusikkaMage

Loading...

QuickList(0)

Featured Videos

Upgrade to Flash Player 10 for improved playback performance. Upgrade Now or get more info.
17 ratings
Sign in to rate
908 views
Want to add to Favorites? Sign In or Sign Up now!
Want to add to Playlists? Sign In or Sign Up now!
Want to flag a video? Sign In or Sign Up now!

Statistics & Data

Loading...

Video Responses (0)

This video has no Responses. Be the first to Post a Video Response.
Sign in to post a Comment

Text Comments (17)   Options

Loading...
MalaTemporaCurrunt (2 weeks ago) Show Hide
 0
Marked as spam
first off, great job as always (i'm a true fan!)

but i suggest to delve deeper into "random" numbers generation via the % operator ... there's a problem with lower bits being far from random.
MalaTemporaCurrunt (2 weeks ago) Show Hide
 0
Marked as spam
hi (test)
lotios611 (1 month ago) Show Hide
 0
Marked as spam
I'm having trouble with my coordinate generation function. The first time I use it, it generates a random number. After that, the coordinates go in a diagonal line until they hit the edge of the screen and then it appears at the opposite side of the screen. What could I be doing wrong?
Farzher (2 months ago) Show Hide
 0
Marked as spam
Why use enums?

don't they take up a bit of RAM and do the same thing as #define wich uses 0 RAM?

maybe i'm missing something :P
LusikkaMage (2 months ago) Show Hide
Marked as spam
Enums are pretty. :D

That's about it. I like making random datatypes for "Direction", "GameState", etc.
rodrotube (2 months ago) Show Hide
 0
Marked as spam
WOW, they take up tons of RAM on your XT computer. :P
0121ryanh117 (2 months ago) Show Hide
 0
Marked as spam
Enumerations automatically initialize all the stuff they contain with an increasing value each time. So first will be one, second will be 2 and so on.

This is usefull when you just want any old intialized value.
HomocidalCanineK9 (3 months ago) Show Hide
 0
Marked as spam
What does unsigned do?
I haven't found anything that covers it... ):
LusikkaMage (3 months ago) Show Hide
Marked as spam
Well there's a limit on what an integer can be; only so many bits can be stored in a computer, right? Normally this is -INTMAX to +INTMAX

If it's "unsigned", that means it's positive only, so it doubles how large it can be since it doesn't have an amount for the - numbers.
LusikkaMage (3 months ago) Show Hide
Marked as spam
Enumerations aren't popular. :(

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.