13 posts tagged “ingen”
I'm at the Salt Lake Coffee Break again tonight. A 16oz iced mocha, my XML/XSLT book, and I'm ready. I have to transform an HTML page using XSLT by 10am this morning. Better get crackin.
As far as Ingen goes, I'm reworking a lot of it to be built around the beauty that is XNA. Matt and I are working together (finally) on a project in game dev. The requirements are that it's a 2d game in DirectX. We have one week. I promise good things :).
Class is over in 9 days. Wow, this term has gone by fast.
Success! My first functional game built within Ingen is complete! It also sucks balls, but that's not the point. It proves that my engine is capable of doing cool stuff. That first screen is way too pretty to be the splash screen for the game behind it but meh, it looks sweet. You can download it here. Note that the game requires DirectX 9.0c and the .NET Framework 2.0 to run.
Now to make a game that doesn't suck...
XNA is the most awesome thing anyone has ever done ever. Ever. A video game development SDK for Windows, supporting C#, and capable of running on an Xbox 360. I could go on for hours on the possibilities of such a framework. The beta is hitting in September, too. My birthday month.
LETS SEE JAVA DO THAT, EH?
By the way, I've been up for just over 24 hours straight at this point. When I said Ingen was going to be an all nighter, I was not pulling your proverbial chain. It's interesting how much...colder everything seems when you haven't slept in a while. I guess the human body is in like overdrive to keep from collapsing. I've got a girl to call at around 5 tonight, followed by a karate lesson at 6. As soon as I get home from the dojo, I'm going to go die for about 243523462774 hours in my room.
Oh, yea, Ingen. Mouselook doesn't work, despite Matt and I spending over 8 hours focusing on nothing but the two lines of code it requires to work. Problem is, even with the correct calculations, the piece of shit doesn't work. Gah, so frustrating. Matt told me he found a way to make it work, however, so maybe...
Awesome. Vectors are structs. That means they cannot be passed by reference. Which means that the way Matt and I were passing vectors around led to inexplicable problems, such as TransformCoordinate() not actually doing anything.
I want to destroy something.
Yes...it works! After dealing with several annoying exceptions, mouse input now functions properly. On to manipulating the camera.
This is a bit of a late update, since this was resolved on Saturday, but whatever, it's still good news.
DirectInput finally works. As it turns out, there was no threading issue, just bad code on the part of the Managed DirectX book I was using. The damn thing was getting stuck in an infinite loop and preventing anything from happeneing once the keyboard's Initialize method was run. It now works beautifully, so I can get working on mouselook for the assignment.
It is mildly disheartening that most of the others in the class (well, those that still care. Quite a few people considered the class too difficult and have dropped or become zombies) are fairly close to completing tonights assignment. That is because they're focused on making it work rather than making it a truely object-oriented deal. Oh well, it's worth it.
Salisbury Steak, corn, mashed potatoes, a chicken pot pie, a can of Dr. Pepper, and some Smash Bros. Not a bad lunch.
Looks like I'll be spending most of the night catching up on my XML class. Way too much time working on Ingen, heh. There's a quiz tomorrow that I need to be prepped for. There's a J2EE exam next Tuesday, too. Gah, I need to get working on the lab for that.
Other than that, though, things are good. Matt and I are working on a new project, which is looking promising. I'm working on the DirectInput portion of Ingen. This has made me realize just how badly I need to add events for everything. I'll probably be spending a good deal of Friday doing so.
I decided last night that I wanted to prepare myself a meal for change. Though my schedule doesn't usually allow for the extravegance of...making Pasta Roni on my own time, yesterday was a different story.
I came home with enough Banquet tv dinners and pot pies to fill half of the freezer. TV dinners for a buck and pot pies for $0.43 is pretty hard to pass up. I am enjoying a lunch of beef enchiladas, rice, a pot pie, and a can of Dr. Pepper for the grand total of $2.04. Not bad, considering lunch usually costs me more than five.
Ingen is coming along nicely. Turns out that aspect ratio problem was actually an issue with the mesh itself. Whoever made it used a crappy .X exporter. The following errors occur when loaded in the .X viewer:
In other words, the mesh is missing some of what makes it render properly. The .X viewer is capable of calculating fixes for it, which Ingen does not do. If I see more of these flawed .X exports, I'll add the functionality to do the same, but for now I'd rather focus on implementing DirectInput :) and lighting.Loading model - C:\Documents and Settings\ddahl\My Documents\Visual Studio 2005\Projects\dusda\trunk\Ingen\UI\bin\Debug\samus.x
Tangents and Binormals cannot be generated without a 2-element or greater texture coordinate at TEXCOORD0. Please use DXOps to UV-Atlas your mesh.
Binormals do not exist on mesh. Attempting to calculate.
Tangents do not exist on mesh. Attempting to calculate.
Especially the lighting. Managed DirectX handles lighting with a 'Lights' object array within the Device object. A total of 255 lights may be assigned per Device object, which is plenty (nobody uses that many lights at once). I decided that it would be best to treat the Lights array as exactly that, an array. I'll write a nice layer on top of it that manages adding, removing, and configuring of all lights. Once that's done I'll be able to manage lights in a Scene object (building it to abstract stuff away from the SceneManager, which currently contains code for both running the engine and handling scenes).
But enough mumbo jumbo. My chicken pot pie awaits.
Problems. Always with the problems!
I'm not sure what's causing this, yet. I set my camera up via a CameraInformation object I made. Here are it's properties:
cameraInfo.FieldOfView = (float)Math.PI / 4;
cameraInfo.AspectRatio = 4/3;
cameraInfo.FrustumNearPlane = 1;
cameraInfo.FrustumFarPlane = 1000;
cameraInfo.Location = new Vector3(0, 0, 2);
cameraInfo.Target = new Vector3();
cameraInfo.UpDirection = new Vector3(0, 1, 0);
I've tried modifying the aspect ratio a couple times, but it doesn't seem to be the problem. The field of view isn't an issue either. What the crap?
Now is a time for celebration. I finally hit the "Hello World" of my graphics engine. Thanks to some help from Cybie, the structure is more well defined and, now, completely functional.
I know it doesn't look like much; there is no lighting yet (that's next), but you're looking at a mesh imported from Bryce 5. It has a simple texture on it, which you can't see (again, the lighting), but it's there!
Next up: A more impressive picture.
Ah, so glad the week is over. It's been a non-stop deathmarch since Sunday. Game Dev, J2EE, Projects V, and XML assignments, big ones, one day after the next. The weight off my shoulders is quite a relief.
So, enough whining about the past workload. On to new stuff! Today I should finally be able to hack away at Ingen again. I'm hoping to actually be able to use it on the next assignment, instead of doing a horrid hackjob like I did for Assignment 2 (all the code, procedural, in the code-behind of the form. Ew.). I should have no problem loading meshes into it soon. I've been toying with Bryce 5 a bit, too; considering using it to create my landscape for whatever it is I decide to build. Here's a sample picture I just made after toying around with it for 5 minutes:
Not bad, eh? I was pretty impressed with the results. Hell, it took longer to render than it took to create. I've yet to see just how useful this will be for exporting meshes to use in Ingen (Matt told me it's a terrible idea), but we'll see.
Also, a random though: Vox should never have open registration. I really like the community that is here right now. I'd much rather have it grow via invite than free registration. I'm not trying to be an elitist prick or anything like that, I just think it would keep the community from becoming the cesspit that MySpace has become. It would make it impossible for spyware to plague the site as well; even if someone used their account to make a bunch of other ones to spam Vox users with, it's easily traced and handled. What do you guys think?