Archive for January, 2009

h1

spelunky! + projects + GOGGLES OF DEATH

January 31, 2009

So, I came across a great indie game called Spelunky!  It’s unbelievable.  Imagine every rogue type game you’ve ever played, then imagine that the micromanagement components were replaced by fast paced platforming.  Now imagine that it’s all wrapped up in an awesome Indiana Jones cliche with hilarity abounds!  That’s Spelunky.  It is by a gentleman by the name of Derek Yu.

It has the idol on a pedestal with boulder trap deal, it has the damsel in distress deal, it has crossbow mask traps, spike traps, and monsters.  You can throw ropes and climb on them, you have bombs, you can visit shops to get things, stuff like that.  You can even kill the shop keeper or the damsel if you really want to!  Anything and everything can be done to anything and everything.  Rogue game like concepts and flexibility, platformer fun, Jones ancient cave defiling humor.  Did I mention there’s old school chiptune tracker music in it?  GOOD music.

What else?  Well, Dr. Liow gave me some side projects, because he rightly figured that my classes are too boring.  One, a topological solver.  Two, a Qix clone.  I’m making progress on both.  We’ll see how it goes.

The one you guys would probably like is the Qix clone.  If you don’t know about Qix, it’s an old game that introduced the fill it in concept.  You basically fill in the area around a bouncing Qix (laser line thingy) without being hit by the Qix while out in the open.  You must capture a supermajority of the area around it.  There are sparx on your inside loop (the only place you can move on aside from drawing new areas) forcing you to go out in the open.  They will always hit you if you don’t venture out, because you are on a loop, and one travels clockwise and the other travels counterclockwise.  This wiki should shed more light on the specifics for you.

I’ve designed a reversible linked satellite list to solve the topology problems of this evolving loop structure with nodes linking in from outside.  It actually iterates and traces the structure keeping track of old values, so we never go backwards.  This means the topology of the list is NOT effected by switching the nodes.  This allows us to have a much looser and more dynamic linkage structure, essentially freeing us from explicit directionality.  This not only allows reversal of a satellite list in constant time, but it also means that it becomes completely unnecessary to calculate a path for the sparx to get on to the main path.  They just launch two iterators, the first to find the main loop wins, then two iterators are launched from there to find the clockwise / counter clockwise relationship on the loop for you.  This important as the order of the links on the nodes is arbitrary with this structure!  Tasty data structures abound, I love it.

Lastly, at the roller rink on eighties night, there are many interesting people.  Among them is a girl who wears traditional costumes with goggles.  All the time.  And she got an UPGRADE!  The old welding goggles were cool and all, but she now has a pair of GERMAN DRIVING GOGGLES WOOO!  And she built in some crazy awesome magnifiers that look all evil geniusy.  And in the discoed out light show, they’re even cooler!  Observe:

MWAHAHAHAHAHA

MWAHAHAHAHAHA

I’ve got a history paper to write, and I need to have my programming assignments (my actual for credit ones) done by Monday.  So I’ll catch you all later.

Advertisements
h1

first week at college + what parents have always done wrong

January 16, 2009

Well, it’s friday, and apparently I just went through a week of classes.

  • Programming: introductory course CISS240.  FUKKEN EASY.  Not even up to syntax yet, just basic form.
  • English composition: ENGL 101.  Interesting.  Has a lot of stuff on logic driven writing so far for arguments.
  • Western Civilization History: HIST 102.  A little interesting.  The professor is kind of obnoxious and arrogant though.
  • Art.  Appreciation.  FUCK.  THAT.  SHIT.  Don’t get me wrong: I appreciate art, but I DON’T appreciate being told how.  It was the only gen ed class I could take from my late registration, and I am NOT HAPPY WITH IT.

So far, I have found the atmosphere relaxing and enjoyable.  Mostly it is the fact that I’m not being hounded every step of the way about everything.  I actually have freedom.  And… hey guess what?  I’m doing fine!  I guess my problem WASN’T that I didn’t like learning.  Which I always have.  It’s that I hate authority, and prefer to deal with others as equals.  I shouldn’t be told what to do by teachers, and I shouldn’t disturb the teacher.  The cut ups in class and the tyrannical school system both disgusted me, but those days are over.

I can visit my professors to talk with them, and we kinda just chat and talk about classes and stuff.  They aren’t ever so superior acting, and this allows me to be comfortable.  And I therefore accomplish more and cause less trouble.  I’m willing to bet my nuts most kids cut up as much as they do because of the fact that they’ve lived with bosses and authorities their whole lives.  It is the only expression of freedom they have, and they must even so be separate from others to express it.

When I was little, my parents never told me what to do.  What they did was say “here’s what you should do, and here’s why.”  Small children absorb everything they are told, so it is just as effective, but motivates them internally by giving them a reason over a pathetic external threat.  I do what I do because I want to.  The trick is to get your kids to want to do the right thing.  The reason temptation has always been considered evil is because most people are shown evil from the start as the way to go.  Hit that kid and make him shut up!

I guess my point is that in a world in which we raise our children properly, there would no longer be authority, or at least not unfounded or nagging authority.  To hound someone every step of the way wears them raw.  To hurt someone and threaten to do it again if they do it wrong teaches them to avoid being hit.  So what if you aren’t there to hit them?  You can’t keep someone in line effectively if you make it dependent on something outside them.  The solution is to make good pleasant, not a hard thing, that you better fucking do you sinner!

See my point?  There is a satisfaction is serving the greater collective.  The self is an artificial construct, and once you realize this, you can define it however you want.  It goes from being I am me and they are the others to we are the sentients.  So to serve the greater collective is to serve the self all the same, but a greater one than you and you alone.  As they say “you get out of life what you put in to it.”

h1

famous last words…confirmed

January 8, 2009

So I’m REALLY starting to freak out that maybe won’t get in to college.  Because while I’m certainly eligible, I got this crappy email that tells me: “yeah, you want a student loan?  this is your student ID, which you’ve had since before you were even sudo admitted.”  thanks for being clear, assholes.  I only have ONE WEEKEND to register for classes and get my fukken act together if I’m even in, which I don’t know, because they AREN’T BEING CLEAR.

Okay, thank you for your cooperation in terms of listening to a rant.  WAIT!  IT’S NOT OVER!  Some drunk fucker wandered in to our garage and started knocking things over!  Full story here.

But anyway.  Those it-should-be-easy-to-get-depth-targets-to-work-in-Direct3D last words?  Yeah.  Apparently, it can’t handle rendering to a depth texture, so you have to create a depth stencil render target.  But you can’t just use that.  Ohhh, no.  Apparently depth components can’t be reinterpreted without shaders.  This makes no sense, as OpenGL has had this capability FOREVER.  So it actually takes a simple pixel shader to copy from the depth target to a usable texture, a red only format texture.  Talk about clumsy and stupid.

So the long and short of it is that I now have to have two classes of rendertarget, (yes, even for OpenGL as I can’t break unified API,) one for color and the other for depth.  In OpenGL, it’s actually the same class with two settings.  In Direct3D, it’s two seperate classes.  pfft.  I don’t like it, but I’m pleased to say that the actual API needs only ONE outwardly apparent change.  The CreateRenderTargetTexture() method now has a new argument: targetmode, which can be RAVEN_RENDER_TARGET_COLOR or RAVEN_RENDER_TARGET_DEPTH.  The rest is transparent.

Sooo… yeah.  Workin’ on it.

h1

WOOOOOOO GDB WINS!

January 6, 2009

So, I managed to isolate EVERY KNOWN BUG in RAVEN so far, and fixed them.  I feel good about that.  In addition, rendertargets are working in Direct3D.  I will add a depth target texture  for Direct3D rendertargets soon.  I also fixed the font not pixel perfect issue with Direct3D.  I had to shift the X,Y coordinates by -0.5, because apparently even untransformed vertices in Direct3D are not mapped directly to pixels.  Stuuuuuupid.  And I also added an alpha argument to the material constructor because having to set it after the fact is just plain hackish.  That also solved the fact that alpha wasn’t explicitly initialized, causing consistency problems.  Big time.  Another bug that was fixed.

All thanks to my l337 programming sk1lz and GDB.  Is there anything GDB can’t do?  Excellent debugger AND payload delivery system if you happen to be a hacker!

All I have to do at this point is get the Direct3D rendertarget working with a depth texture and stick in HLSL support.  It shouldn’t be too difficult (famous last words…lol) so stick around.  Then I can maybe add bitmap font support!  I’ll probably take an Irrlicht approach on that one, I really like their method.  I feel like this project is seriously trucking along!

And… I really hope I get my ACT results back soon enough to register for classes.  I feel somewhat worrisome.  If I can’t follow through, I’ll have to wait ’till next year.  And then I’ll have to wait and feel bad about myself… sigh.  Here’s hoping.

EDIT!

Seeing as how no one has commented yet, I feel fine just editing this post.  Here are some screenshots of the rendertargets working in Direct3D!  OpenGL is exactly the same in appearance, so really no need to post them.

If that isn’t just balling, I don’t know what is.  Next up:  HLSL support!

h1

wooo, fonts! and materials! and manga?

January 5, 2009

FONTS ARE FINALLY WORKING IN DIRECT3D!!!

They are!  There’s kind of a texture sampling issue with it, but that’s insignifigant, and they look fine.  It might just be shitty Direct3D texture coordinate precision I can’t do a damn thing about.  So here’s the screenies:

Direct3D 9 Test (fonts aren’t quite pixel perfect):

OpenGL Test (fonts are pixel perfect):

It may be a fencepost error on pixel ratio calculation that causes the font pixel precision problem in Direct3D.  I’ll fix that.  But hey, I can now finally get rendertargets working in Direct3D.  Then I’ll implement HLSL support with the same shader object class interface, and I’ll be up to snuff.  I’ll finally be able to start expanding the functionality again.  One thing I want to do is to add a streaming mode for vertex buffers so I can do dynamic vertex stuff.

Hey, did you notice the tasty per vertex alpha there?  The backface culling is disabled for this test, as it would keep us from getting this cool semi-transparent cube effect.  I have a boolean material setting in the material class that lets you switch between using material and vertex colors.  This is clearly vertex colors.

As you can see, I’ve also separated the specular component in OpenGL (using the extension, no multiple pass techniques unless it’s REALLY neccesary) in order to mimic the behavior which is default and usually used for 3D games in Direct3D.  The applications I develop for this should have as consistent and standard an appearance across platforms as much as possible, and this is really the best specular look (fixed pipeline wise anyway) for most surfaces.  If it’s otherwise, there’s always a shader for that.

I’ll have it all caught up on the Direct3D end soon.  At which point, further feature development begins.  Here’s something I want to add: Windows builds will use DirectInput for input.  This will allow me to code for my gamepad, yay! 🙂  GNU/Linux will use xorg devices for gamepads, same as all devices on GNU/Linux.  I may need to borrow a friend’s joystick to code for that.  We’ll see.

But hey!  I just recently started drawing manga again, which was my original art style.  I used to only draw manga, which I shifted out of at one point.  But I thought I’d make  another crack at it, and let me tell you.  NOT like riding a bicycle.  I’m just getting back in to it, this is a doodle I did just  a while ago:

I made this in The GIMP.  All tablet, no paper.

Yeah, I know.   Her shoulders are a bit too broad.  I don’t mind it though, the super feminized look is kind of rediculous to see in EVERY female character.  It starts to get redundant and unrealistic if overidealized.  Just saying.  But cool, no?

That’s about it.

h1

big post + act finished + more 3D materials

January 3, 2009

HAY, IT’S TIME FOR A POST!

I haven’t posted in forever!  This is because of the following:

  • One of my best friends is in a rather nasty jam, and I am helping him.
  • I’ve been a bit more depressed than usual.
  • I’ve been studying for the ACT.
  • I’ve been working hardcore on an elusive problem with getting text to work in Direct3D.  It is a pixel data problem.  More on that later.
  • I’ve been spending time with *sigh* family on the holidays.
  • Reading Isaac Asimov’s Foundation and Empire.  VERY GOOD SCI-FI YOU MUST READ.
  • Sleep disorders are worse than ever.

But hey, you know, life’s still good!  I keep telling myself that anyway.  So really.

I just took the ACT.  It was pretty non-descript, mostly because I didn’t have enough caffiene in my system.  I hope I was still well off enough to do a good job.  My initial response to that was “meh…I’ll pass.”  I don’t really care, as long as it gets me in to college where the real learning begins.

In RAVEN, I’ve gotten a few more material/lighting things working, and I fixed the lighting inconsistencies, at least I believe so.  Per vertex alpha and material alpha both work, depending on whether the UseVertexColor flag is on.  Textures are great.  Here’s a problem for you though, text doesn’t work in Direct3D.  I’ve narrowed it down to the part where I copy the pixel data to the Direct3D textures.  The texture mapping works fine, the textures are valid, and I’ve done some printouts / diagnostics to check to see if the data is actually there when I copy it to the textures, and the answer is yes, it is there.  So everything works… but the copy.  It’s even D3DFMT_A8, just like the text data I copy to it.  One byte per pixel, that byte is an alpha value, am I mistaken?  Lock…memcpy…Release…Index…Render…FAIL!  Just blank quads.  T_T  I don’t know what the problem is, but I do need to slaughter right now!

And yes, I can’t sleep!  This is pissing me off!  I’m an insomniac, but I’ve barely slept at all this past week, and it can’t have helped my performance on the ACT today.  Ah well… life goes on.

Umm… that’s just about it.  Anyway.  I’m resuming normal posting now.