Times, trials, and turbulence.
Brave new world — Part 2.
University & Classes
The first week of classes is now done and behind me. It’s a bit longer of a hike to the campus than I had expected — about 20-25 minutes if I keep a decent pace going. From here on in our university includes bus fare with our tuition cost, so it is sort of ‘free’ for me to take the bus as well. I really dislike the ‘bus-stop scene’ though, so I walk when I can.
I’m taking five courses this term, which are all exceptionally interesting. I’ll toss in a brief paragraph about each:
CS 245 – Logic. This course looks at logic on a fundamental and computational level. It’s very heavy on proofs — in fact, it’s virtually all proofs — based on four logical operators we have at our disposal (conjunction, disjunction, implication, and negation), as well as introduction and execution rules for each of them. It’s extremely interesting to work with logic on such a ‘raw’ level, and has obvious benefits for anyone interested in CS.
CS 251 – Computer Organization and Design. In a nutshell, this course begins at the level of assembly and machine code, and then works its way down, towards the machine itself. Only the very basics were covered this week, but I’m thrilled to be learning more about how a computer really works on the bottom-most levels. I’ve browsed through the textbook a bit, and it looks fascinating.
GER 102 – More German. Not the actual name, but you get the gist. I need to make a prerequisite chain of length three as a degree requirement, so I figured I’d continue my study of the German language. It’s challenging and often frustrating to learn a new language, so excuse me for not sounding as worked-up as I did for the other courses. It’s certainly interesting, but in the hair-pulling way. 🙂
PHYS 111 – Physics I. Officially, I’m taking this because I need a Science credit for my degree. Unofficially, because it ties *directly* into my growing interest of the computation and simulation of physics (both accurate and the crude stuff for games). This course covers kinematics and dynamics, which is exactly what I’m interested in. It seems like everything beyond that in physics (waves, quantum physics, etc) is too mind-blowing to do much in terms of the simulation I’m in to. Looking very forward to using this course to augment my basic knowledge of physics.
CS 241 – Foundations of Sequential Programs. This course starts at the level of assembly and machine code, but unlike CS 251, it works its way up, towards languages. Without a doubt, this is going to be the most intriguing course of all. This week we were writing raw machine code for an old CPU called MIPS — or rather, a MIPS simulator. I think if we were all writing real machine code then most of the campus’ servers would be down by now. 🙂 It’s really really really fascinating stuff, and we haven’t even touched the bulk of the course: writing a compiler for a simple programming language. This blows my socks right off, so I’ll definitely be writing more about this as it develops. We have to use the basic language that they specify, but I’d like to start my own off on the side, just for kicks.
I didn’t forget about Skirmish. Oh no. 🙂 In my last post (or 2nd last, rather) I promised that I would have a surprise ready for Monday, when I had thought my internet would be good to go. Since it’s functional now, I might as well make good on that promise right now.
Given my recent habits, perhaps the surprise could have been that I’m still regularly and eagerly working on Skirmish. I think that’s probably a surprise to many of you, but I won’t stop there. Read on!
Props & Physics
What it’s boiled down to (internally) is the idea of Props. A prop, in terms of Skirmish, is any physics-driven object that [can be] maintained over the network across a hosted game world. This includes: chairs, tables, grenades, bullets, rocks, guns, rockets, empty shell casings, and even big wood splinters left from destroying a crate.
This leads directly into the fact that all ‘items’ are now technically ‘weapons’ in the sense that all items create an Entity (be it a physics-driven Prop or otherwise). Firing a gun creates a bullet, throwing a grenade creates a grenade, which is obvious. However, using a medkit will create a healing entity, which will essentially be a particle effect that also restores lost health from nearby teammates. Melee weapons create a melee damage entity, which will really act like a short-life invisible projectile released from the player.
It sounds sort of strange from a player’s point of view, but it will be entirely transparent to players — they won’t be able to tell the difference between this and if I had coded each type of item completely separately. From a developer’s point of view, it means that one type of network message can handle all items, and naturally having all items under a unified system makes life much easier than having several cases for each item type.
I’ve implemented the foundations of this Prop system already, which can be viewed in the video below. In terms of performance, since Props use collisions based on a single point, are very low-cost. I can easily simulate hundreds of active Props at once, colliding with the map and static Props (crates in this example) with little performance hit. As a plus, when a Prop stops moving, it goes into stasis (read: no collision checking), which kicks up the speed as well. This will go a long way in making the game feel more dynamic.
(Note: Standard YouTube low-quality, but you can see the gist of what’s going on.)