Thursday, October 31, 2013

Christmas Challenge - Day One

So I finished off day one with almost nothing, but that's ok I have plenty of time! I won't spend a lot of time talking about it tonight since I barely did anything, but here's a changelog:

- Gameloop
- Finished shaderUtils
- Loading and using shaders
- Started on entities and mobs

That's it for 10/32/2013! Happy Halloween everyone, have a good rest of your night.

Christmas challenge - Creating a game from scratch

I decided I needed a little challenge in my programming life, so I'm going to create a game before Christmas for my girlfriend! She doesn't know yet, so don't tell her! What I want to do:

- Game created with my own code (no libraries) using only LWJGL
- Shader support (Will be my first time creating a game with shaders!)
- Advanced rendering techniques and possibly model loading if I need it
- It will be a 2D side scroller
- It'll be a game about a mystery, and you have to follow serial killers and solve crimes. But then you discover a twist in the plot, are the serial killers even real? Have you been making them up to cover for... yourself?

Its a short list, yes, but that's all I can think of now. I have less than two months to make a complete working game that will be good enough to impress my girlfriend, and I think I can do it!

Now I'm going to return to coding my shader loading class, I'll post my progress later.

I seriously don't understand shaders

Quite honestly, I don't understand shaders, or more specifically, the vertex shader. If all it's purpose is to take in an outside coordinate and basically process it, why do we need it? For example, here is the most basic vertex shader you can use (it even uses old deprecated code, making it even simpler than the new core profile):

void main(){
gl_Position = ftransform();
} 

All this shader does is take in a coordinate using a glVertex#f call or drawElement call etc... and supposedly translates the geometry around to where it needs to be. But that is already done in the actual code, so why do I need a shader to do that for me? I can't even just use the shader and never call a draw method upon my vertices in OpenGL, its just not possible. The fragment shader makes more sense to me, however, because you can do all sorts of amazing things you could never do with the fixed function pipeline. You can create lighting effects, blur textures, change the colors of textures super easy; all this great stuff. So I understand the use of the fragment shader, but why a vertex shader? I, as of right now, see no need for one.

 Maybe I'm just an idiot though!

Exceptions



Figuring out shaders

Shaders are just god awful weird. Why would I use a shader instead of just calling deprecated functions like glTranslate? Sure, they're cool for lighting but everything else...

Wednesday, October 30, 2013

Upcoming games

I have a few ideas for games, and now that I'm done with my voxel engine for now, I'm going to start working on them! First I have to get better at GLSL, and then I want to develop these games, in order for when I need to finish them:

- Something for my girlfriend 
Cant reveal anything about this yet, its a surprise ;)

- Fight 'Em All 
A generic horde style fight them all by yourself game with elements of building and surviving utilizing strategy and structures, excited about this because I think it will be the first game I actually complete after two years!

- Balanced Energy
A RTS game where you take control of a team of little particles that shoot up opposing teams. Dead particles then convert to the team they were killed by so there is always the same amount of players. I've been developing this game on and off since the end of the school year in 2012, also very excited about this because its an original idea!

- Voxel engine
Literally just a voxel engine; its been my goal to create one since I started programming. It most likely won't actually turn into a game, I just want to get the basics of it working because I'm so fascinated with the idea of voxels. I already have a little bit of the engine done, but I have to modernize it to support shaders and VBOs and matrices, which I'm not very excited about. I want to finish it someday, but I don't care when! 

- NEngine
Probably should be finished before the voxel engine, its my 2D OpenGL engine that will support fixed and programmable pipelines. The goals are to make it as flexible and simple to use as possible. I want it to basically be a wrapper engine for low level OpenGL functions, and also incorporate other functions like spritebatching and texture atlases. Pretty excited about this, but its going to take a long time as I've only just started to learn modern OpenGL. 


School and why I'm different

Homework and schooling

Even though this is going to end up being a blog about my games and my nerdy programming life, I want to rant about something. I'm sitting here in school, supposedly learning about subjects that will help me get the jobs I want someday. I call bullshit, that is the biggest lie ever. I have two dream jobs; indie game developer or commercial pilot. I have already started taking my flight lessons, and I have yet to run into any of the math that we apparently need. I have yet to use the extensive array of knowledge I have acquired on history over the years of long, boring and torturous history classes. IN fact, the only thing I've needed to know so far is the cardinal directions and common sense. 

Sure, as a pilot I would need to know the basics of how my plane operates, so you might argue I'd need some experience. Well, do we see schools teaching us this? No. I'll need to know some math, but when would I need to learn that? In college. I don't need to sit through it in high school, when I could be "expanding my horizons", as my dad loves to say. Year after year we learn about the same damn subject, just with the teacher's personal teaching style. Oh, you want to solve this math problem THAT way? Oh, I'm sorry. I won't accept that, this is the correct way of doing it ("Proceeds to show me, ironically, how to solve the problem, but still receive the same answer"). Year after year this is how its done. I've barely learned anything knew in English over the years besides a few vocab words that either I already knew, or could learn easily on my own without sitting in a hour long class. In history, we learn about the same things time and time again; I'm sure I could recite most of history back to you since around grade 6, we have yet to learn anything knew and I'm graduating next year. 

In my other dream job, being a programmer, I would need to know more math depending on where I want to work. If I want to be a game developer (which I really do), then I would obviously need to know trig, which I'm taking next semester. See, this is good. Offer classes I want to take, don't force them down my throat. I want to take trig so I can learn what I need to know for game programming, but I didn't want to have to take that stupid algebra class that I would never use again. I mistakenly took a honors statistics class this year; worst decision of my life. The teacher just throws packets of information at us and expects us to learn it for the next day. Then she hands out pages of homework for us to finish for, wait for it, the next day. Ridiculous. I have learned a lot, sure, but only by her standards. I actually only understand about 20% of what I've "learned". Which brings me to my next topic:

Learning Styles

I learn differently than everyone else, its just a fact of life that I deal with. In school, even though I try, I still manage to get only decent grades. I know I'm not stupid, its just I learn different. I think that I learn by pounding it into my skull, basically, and individual questions. If I need to learn something, I have to sit down for a while and just go over the notes, just over and over. I also love practicing solving problems, like in math. Give me a worksheet, an hour and some notes and answer my occasional question, and I'm good. I could use some music too though, it always makes me calm. The only teacher I've ever had that actually did this for me was for10th grade algebra II. He would listen to is, then work out the problems on the board all period if we needed him too. He would let us do worksheets and listen to music while he went around answering questions; I did the best I've ever done in school in that class because he taught how I learn. Thats the type of class I need, not the learn this information on your own bullshit classes. If I wanted to, I could learn how to do all this stuff by myself, the only reason I go to school is because its required by law and if you don't, you're probably not going to get a good job, which is stupid. Colleges and jobs should look at what you know and what your capacity to learn and retain is, not whether or not you have a degree. 

The thing that pisses me off the most is probably this; I've practically taught myself programming and 3D/2D graphics work and how to make games. My most recent project, a 3D voxel world, has taught me how to do trig, something that my school has yet to teach me. Yet, in school I don't get great grades. Why? Who the hell knows. I'm obviously smart enough, but just because I don't learn like everyone else makes me stupid apparently. My parents the other night told me how impressed they were that I taught myself 3D graphics work in high school without any help, and I realized that what I do isn't normal. I truly am different, yet no one recognizes it because we, as a society want mindless office drones. Oh well

Back to school for me.