More Coding, and 17th Birthday!

Well, I’m 17 now. Those years just keep coming. If I have any brilliant insights about age, I’ll let you know.

Now, on to the interesting stuff. I now have a saving function that saves the position of the win area as well as information about the player. With help from my instructor, my collision detection only checks for collision with crates that are relatively close to it. I had the idea when I noticed that when I triggered noclip, my framerate got much better, and as expected this feature improves framerate greatly. With the improved saving I can now do level editing entirely within the game. I just need to feed it a base file full of crates with a location for the win area, a starting position and direction, and gravity and jump velocity settings. Given that crouching and jumping work great now, I hope to finish with sound. When I only had one crate, I could create a sound instance specifically for that crate. Now that I have more like 300 to 350, I can no longer do that. I’ll make a global sound-maker that is passed the location where it needs to make a sound, with a capacity for around four simultaneous sounds. This finite number (as far as I know, it’s not four specifically) of possible concurrent sound sources (mixing would help, I’d think) can be noticeable in some games where there’s loads going on – some sounds do not play. Well, back to coding to the beat of Basshunter!

Maze Progress

I still haven’t fixed that crouch bug, but hopefully I’ll still have time to do so. I now have level transitions, and it will replay the last level if it can’t find a next one. There was a bug in that code where I only declared one ifstream, and on Linux when I used it multiple times it worked just fine, but on Windows it wouldn’t actually read the file. It turned out that Windows needed a fresh ifstream every time, which was pretty easy to do once we figured it out. To sum it up: Windows will let you use one ifstream multiple times, (yes, I did the close the file) but it won’t actually open more than one thing, and it’ll tell you it did. I say Windows because it works perfectly on Linux. 🙂

Published
Categorized as Software

Maze

My maze demo for CAEN is going well. I now can edit map files live in-game. With the help of Mitchell, our instructor, I now use a vector instead of an array to store crates, which allows for the deletion of individual values by swapping it to the end and resizing the vector so it no longer holds the now-null value. My big glitch at this point is that although going down into a crouch works fine, and even halves your move speed as it should, it is impossible to come out of a crouch without jumping.  While trying to uncrouch while not jumping, the negative z-axis velocity goes through the floor into the negative thousands. If it gets high enough, depending on the framerate, it gets to the point where it can fall entirely through a crate in a single tick – and fall through. I hope I can get rid of that by Friday. I like jumping around, and on a related note added a feature so you must hit the jump key each time you want to jump and can’t just hold it down. I do this by making the keypress routine only setting m_controls.jump to true when it isn’t already, and it only gets set to false when you’re on the ground while it calls m_player.jump(). If anyone’s interested I’d be happy to release my source. I’m using the open-source Zenilib library, which is written by my instructor.

Published
Categorized as Software

Anti-Counterfeiting Trade Agreement

There is an agreement in the works that encourages international copyright enfringement cooperation, makes infringement punishable without a complaint from rightholders, and vastly expands the power of customs to seize suspected infringing material. It also, according to BoingBoing, the outlaws P2P file transfer, regardless of transfered content. This is outrageous. Of course, it also wants ISPs to help, and assures immunity. Disgusting.

Published
Categorized as Politics

Coding, and Bootable CDs

The coding of the final project is going well. I’m adapting our first 3D project – a crate with collision detection that you can jump on – to a crate maze with the addition of crouching, illusionary crates, and external level files. There is currently an anomaly with collision detection where, because of the library I’m using, the player is shaped like a capsule, which is a line segment with a radius coming out of it in all directions. This means that it’s possible to partly fall off an edge and not be able to get back on except by jumping. The instructor has told me that I can combine a box and an infinite column to get the cylinder I want – something he has not yet implemented. I may yet do that, but I should finish the other features first. One interesting bug that I ran into, which seems to be mostly fixed now, is that if I jumped into the bottom of a crate and held jump button, I would not fall, and it would think I was on the ground, which would allow me to float around on the bottom of the crates if I continued holding the button. If I floated off the edge of a box, I would fly upwards. This was because it would check if I was on the ground if, after minusing 150 for gravity, applying the z axis was invalid. If this move was invalid, it took it to mean that we were on the ground. If the velocity was upwards, running into the bottom of a crate would mean this was true. I made it so it checks to see what the velocity is relative to zero. This is fixed, but an upper collision does not absorb upwards momentum, which looks weird. I hope I’ll be able to fix this one too, probably by making a statement checking to see if an upward move is invalid and killing upward momentum if that’s the case.

The server was down due to my own fault once again. I applied updates remotely, and one of them was a kernel upgrade. I had to reboot so it could load the new kernel, and avoid potential module problems if the latest modules are not loaded. Even though I checked after I had run the reboot command, I guess it had been unmounted by that time, as I had left a bootable CD in the drive, which the machine happily booted into. My mom was nice enough to take out the CD and reboot it for me. I really should change the BIOS boot order to hard drive first, but I’m hoping I won’t have to use this Pentium 3 box as a server for much longer.

Fan

We have two fans in our dorm room, one a ground fan and the other an oscillating upright fan. The upright has power and speed LEDs. If you look at the speed and power lights straight on, they’re both solid, but if you look at the lights through the spinning blade, the speed light appears to flicker, while the power does not. Weird.

Also, massive subject change, but if you’re in for an hour-or-so long interesting and inspiring lecture, (By, sadly, a professor who died Friday,) click thusly: O_O;

What was that?! Too much coding. I ended a sentence with a semicolon. I’m leaving that in…

CAEN

The C++ class was overwhelming. We’re being given a library to make pong with many of the functions stripped out so we have to write them ourselves. It’s strange to be dumped in the middle of someone else’s code…

Also, I got to play Dota, (which I sucked at) and Counter-Strike 1.6. (in which I was rank 18 of 200!)

Published
Categorized as Life

CAEN Again!

So yeah, I’m waiting for 7:30 so I can go to breakfast. Class should be cool – we’re going to do graphics. It’s with DirectX according to the class description, so I may have to learn the more cross-platform OpenGL on my own. I hope they aren’t too different… My roommate Jamie has a DS flash cartridge and has cloned an old game on it. It’s pretty sweet.

Published
Categorized as Life

Back From Canada!

I got back from Canada on the 11th. In Canada, they ask if you want gravy with your fries, or ketchup with your eggs. Some of their roads are pinkish. They have lots of heather. Many do say “about” like “aboot,” but the only person I met that really said “eh!” was my grandma’s friend Tom. We went up in the CN tower’s spinny dining room. It was awesome and the food was really good, but it was $50 per-person. The science museum had a hallway where they dampened the sound 10Dbs with holes in the walls and weird-shaped foam things. That was cool. There was also this thing where they let you control one of two frequencies and you had to try and get them to form a circle on the occiloscope. I got it to a slowly turning oval, but not past that.

Published
Categorized as Life