🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Cripes! To-do list

Published April 21, 2008
Advertisement

Cripes!


I didn't do much on Cripes! today, except work a little on the HUD. So far all of the values are hard-coded, although I'm going to try storing those values in a file eventually.


Short-term goals:

  1. Finish the basic look of the HUD.

  2. Store character and color values in files

  3. Create some walls and the player sprite

  4. Add a timer class!



EDIT: Forgot to add one!

Miscellaneous


A friend of mine asked me to convert some Java functions into Perl scripts for him, which encode and decode stuff with BASE64. It was.. definitely interesting getting the code to fit. For one, in Perl there's no explicit "char" datatype, so the range of values far exceeds the typical char. This becomes a problem when the algorithms used to encode/decode use bitshifts, apparently... I managed to create a Perl subroutine that checked a given character (assumed to be in the range [0, 255]) against the typical signed char range, [-128, 127]. That is, if the value is 128 or over, it subtracts the value from 256 and negates it. To my amazement, heh, it worked.

Then came a problem with the encoder where it wasn't pulling in all of the characters. Apparently, because I was getting one character at a time and checking if that was a '\0' for the EOF, it ceased to parse the file if it encountered the -127 character value. I eventually just pulled the file in line by line (the EOF is handled for me), join()ed the resultant list, looped through it again pack('c', $myChar)ing each, and converted the list into a string. Seems klutzy, but it worked!

The end result: two perl scripts that take an input filename and an output filename via the command line, reads in the input, and writes the encoded/decoded data to the file. Woo.
Previous Entry Snipes clone: "Cripes!"
Next Entry HUDding
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement