2008-11-23

Days 73-70; ROOM AVAILABLE FOR RENT

Only 69 days left;

I was unable to get much accomplished; I lost a friend to the deadly frozen north this week.

As a result, I have 1 9x12 room available for rent;

Base rent is a fixed value of 316.50$ for rent, utilities are added on top (usually about 150 total, so rent stays below 400 a month)

Anyways,

I've created the BRF format specification, which is a generalized format for any data. As the original idea was not the greatest (wish I had some help) it was modified to merely specify a generic 4CC chunk based format so that chunk types are specific to the loader, and the BRF code has a lot of generic array routines and important conversions like htonl, ntohl and other equivalents (if you don't know and understand these functions, stop programming and get another degree. Or learn them.)
This allows you to inherit from the base loader class, and override either the generic load function, and read chunks as you will, OR:
Thread loading works.
This changes a lot of things, and enforces the need for a memory manager, because as you all know,
Threads cannot change values in another thread
What this means, is if your thread is loading a Mesh, then if that thread allocates memory, where did it come from? Ideally, it comes from your applications heap (threads share execution space) however, that isn;t exactly ideal. It's simple, and it does work, but if a THREAD allocates memory, and I am using a memory manager, then what happens if two things use that MM? Your CPU dies, that's what. Hard. Bluescreen easy.
So, to fix this, you must either make a new HeapAllocator that is for that thread, and then merge it with the main one, OR, add an additional mutex lock so that you can have the main thread itself create the memory using whatever heap it wants to.
In fact, the mutex solution is a good one, albeit slow.
In testing,
The normal loading procedure on a harsh test (5MB file, 4 bytes at a time) takes about 3 seconds. IT locks up the main thread too. yay.
The thread loader, operates concurrently with the main thread, dropping it's IFPS from 10000 down to about 3000 (which is still ~150000 FPS), however, the main thread continues to run flawlessly (meaning kinky loading screens are possible), BUT, the loading takes about 6-8 seconds. For a doubled loading time, I'll use the stream loading since it lets me load things behind your back, making level transitions flawless. Yay!

In summary:

*BRF format spec done
-Linkage files are separate.
*Thread loading possible and works

