The luckiest guy in the world
Below are the 10 most recent journal entries recorded in the "slayemin" journal:
[<< Previous 10 entries]
I'm getting progressively stupider by the day.|
God damn, I'm getting stupider and stupider by the day.
Today I spent two hours poring over code, trying to figure out why my #include
was failing to include a generated header file. I was convinced that it was because my project build directories wasn't including the correct path. I checked it over and over and over again, and it was all correct. I tried deleting the header file, regenerating it, etc. It didn't work. Then I copy the header file into a directory I *know* is including other header files. It's still not finding this header file. I'm getting frustrated. What the hell is going on?! Why can't it find my header file? I'm looking at it right there in the directory! WTF is happening?! Then I look at the file names. They don't match. God fucking damn it. I'm stupid.
It was "MageMaster2GameClasses.h". It needed to be "MageMaster2Classes.h".
Three fucking hours wasted (although, I learned a little more about the engine in the process). Hurgh!! Now the day is almost over and I have to go home, but I'm not ready to go home yet. I need to get some fucking work done!
Here's an interesting quote:
"Take everything in moderation"
That seems a bit self-defeating since it begs the question:
"Does that include moderating moderation?"
If you answer "Yes", then you are advocating for taking everything in moderation, even moderation, which means that in some instances, you're not taking something in moderation, which then means that you're not taking everything
in moderation, which therefore, is a logical contradiction and is absurd.
If you answer "No", then you are NOT taking everything in moderation, namely moderation itself, and thus the chain to a logical contradiction is very short.
I guess this is a variation of Russels Paradox
In the practice of life though, ignore the paradox.
Take everything in moderation, including moderation itself.
For example, if you consider drinking alcohol, nine times out of ten, you shouldn't overdo it. That one other time though... go just a little overboard! (ie, moderate your lack of moderation)
Apparently, Buddha spent several years starving himself in order to find nirvana, which is the pinnacle of enlightenment. One day he just decided to stop starving himself (he probably realized it was crazy), and became an advocate of "the middle way", whatever that is, as the best path towards enlightenment. I like to think that he stumbled onto the idea of taking everything in moderation.
I'm filled with confusion and self doubt right now.
I'm rethinking the initial vision I had for my game. I'm realizing now, as I really sit down and think about it, that there is a huge disconnect between the strategic game play I like and want, and the tactical game play I like and want. I'm realizing it's not going to work how I wanted it to.
So, the idea was that you design a wizard tower, with specialized rooms which contribute a functionality to the game. You can also design a village around this tower, starting from the barest beginnings and rising to grandness through the hard work of your minions and your wise leadership. Somehow, this was all supposed to take place on a strategic map, which is turn based, and it should also happen in real time. Contradiction alert! Then, you're also supposed to be able to capture territories on a map and harness the resources they provide. Each territory capture is a battle with the resident owners. Now, how does your wizard castle factor into this?? It just doesn't, unless the territory under siege is your castle province. That's rare as hell, so what's the fun of designing a complex castle with walls and traps if nobody will try to assault it? I could tell people to build castles in every province they capture, but that would quickly turn into a management nightmare for the player as their empire grows in size -- so, it's unfeasible as envisioned due to human limitations.
So, I'm thinking about scrapping the strategic world all together and integrating it with the tactical world I'm working on. The tactical world will have to grow in size by a lot to look like a proper "world". But then the question becomes this: If the tactical world is the whole world, how do I create levels? The Eador game called them "shards" of a broken world, and you conquer each shard world in order to reassemble the main world. I kind of like that idea. The castle building game "Stronghold" had a long campaign sequence of different maps with different opponents you could play. There wasn't any technological progression between campaign maps though, so it was a bit flat but still fun.
I don't know what to do. I'll have to spend more time thinking and planning out design before writing more code. I think this might be a healthy exercise.
I think I've come to a cold, hard realization: I am truly an idiot. I am an idiot who does smart people things (math, chess, programming, etc), but do idiot things. I am just so dumb! The only reason I am half knowledgeable is because I'm too dumb to know when to quit, so I just preserver until I get it. I remember taking this advanced logic course. It was the hardest class I've ever taken. It started off with an overflowing classroom, with about 40 students. By the end of the term, there were only 15 of us left. Everyone else had dropped the course. I probably should have dropped it too, but I love logic and I was taking the class for fun. I realized I was struggling, and rather than giving up like everyone else did, I pushed harder and went to office hours after class every day I didn't understand something. I passed the course with a C or B, I don't remember, it doesn't matter. I imagine I pestered that old teacher every day though and he must have thought, "Here is another idiot, too dumb to know how dumb he is. *sigh*"
I have recently been trying to figure out the mathematics of projectile motion. It is illuminating to me that all of my mathematics courses have completely and utterly failed me. I know how to plug in numbers into an equation and how to get a result out of it. But I don't know which buttons to press and when, which is the critical part of applied mathematics! It's like, someone taught us how to spell a bunch of words, but nobody taught us how to combine them together to write meaningful sentences! So, my struggle with projectile motion: I've got a creature standing in 3D space at any given point (note: they can have an elevation) and they are trying to shoot an arrow exactly at another given point in 3D space. The arrow is launched with a constant speed. So, what angle do we have to shoot at in order to hit our target on the first try?
This is a particular shame for me because I have a freakin' background in artillery ballistics! But when we were doing artillery ballistics calculations for howitzers, we only needed to figure out two things: The range to the target and the deflection (horizontal angle). Once we knew the range to the target, we could decide how much powder we wanted to use. Our projectiles all weighed the same, so the amount of powder used determined the muzzle velocity. Based on the range, we used a look up table in a book to figure out how much to elevate the turret for various amounts of powder. It was stupid simple too. How did we figure out the range to the target? We literally measured it with a straight ruler on a map. There was little or no mathematics involved. We'd also factor in air resistance, windage, earth rotation, powder temperature, round spin, and air density into these calculations, but it was mostly just more empirical look up tables rather than actual calculations.
In my scenario, I'm doing simple newtonian projectile motion: Position is a function of time and velocity. Velocity is a function of time and acceleration. Acceleration is just the gravity constant (I'm ignoring air resistance and air density). I can give my projectile a velocity and fire it off and it goes in the direction I want, but it doesn't hit the target. I could do the "artillery" technique, where you just do a bunch of successive adjustments until you hit your target, but my intuition says that there is a mathematical equation which would give me the firing solution on the first try with much less work. I can't find it. That's why I'm stupid. That's why mathematics has failed me. That's why I'm an idiot. It's time to just give up and see what other, smarter people have come up with. I'm sure if I banged my head against the wall long enough, I too could eventually figure it out, but I rather like having my head unbanged.
I was just thinking about the moon, stars and planets and how to categorize them. I could call them all "celestial objects", which means "objects in the sky"... But think about it: Every star, planet, moon, and rock floating in space can be more simply generalized as "lumps of matter". Intuitively, we tend to make a distinction between the moon and the sun. The moon is a very boring rock (by comparison) which just reflects sunlight into our eyes. The sun is a very active blaze of nuclear fusion which is so hot and so bright that it's bright white and hurts our eyes to look at it. Yet, the sun and the moon are the same. If the moon was just as large as the sun and was composed of the same elements, it too would be a sun. I hypothesize that just about any "lump of matter" which reaches a critical mass will ignite. We know that the critical mass has to at least be larger than Jupiter and smaller than our sun. Whenever that critical point is reached, a new star is born. I suspect that the laws of the universe can be understood by understanding particle physics completely and will turn out to be quite basic and fundamental.
You know what blows my mind? Atom smashers. You accelerate an atom to speeds near the speed of light and then you collide them into another atom going in the opposite direction. It's crazy when you think about just how small an atom really is. Just to give you an idea on how small they are, think about this: There are more atoms in a teaspoon of water than there are teaspoons of water in the atlantic ocean. We're taking TWO of these teensy atom things, making them go REALLY fast, and then crashing them into each other to see what happens.
You know what's even MORE crazy?! Atoms are composed of protons and neutrons, right? And protons and neutrons are composed of "up" and "down" quarks. A proton has two up and one down, while a neutron has two down and one up. In essence, a "balanced" atom has an equal number of protons and neutrons so that it also has an equal number of up and down quarks. Here's where it gets crazy: At that sub-particle level, quarks seem to come out of nowhere. That means that at some point, MATTER comes out of nothing (and turns into nothing as well!). This means that *something* can come out of *nothing*. It's not implausible to believe that the universe slowly just "appeared" from nothing. If that's the case, then it would make sense that the universe is still being created. We can falsify that idea easily enough if we can prove that the universe is neither gaining or losing mass/energy. So, I wonder if the universe is gaining more mass over time? I wonder how I could find out... Is it even possible?
Day 60: Stupid Developer|
I am slowly coming to a humbling realization that I may actually be a bit stupid. No, really. I think I really may be stupid. I have my moments of brilliance here and there, but by and large, I am stupid. It's a discomforting fact which gets manifested over and over again as I struggle with basic trigonometery and linear algebra.
Example: Just now, I went through this thought process.
"Wait a minute. Does it matter which order I rotate in?! Would I get different orientations if I apply pitch first followed by yaw, instead of yaw followed by pitch?! Shit! I may have been doing this wrong all along! Let's get a pen and rotate it in different orders."
*Rotates a pen in 3 dimensions*
"Shit, this is still too hard for me to visualize. I need another pen to act as another axis."
*Grabs another pen and orients it perpendicular to the other pen and then performs a rotation*
"Wait, I don't get it. Did I do it right?! Why am I struggling with this?! Let's try this again."
*proceeds to repeat the same experiment five more times because the first time wasn't obvious enough*
"Well, my conclusion is that it doesn't matter whether I rotate by pitch followed by yaw or yaw followed by pitch. Either order ends in the exact same orientation and result. Shit, why did I have to confirm that?! It should be obvious. I bet everyone else knows this intuitively and don't have to waste time on basic experiments like I do."
I am finding that I really have to dumb everything down for myself. Here's another thing I did today:
I am tired of doing a bunch of calculations and seeing a decimal point number which looks like a very important number, but not being able to remember why it's important or how I got it. For example, the number 0.70710678 is a very important number. It is equivalent to sqrt(2)/2, cos(pi/4), sin(pi/4), 1/sqrt(2), and sqrt(1/2). I can never remember that shit. So, I wrote it down. Then I spent a few hours looking for other meaningful numbers and writing out their relationships with trigonometery. Now, every time I see one of these magic numbers, I don't have to try to remember why they're magical. I just look down at my nice chart and see what they really mean. Wouldn't someone better at mathematics not need this cheat sheet?
I just feel like a developer worth their salt would know this shit like the back of their hand and wouldn't need to dumb anything down like I do. Heh, I guess on the bright side, if I dumb everything down enough, it leaves less chance for error... or does the need to dumb things down mean that I'm dumb and am thus more likely to cause errors? I don't know. One thing for sure though: programming is humbling and I am being very careful to test all of my code to make sure that it does exactly what I am expecting it to do. No funny business! If I'm not 100% confident in the integrity of my code, I don't move on and build on it! If that code has subtle errors, then the tendency is for those errors to propagate to everything which depends on it. Then, the dependent code has a bunch of "hacks" which try to massage the outputs to work as it should (fixing the symptom instead of the cause). Very bad. At least that's something I can call myself "smart" for doing.
I don't know why I bother to post. Nobody reads this shit. It doesn't benefit *me* in any way to spend time writing about what I'm doing and/or how I'm doing it. I could be spending that time writing more code. I guess I have this lingering fantasy that some day down the road I'll be a bit more well known or famous and people would actually be interested in reading about what I have to say. That may just be a delusion of future grandeur, right? In this fantasy of mine, I have this strange belief that a mind is a holy temple and its products are the thoughts and ideas which come out of it (which is why I believe promoting a healthy mind is great). Some day, lots of people might wonder what kinds of problems I encountered and how I overcame them. Like, right now I'm struggling to figure out how to stitch together two chunks of terrain mesh which are of different resolution while avoiding the gaps caused by T-intersections. It's a bit challenging, but I have faith I'll figure it out if I keep pushing at it as hard as I can. Then I can write about my solution and people will find it helpful in solving their own problem, and then they'll search more of my stuff and find that also helpful, and then they'll mentally bookmark me as a good resource for knowledge. But, what's the point of all that if it doesn't directly benefit me?
Right now, I'm not going to create any articles on anything because:
1) I don't see the point
2) It's too much effort to setup the infrastructure (website hosting & blog)
3) It'd take a lot of effort to create articles to my standard of quality
4) They're not going to get read, so why do it if nobody is reading?
5) I'm a nobody.
By the way, this Nightwish song ("Over the hills and far away") is bad ass.
Game Dev: Day 8|
Yesterday was a complete waste of a day. I didn't get shit done. I just couldn't muster the motivation to start writing code for hours on end. The only thing I did was discover a subtle bug in my terrain rendering code. I had extra, unused indexes in my index buffer. I wanted to know why I was allocating more memory than what I was using.
Today, I fixed that bug. It turned out to be just the tip of the iceberg for what was going wrong. By default, every indicie is initialized to 0. So, if you have a few extra zeros at the end of your index buffer, the last few triangles at the end of your triangle strip get a nice long artifact going right back to the first vertex. Messy, messy, messy... Anyways, my "hacker" instinct is to just decrease the amount of required memory without actually taking the time to understand the cause of the problem. In this case, that would simply be treating the symptom of the problem rather than eliminating the problem itself. I don't want to start hacking anything together when I'm starting at the bottom foundation of the code, so I decided to do a bit of in depth investigating into what exactly was going on. I pretty much had to start over from my conceptual understanding of how I'm drawing out my terrain grid and verify that each line of code was doing exactly what it was meant to be doing. My vertex generation is super simple and worked just fine. My indexes were a bit complicated and therein lay the bug. I changed the terrain texture I was rendering such that it would be a non-square dimension, and then tested my indexing code. For some mysterious reason, I was getting array out of bounds errors. I discovered a bunch of problems!
First, I was not correctly calculating the actual number of indices I needed. I was assuming that my terrain objects would always be perfect square dimensions. Non-squares showed the error of that way, so I fixed it, verified it over and over again until I was certain I got it right.
Second, I was still creating an unnecessary "ghost" triangle at the end of my triangle strip which was throwing off my true indices count.
After I updated my indicie code, it looked much more simple and elegant and it also fixed all of the bugs I discovered. I'm so glad I decided to actually figure out what was actually causing the crashes rather than just doing a quick "hack" to fix the symptom. I find that those quick hacks tend to just kick the problem down the road and they grow in size and take longer and longer to fix them.
Software engineering principles:
1. Truly understand the problem you're trying to fix, rather than hacking together a solution to the symptom.
2. Use conceptual models to diagram the problem you're trying to solve. I use MS Paint and Photoshop to draw out what I'm doing. Photoshop is slightly better since I can toggle layer visibility, but it also takes a little longer to draw out my model.
3. Test, test, test, and then test some more. Test each line of code against the conceptual model.
4. Don't throw away your conceptual models. If you get a bug, you can bring up your conceptual model to help trace it. If you throw it away, you just have to recreate it from scratch, again.
5. Usually, problems are HUGE. Break it down into the smallest piece you can and then solve that small piece (See #3
). Once you've got the small piece working, you can grow the problem size by an order of magnitude. In my case, I just created a 3x3 patch of terrain, followed by a 5x5 patch, and then a 20x20 patch. If there's a bug, it's much easier to find it in a 3x3 block of memory than a 20x20 block of memory or a 1000x1000 block of memory.
Anyways, I'm moving on to calculating the normals for each tile in the terrain. It's proving to be a bit more challenging than I anticipated. More to follow.
Game Dev : Day 4|
I've started to work in earnest (sort of) on this game I've been meaning to create. I don't know what I'm going to name it. I don't know what I'm going to name my company. I think, at this point, none of that matters.
So, this game I've been thinking about building is going to be a bit of a mashup between the Total War series, Final Fantasy Tactics, Dofus, Magic the Gathering, and the Tower Defense genres. You begin as a weak magician in a realm which is hostile to magic. It is illegal to practice magic, so any magicians caught by the kingdom are executed on the spot for sorcery and trickery. Naturally, all magicians have gone under-ground. Some have become witches in the wilderness. Others have become priests. Others have become hedge mages. Some have even formed secret underground societies for their kind. Unfortunately, these secret societies are not regulated in any sort, so some of them may be dark and evil societies intent on summoning demonic beings, mastering death, etc. All magicians draw their power from the surrounding lands. Only one magician can draw power over a land, so magicians tend to spend lots of effort maintaining their grasp over their domains.
Over time, some magicians have become so powerful that conventional means for disposing them are useless. They openly practice their magic and flaunt it in front of all the kings in the kingdom, showing off their power and how inept the kings are in stopping them. Naturally, this affront to their authority infuriates the kings, but through the wise council of their councilors, many thousands of men have not lost their lives in vain battle.
Anyways, as a weak magician, you must avoid getting your head cut off by the kings soldiers while growing in power and trying not to get fried by another wizard.
The game play itself takes place on two types of maps. The first map is a grand strategic map which has villages, towns, cities, castles, etc. You move your avatar across the lands. You can decide to place your wizard "house" anywhere in the world. Your house is a representation of your power. Some wizards choose to create a grand tower to openly display their might, others decide to disguise it as a shack, and others live without any obvious distinction. But, be careful! That wilderness witch living in a shack out in the woods may be much more powerful than the dainty shack suggests she is!
The second type of map is the battle map. This map is much more similar to total war in terms of game play. You, the wizard, typically start off a battle facing off against another lone wizard. Unlike the Total War series, in this game the focus is a bit more on magical game play (I mean, it's a fucking magic game!). You begin by channeling into the magical ley lines for the territories you control. The opposing wizard does the same thing. Once you've got at least one ley line established, you can begin tapping it for magical energies to fuel your magical spells. Some spells will summon creatures onto the battlefield. Other spells will deal damage directly to anything else on the battlefield. And, other spells will be enchantments which strengthen or weaken your forces. Even more subliminal, you can curse your targets to death and/or deny them their magical fuel by cutting off their ley lines. The battles begin at a slow pace, but as your wizard grows in power, the battles become powerful, epic and very fast paced. You're not only controlling the spells of your wizard, you're also trying to manage your troops on the battlefield. For this reason, battle can be paused at any time to issue orders.
Anyways, blah blah blah. I could spend hours writing about what I'm imagining. None of that matters. What matters is being able to execute. The game at this point, is mostly a nebulous idea.
On Thursday, September 5th, I began working on this game. Prior to this, I've been working on creating a code library with a bunch of useful widgets and systems (such as particle systems, physics systems, datastructures, etc). Now, it's time to stop with the bullshit and just start making a game. That should be my primary focus from now on. People aren't interested in libraries -- they want games. So, I'll give them a game. Not just any game, but a game made for me and worthy of my time, love and dedication as a player and as a developer. It's going to cost me a lot of time and money to make this, but I've got both in abundance. By the end of the week, I had a black screen/window thingy. Last night, I had a working menu system and the ability to transition between the different game application states (strategic view, tactical view, menu). It's a very humble beginning, but all great things begin from humble origins, right? I'm just a level 1 wizard at this point. Going forward, I'm going to have to invest a lot of time and energy into making this game. The more time I spend on it on a daily basis, the faster it gets done and the more momentum it has and the more inspired I am to continue working on it. In my experience, the currency for game production is motivation.
Let's talk about faith for a bit.
I'm a nobody at this point. There are thousands of games out there created by very talented people. Getting your foot in the door is next to impossible. I can slave away for months or years and it could all be for nothing. I wouldn't get a single red cent from my efforts. That's just the way it goes. But, I have to recognize that some things are not in my control. Other things are. I think, the game I create is entirely in my control (considering I'm the only one creating it at this point). If the game I produce is a masterpiece of art, then it'll speak for itself and sell enough to cover my costs... I think. But, I've got a lot of failed game projects in my past. What's to say that this won't just be another failed project, like all the rest? I honestly think that I haven't actually completed one game I've started on. I've worked in the past as a professional developer and I've soloed every project and completed them fantastically. So, I know with 100% certainty that I have what it takes to see a project through to the end. Now, I'm not the only one who knows that every game project has been a failure with me. My mom knows and she takes a cynical attitude towards my future projects. "You're not going to finish it!" she says. "You're going to fail!". My mom isn't alone either. My girlfriend is deeply concerned and doubting me as well. This whole time, I'm not going to be "working" and "earning money" to put towards buying a house or something which would lend financial stability towards raising a family. By spending time on my game, I'm pretty much gambling that my time isn't being wasted. The only saving grace is that my money is earning interest on the stock market and its enough to assuage any financial worries I might have. In short, I doubt myself with everyone else, but I think my faith in myself and my abilities is greater. I can do this. The number 1 most important thing is going to be to make sure that I work my ass off harder than I've ever worked. That's the true secret to success, and if I want it, I gotta do whatever it takes.
I hope that some time in the future, I'll be writing about a successful commercial launch of my first game and celebrating with champagne.
Man Love Thursday|
"Man Love Thursday" is a weekly recurring event between grown Afghan men and boys. Essentially, a group of grown men will take turns gang raping a young boys ass. At first, the boy will scream, struggle and holler in strong protest. Over time, they eventually just submit, bend over and literally take it up the ass. The local saying is "Women are for breeding, boys are for pleasure.". Why do they do this on Thursday? Because Friday is their holy day to worship Allah and ask for absolution/forgiveness for their "sins". Yet, they do it every week. If they're truly repentant, they'd never do it again, right!?
So every Thursday night, a group of pedophiles get together to rape boys in Afghanistan. Nobody does anything about it. They boys obviously get serious medical problems as a result, where bits of large intestine may hang out of their sphincter due to the frequent, rigorous, unlubricated rough anal sex they receive. It has become so widespread amongst Afghan culture that it's become a culturally accepted norm.
This strikes me strongly. Cultural relativism as a moral theory is completely wrong and misguided (Claim: Everything is wrong or right depending on what the general culture says is "wrong" or "right"). Obviously, cultural relativism fails to take into account the fully informed and willful consent of all individuals -- otherwise, we have to say that the gang rape of young boys by men is morally acceptable by the standards of the culturally relativistic moral theorist.
Complete and utter bullshit. Cultural relativism is dead in the water.
I believe that whatever objective moral theory is best, it has to strongly take into account the fully informed and willful consent of all individuals.
[<< Previous 10 entries]