Saturday, September 16, 2017

cuboids

Hey again Internet,

After spending two days getting that sword drawn, I've realized the value in reusable code, particularly shapes, particularly the cuboid. So, everything's a cuboid now. Here's how we're looking:



Wednesday, September 13, 2017

sword action

Hey Internet Friends,

Yesterday I worked on the sword, the sword joints, and the sword swing attack. Today I tackled the skin for the sword. Here's what it looks like.

Next might be the skin for the human... but I still need to give that one some thought. There's a lot more going on with a human than with a sword, especially when it comes to the face.

I think I'll play some Skyrim to help me figure it out.







Sunday, September 10, 2017

Hello World

Hey Internet,

I'm Joseph and I'm an arm chair video game developer. This project started as me trying to learn OpenGL 3D realtime graphics. It took about 7 years of me beating my head against it before I had my lightbulb moment and was able to really take off. After I learned the basics, it was either make visualization software or video games. I'm not into video games enough to call my self a gamer, but that sounded a lot more interesting than visualization software, so I'm making a video game!

I don't know what it's called and I don't know what direction I want to take it in. But, it's been a really interesting challenge and has really opened up a new side of me I didn't know about.

I want this blog because I don't have anyone in my life I can talk to about this, and I need to share. I just plan to post screenshots and updates on what I've accomplished and how I feel about it. Maybe I'll have some insights someone can appreciate.

At any rate, here's what it looks like:

I have a world that you can run around in. It has height ( a harder feature than you'd think ) and color. There's no texturing, but I can replace it with a world that does if the time comes.

I have 3 types of human.

human1 is the green guy. He was the best I could do with skeletal animation and skinning about a year ago.

human2 is the guy in the blue shirt with the angry eyes. I made him early in 2017 when I finally figured out quaterions and redesigned my humans and their skeletal animations in terms of distances and rotations instead of fixed point vertices. I also learned how to draw textures and that's what the angry eyes are.

human3 is the stick figure you see. My human2 code was over 3000 lines long ( and that was just the base class, there are 16 other large classes that fill him out ) and doing too many things that it made changes too much of a headache. So, I'm splitting him up as best I can and making a much cleaner and modular human3.

In the last week, I've added collision detection ( something I've been dreading, but it turns out was pretty straighforward although I wouldn't say simple ) and three types of collisions. There's the player running into things ( like other players ) collision. Which basically stops the player from running through objects. There's engageable collision. So if you press the engage button ( e ) near something that is engageable ( like a door or treasure chest ) then it engages ( whatever that may mean ). Lastly there's attack collision. So, as an attack is happening, it searches for attackables in its collision area and deals damage to them. Attackables are things like players and breakable pottery and such. Anything you can hit or smash. I'm pretty proud of it, which is why I'm writing this long explanation.

Yesterday I added weapons and attacks. My only weapon right now is a fist and the only attack is a punch. Neither one is drawable ( which is why I started with them ). But eventually I'll have weapons like swords and magic wands that need to be drawn. Then some attacks ( like fire balls ) will be visible and travel through space, so they need drawablity. If you don't know, 3D is hard stuff, so whenever I get the chance to work on backend code, I try to stay back there.

Earlier this week I made some initial HUD ( heads up display ) visuals. I've been dreading this for years but it turns out it was the easiest thing. Everything in OpenGL is in a 3D box between -1 and 1. -1 X to 1 X. -1 Y to 1 Y.  -1 Z to 1 Z. So I draw my 3D world out in 3D space ( like X=300 , Y=700, Z=2 ) then use a crazy complicated matrix to transform it all down into that -1 to 1 size. For a 2D HUD, all I had to do is draw my visuals where I want them in that -1 to 1 space and NOT transform it by the big scary MVP matrix. ... I felt so stupid when I figured it out. But, thankfully it's easy, so I shouldn't have any more problems with that. I just need to figure out my menu system.

Other than that, you should be able to figure out what I've done based on the pictures. Most of my effort has gone into trying to draw the 3D, so most of what I've done is the visual stuff.

Again, I don't really know where this game is going, but I'm thinking something like Zelda or Skyrim... Pretty ambitious, I know, but there it is.