*Need to develop "MicroFormats" for each loadable data class.
-For example, 'Mesh' microformat needs to be developed (chunk specification for the generic BRF file)
*This necessitates a redesign of IGTL::RenderBase for the following reason:
-VA/IA paradigm is incorrect; Replaced with VD/PrimSet paradigm (more accurate, faster, abstract)
-RenderBase should not do anything that Graphics does; It should only manage the low level render state (IE, extremely minimal objectified support for abstracting hardware render objects like lights, materials, textures, VA/IA's), and the removal of immediate mode except in special implementations.

Also, the BRF specs don't make me 100% happy; I still worry about data concurrency and streaming issues like:

[tag][size]...
[data]...

Which should allow the header space to be loaded into memory, so you know all the chunks, and THEN the loader can continue on as normal... except, well, that requires nasty memory allocations issues, which is getting harder to work with across threads.

I should have had something out; Yesterday was supposed to be a milestone.

I failed.

-Z

2008-11-18

Days 76 - 74

Only 74 days left till demo;

Progress made,

I've correct multiple errors in SDLGameBase; Primarily with the Audio and Graphics setup, as well as tweaking it's loop setup.
Worked with IGTL::WMod music player; fun stuff there, looked up how to work mod files, made a few different players, still eperimenting
Updated the BRF 3.0 specifications greatly; I'm going to focus on that and RenderBase since I might have help in making graphics! (yay artists!)
Made some threads, working on the thread pool for procedural loading and fun stuff, although it hangs badly.
Got glextplus.h to work perfectly, extensions are now instant and very easy, as well as stable and no GLEW bullshit.
Played a bit with particles, I can now toggle correctly from HD to SD resolutions regardless of screensize
Screen resizing needs tweaking

Next,

BRF 3.0 format specs need to be finalized in mechanics, and then Section types need to be added, as well as the required basis data types. Compressions to implement (done before) are the generic RLE compression, Quad encoding (MIF/QIF image format) and LZSS generic style algorithm for some data compression. Also, more thought about breaking apart the different sections to make more logical sense.

Manditory screenshot for the dev blog:

Please note this is a SD screen with the HD box overlayed into it. Each green square is 1 meter accuracy, and you probably recognize that collision box from previous posts. The white thing is a "stream particle" that flows around, I was just playing with it so I could check visible FPS with the threads. SO YOU KNOW, the "FPS" is the fixed internal game frames per second (never changes), the IFPS is the number of frames run inside of that one game frame (yes, this is over 100,000 FPS (493,900 to be exact), try it yourself and see. You need this to catch network messages, but this will drop a lot when I get this thing fully threaded) and, I have the VBO (vertex Buffer Object) extension loaded and ready.

Only 74 days left! (Planned demo Feb. 2nd 2009) Wish me luck!

2008-11-15

I hate GM, I love Blender

So I hate GM again.

Usually doesn't take long. ;P


However, now I have developed a much more robust triangle stripping algorithm that directly translates into huge vertex/VA savings in rendering. This is a really good thing, as instancing a model requires copying the base meshes's vertex VA, which means each instance takes a good chunk of memory (for a 1300 vertex red dragon, that translates to ~1800 vertices for strips, or 3900 for raw triangles. So, each instance requires 4*3*1300 bytes, which is about 16 kB, lol)

Either way, now it's onto making good things like a Memory Manager so I can dump ram as I see fit, and do tracked allocations and all that low level shit that I shouldn't have to do again. Also, I now have to use VBO's (if you card supports them) to do the rendering, and this is a very interesting thing:

VERTEX ARRAYS ARE SLOWER THAN IMMEDIATE MODE

Why, you ask? Draw a picture for yourself. Immediate mode is a 1 direction pipeline. The GPU pipeline just gets pushed data. The end. Vertex Arrays require synchronization of the GPU and system memory, which is about like trying to unflush a toiet. My FPS drops from ~230 to near 20 with immediate mode versus VA's. With VBO's, I can get into the 780 FPS range.

Therefore, use VBO's. Make sure your array data is SEPARATE (do not stride) so you can easily plug in instance VA data.

More testing is required, but here is a toolchain picture that makes me happy:


Note that this is a goofy looking stupid lizard monster. Also, note that it has collision boxes (defined each by two verticies inside the keyframe). Also note, that that collision information is exported correctly into SDL. Does this look anything like Mortal Kombat or Mugen to you? Exactly. The problem is, this lizard has bones. And, I had to write MORE scripts to convert it's animations into mesh keyframes. And MORE scripts to read and export the animation file that defines the animations, as well as game information like attack boxes and physics and so forth.

However, it's really nice to be able to quickly make something, and see it work in the game. No doubting that at all.

Until next update.

-Z

2008-11-05

Blender and Game Maker

So I got a GM bug again.

GM is quite fun to toy with, but WOW it can't do motion or collisions AT ALL. Anyways.
I have techniques to make it work, so I'm cool.

Also, I was thinking about it, and since GM can draw primitives like triangle strips, I figured I could make it load 3D or 2D Odin Sphere style models

So I did.


(cue more stupid goofy lizards monsters, but in 2D!)
Turns out, it works fantastically well, and, since I do all the sprite and modeling in Blender, I can reuse the work for just about anything. Plus, it's really easy and super fast to make animations in this setup. Unfortunately, Blender has a real problem that I'm going to complain about for along time. (Why the FUCK did they put a KEYFRAME ACTION editor when the fucking keyframes are stuck on the GLOBAL timeline?!? REGULAR actions are LOCAL timelines, so logically, KEYFRAME ACTIONS should FUCKING be on the FUCKING local TIMELINE!! GOD FUCKING DAMMNIT! ARRGHGH!!!!111!1!111!!)

But! It does work, and it looks way better than sprites when animated. I'll be fooling with this as a break, until I get more discrete space things to work.

If you like this idea, go try it out yourself, or IM me and I'll throw you the python script exporter I wrote for Blender. It's pretty nice to have.

-Z

2008-10-15

Busy stuff; Mental Agony; And booze to death

Been a while; Been to busy with my Game Co. to do much else; Lots to do, lots that needs to be done; And there are literally thousands of options available for usage;

I looked hard, very hard at some 'game engines'. Those of you who know me well know I hate them with a passion; There should never be a 'Game engine' there should only be a component based toolkit (define your interface before coding, idiots!) that can tackle the basic repetitive problems in games. It should also be documented, and very clean to work with and read. IGTL is slowly putting itself together more and more; More tools and abilities crop up all the time, and I wonder how to recruit more coders.

It comes to my attention that the complexity of building an engine isn't really so much in doing so; It's actually derived from two specific things, 1 being platform compatibility, the other mathematics. Trying to make things work on windows and mac and linux is magnitudes easier than it used to be, things are more standard. But in the REAL world, you end up still doing #define out the ass in order to make your cute little interface work per compiler per platform. I hate it, but there is no other way to get around it, unless you wrote code to write the code itself like I did. So far as tackling the huge collection of advanced mathematical problems in a 3D environment, most people wimp out and curl up and die when they see something hard. Instead of just thinking it through, they say 'I'll let someone else do it'. This is generally accepted for people on a budget and time constraint; I feel sorry for the people that have to 'just make it work'. On the other side of that, all of this math was ALREADY DONE in the 1930's, and has been forever repeated due to lack of documentation and academic jacking.
For example, when some jackoff starts writing articles about quaternions and rotations, they start talking about affine transformations, linear algebra, matrix blah de blah... and neglect to mention the ACTUAL PRACTICAL APPLICATION which means X forward, Y left, Z up, which is also called 'right hand coordinate system'. They also don't name functions that make sense; overloading operators, lacking any sort of conversion sense...

I really, really hate programmers. And programming. It's a horrible, stupid thing that we all have to re-do so many stupid problems because of industry incompatibility; I understand WHY we have to, but it still seems so wrong. Defeats the purpose of being sentient, almost. That's okay, because the promise of money is soon to fall, and everything will literally go to hell. Regardless of which way you vote (Obama rules!) you're still going to die.


....aaaanyways, enough of me bitching out code. Let's talk bidness. Logically speaking, I would much prefer to use a decent rendering system; OGRE kinda worked, but ended up being clunky, and bloated, and didn't work. G3D and most other engines relied on the MS compiler series; fine for them, shitty for me. OpenGL & GLSL is still the driving force behind all the pretty, and that works everywhere. So long as you write code to read Khronos groups' glext.h and create your own cross-platform glextplus.h so you can load extensions via macros for any platform (yeah yeah yeah, "glew did that already!". Have you TRIED using it? a$$.). Always, always ALWAYS use some sort of premade wrapper per OS. (SDL is good, wxWidgets is great, but not so much for games. Actually, in speed tests, SDL is slightly faster, but wxWidgets does NOT have correct joystick or media support. So use SDL for the game, console for the server, and wxWidgets for the dev tools. Simple as that.) Try using a 3rd party rendering system. If you have to roll your own, DESIGN THE GAME FIRST so you don;t blow your brains out trying to figure out 'oh emm gee, my occlusion culling super material shader proxy instancing node tree up my ass is broken!'.
Work with your team. Find out what they can do, and what data they are comfortable making. Use this information to build or select a uniform media type THAT HAS A FUCKING OPEN SPECIFICATION, dammit. And make absolutely sure it fits within the constraints of your game (for example, if you want IK, don't use a MD2, dipshit)

GAAARRGGHHHH!! I need more coders to help me. One guy can do it, but not without losing his sanity.

Here's a collage of old school demo stuff I played with. Since all the art (minus that green dragon) is mine, it doesn;t look good. Pretend I hired a 5th grader to make it for me.


This week I will be partying with my brothers in blood;
Tomorrow, WE DRINK IN HELLLLL!!!

2008-09-17

More weird dreams

Lots of weird dream things,

The first was a false God Versus true God problem, really long scene.

Basically, I was out at some shopping mall, playing a new version of beatmania with some kids I didn't know at an arcade. Buzzwords were going around about a new church, maybe meteorites that happened, and I didn't really know what was going on, but people began to leave and just walk away, like something was drawing them in. Apparently, there was this vibrant magenta stone that was percieved as God, and people were gathering around it as the stone began to split into more and more stones... which, would make people happy and joyous if they were near these floating stones. So people began to encourage everyone else to join in, and come rejoice at the rapture or some shit like that, but weirdly, it applied to ALL religions, which was an immediate warning sign to me. People began to try and push me to join this crowd, which was getting massive (millions) and people were just singing, celebrating with no cause. I observed this for a long time, before they began to get violent toward people that didn;t join them (I was the only one, apparently) and I tried to explain to them I didn;t believe in false gods, as I knew a true god personally and didn;t want to get trapped again. (Raesir) So, they began to mob me, this black guy and this older mexican lady were trying to fight me to force me to go near the circle, and THAT's when things began to go south... for some odd reason, the sky formed that ubiquitous spiraling dark cloud phenomenon, and out of it descended this ginormous lion form, that basically had no physical presence but provided a logical, known symbol to that idiot group of humans, at least before engulfing them all somehow. I didn;t care, I knew this was bogus, so they left as I got to the top of this cliff, which, it was weird, there was this very sharp non-rocky cliff, like a glaciar hole, that looked down into a nice forested area, it was at least a mile drop, and it had some lakes, and was a beutiful sight, but no safety rails or nothing, but it did have a road near it. It looked like colorado, actually, when I went there to see a real cliff like this. Either way! The beast turned toward me, having no power over me, and began to try and argue with me about why I would not join it. Some generic points like "I will provide all your needs, and wants, making you happy and joyous for eternity" and some shit like that, I didn't need much of a reply, more like "If you weren't as young as you were, you might be smart enough to know that is not the way things go. Go back to your idealized world" And so on. It's a pretty basic argument, going back to the "Alien Slug Problem" that goathouse immortalized. If a entity will provide you eternal ease of life and happiness, at no cost or detriment to you, then, what is the point of living? Turns out, there IS none, because then you just become a simple, happy animal, and are no longer part of a sentient race. Which, knowing what I know about some of my favorite alien's politics, that means that they can execute a sweeping order, and harvest you for food/resources without any guilt on the concious. Sounds about right. So anyways, after arguing the way the world works with a infantile false god, it relented, and put everyone back in the circle and left, leaving those purple rocks to be nothing but obsidian stones. People were real confused, and immediately got upset at being so close together with race, religion, and ideals. Pretty sick to observe, I know life isn;t that simple, but goddamn people; Grow up. then, I just smile to myself, knowing all these motherfuckers are going to die in the next round anyway. Worthless mortals.


The second, will, me and reed went back to the arcade, and he showed us a game he had made, "Mega Man X 4 - Zero Hour" or something like that, and it had basically boiled down to a extremely violent megaman game. It looked normal at first, but megaman had a slew of new abilities that were really fluid and fun to use, like ninja spikes to cling to anything, a knife in the spirit of the Z-sabre, the Z-sabre itself, specialized automatic aiming guns, and he could actually FIGHT for once, with kicks, punches and suplexes. So, runing around, stabbing the little yellow dudes, oild goes everywhere, he get's shot, lots of blood splatters and sound effects, it was really pretty damn funny. Another weird point was knockback was important, if you rolled, you could smash your face onto things, blood again went all over the place. So we watch him play to this frog monster boss thing, and he starts doing the dash jumps, and knfie's the thing in the face, but, well, it was a frog monster, so it bi him, and he mashed buttons to stab it's mouth to pieces to make it let go... he rolled back, hit his face on the wall, blood went everywhere, will was like, "oh that's it" and then dash kicked, shoryukened, and then did this mugen style punch kick punch punch combo on the dam thing, followed by stratigic Z-sabre use and THEN actually shooting it to finish it. Controls were real intuitive, it seemed to rely on context sensetive controls more than anything else. But yeah. Super violent Megaman is a BAD idea, but improving the mechanics makes it not megaman. Don't forget it.

As prelude to all of this, I had this resident evil dream again! It was nice, but, got more difficult, as the virus had been discovered in this office/mall complex building, so, we were coptered into the top (Wasn't this an arcade game?) and worked our way to the bottom, fighting these nwere, smaller and quicker deadly enemies, like 4 legged bity things, two leggeded winged death bombers, large generator enemies, and some nemesisis (nemii? nemisis's?). there were complications once we got to floor 1 though, as we had Chris and Jill with us, all STARS'd up like normal, and we encountered some newer bidpedal monster, with nothing for weapons but the environment, throwing whole desks and crap at us, making the rocket launcher and aiming pointless. We chased it into the basement via fire, and found a giant generic-gross slimy alien/mutant egg factory thing coating the hallways. So, we burned that, moved forward. Apparently, this led to the truck depot, so the dude got away by just going through an open door... who planned this?!? We chased, blew up the building, and then things just got fuzzy. there was probably a lot more too this, but I don't remember most of it.


But, so far as RL goes, well, I own a house? And it's slowly getting put together? Not much to say, asides from that indexvector is useful, as well as igtl_GLAppWrap being the next replacement for SDL, HOWEVER, the joystick support sucks nutz, so, I'll probably have to beat some children to fix it. Game company is going along well, as usual, they want demos, whiny bastards.

Peace ya'll! Maybe I'll have this pimpmobile ready when Oct 15-19 rolls around.

2008-09-04

HOUSE CLOSED

As of September, 02, 2008, I am now hugely in debt.

Congratulations! I'll make videos as I move in since I get evicted the 7th! No time to do anything else.

Peace homies!

2008-09-01

Potential Rift in Chaos

I may close on my house tomorrow.

This means I may vanish for a month.

Do not read the below if you are squeamish.

...


So, I was cleaning my house. Well, it's not technically *my* house yet, but my Realtor gave me the thumbs up to go ahead and clean it as much as I could without doing any damage to the home. So naturally, I get a steam cleaner, a 50$ in chemicals, and two 75$ bottles of 'MadaCide' which you normal mortals can't buy. So we clean. And we clean.
There are three primary spots; Two of them are catheter bags that had leaked onto the floor, the urine itself when pulled up contained blood (brownish color) and was pretty odoriferous. One of the stains was insanely large and did contain feces/sediment from some other type of accident, partly bloody too. I didn't care too much, we used the steam cleaner dozens of times, pulling up more and more urine each time. It must have soaked all the way into the pad, so I eventually conceded defeat, and rented my RugDoctor for 25$ for 24 hours, and bought 4 bottles, 2 of pet odor and stain, 1 odor and soil, and one regular cleaner. We went over each spot almost 5 times with that doctor, each time was less and less bloody, and the smell was eventually going away.
So, after playing with urine for hours, we eventually just doctored the entire carpet and moved on. We had tag-team going, so it went quick, we got most of the spiders, webs, and bugs out of the house, and it actually began to feel more movable. Though, I only worry about termites now...