Saturday, October 14, 2017

Sunday, October 8, 2017

chest texturing:adjustableSizing:!placing

Hey Internet,

I was off this weekend and able to work on the game. I feel I made the most of it!

My goal was to place and draw my body parts ( or at least one ). I almost finished.

I wanted the skin mesh to be an adjustable array size... which means adjustable problems that you have to be super careful to handle. I succeeded and was able to slap a texture over the skin mesh... however everything was backwards and only drawing in snips of the whole. So, I had to work out what face I'm culling and why it works right when I just pass in an RGB value but works opposite with a texture. And basically rewrote all my texture code. I figured it out, but then things were drawing at double the height than they were before. ??? I figured it out but then the texture was drawing as if it was flipped along the diagonal axis. I spent all Sunday afternoon working out how to parse a 2D array diagonally and swap the s and t ( as opposed to x y z ) values of the vertices with its diagonal pair. Oh Lordy! And that was the less stressful part of the weekend.

I thought I'd figured out how to replace the alpha value of a texture with a value I pass in for skin color. This way I can draw different kinds of skimpy clothes that allow flesh to be seen through instead of a gaping hole in space where their body parts should be. Well, it turns out I didn't figure it out months ago, there was just a happy accident occurring that made me think so. But!, I figured it out this morning. I just had to add an if statement to my fragment shader and voila!

All I need to do now is get the sizing right ( chest size ) and make sure it respects the adjustable array size logic, then center it over the chest area. I'd love to do it today so I can wrap up this big feature all in one weekend, but it's getting late on a work night and I have a headache from staring at this computer screen for two days. Tomorrow I've got a full week of screen staring ahead of me.

Once this chest is resized, all I have to do is copy the code to all the other body parts and tweak.

Then I'll have pretty little humans.

Then I need to make a few more outfits for variety.

Then I need to repeat everything that took me over seven years to learn to make dragons, bears, pigs, snargoyles, jipper snaps, fire elementals, honker deamons, and so on. I really hope it doesn't take seven to ten years for each.

Then I need to get good at art and replace all the textures I just made.

Then I need to actually make the places in the world.

Then... omg, making a list is depressing me.

Here are some pictures of what I did today.

Tan is the skin color of my little dude's hot body. It can be adjusted and drawn where the alpha value of the texture is 0.



I don't how what was happening here, but it took the better part of the weekend to fix.



Here I'm drawing the first pixel of my texture across the whole skin mesh.


Oh great! The s and t alignments are wonky. Top left and bottom right are correct, I just have to figure out how to flip along that diagonal for an adjustable 2D arrray of vertices.




Woo hoo. Backup and call it a night!

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.