Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Thursday, September 21, 2006

XNA rainbow mesh



Well it's certainly not much to look at. I haven't put too much time into getting things pretty yet but I have ported a bunch of game engine concepts from rampart already. I've got a simple scene system with multiple vertex/pixel shader support and runtime switching between shaders. An animation system is hooked up to the avatar with event callbacks. Multiplayer support with actions wired into avatar. Debug mode with flying camera and ability to control scene rendering parameters (pictured wireframe mode). Oh and sound effect events.

The shader in the screenshot is the simple ffshader.fx that is shown as an example in the XNA docs. I have another shader that I put together off the template in NVIDIA's FX Composer. You can toggle between the two and there is a dynamic effect binding system that binds scene/object parameters automatically for the selected effect.

And yes the rainbow terrain mesh is super fruity!

The XNA docs overall are very good but they don't go very deep. I had to dig a bit deeper to discover how to handle the effect files more generic than in the examples which simply loaded a vertex shader function.

Essentially what I have is an scene effect object per .fx file. They derive from an abstract class with the following members:

OnEffectLoaded() -- called after the effect is loaded to get handles to the various parameters.

BindSceneParameters() -- called once per scene render to bind global scene parameters.

BindSceneObjectParameters() -- called once per scene object to bind local object parameters.

This is handy for switching effects on the fly.

I'll post some more XNA shader stuff later.

Tuesday, September 12, 2006

Holdem: bugs, bugs, bugs

I've gotten a lot of bugs fixed in holdem in a short ammount of time. I have to rework the in-game overlay UI as it covers up important information right now. I'm considering cutting the in game AI chatter. I am reluctant to do it though because I think it breaths a lot of life into the game. One thing I was considering is still having an AI chat system but making it more event based. When an AI character has something important to say or a key event is triggered in career mode.

Sunday, September 10, 2006

Holdem: Nokia 6682 photo

This picture is of a pretty low quality. I'll just blame the camera.. the display on the phone is nice and makes the game look pretty sharp. I think I need to scale the fonts up a bit though as they seem a little on the small side.

Massimo says:
so what are you up to now? working on getting the animation running? Cuz I know what you're not doing :) you're not posting pictures of Hold'em running on your phone :)


Well somebody has to keep me honest.

Thursday, September 07, 2006

Beatbox: Sound is back

I got sound hooked up again, fixed texture binding/uploading and got the combo meter and song position indicator working again. Yeah it's still rough but it's coming along. There are some pretty big things to do still and I think I'm going to change gears back onto texas holdem to nail down my framebuffer initialization problems.

Since music and sound is at the core of the game I'm considering building a specialized sound library/sequencer for the game. It would use an existing format and tracker for the editor probably screamtracker3 since I'm most comfortable writing tracks in that. Right now I'm using fmod which actually allows you to get event callbacks from the sequence. I'll probably just play with that for now.

I wrote a really nice scene graph when I was on vacation in mexico so that eventually needs to make it into the gfxlib but it's a pretty big change at this point so I may put that off too..

Oh well, lots of stuff to put off per-the-usual. I really am trying to keep the tasks smaller and more achievable but at some point I know I need to make bigger bets to make sure the stuff can be finished, polished and pushed out the door.

Tuesday, September 05, 2006

It's coming along



Well there is more or less something there now. It is actually playable, although not being able to see scores and combos is a bit of a drag. Also the thing is completely full of bugs. It has gotten a lot funner to work on now though. Much less doing the boring plumbing that runs the show and more doing the AI and gameplay that I enjoy.

Monday, September 04, 2006

Beatbox: A story



Okay well this isn't the sky falling but screenshots are so much fun, especially really dumb ones during development. What was at one point actually a fairly fun playable little game is currently a shadow of itself living on top of all new (actually rehashed I get to that in a minute) stuff.



Now I'll provide a little story about beatbox, mostly for my own benefit. About a year ago I was having a lot of trouble getting any coding done after our second kid came along. I still had time but I just couldn't really get myself motivated to do anything good. Discouragement mostly came from the fact that I didn't figure that I had time to really write anything of any good quality.

So I got this idea to just hack, not worry much about proper design or object orientation or really doing anything right at all. I wanted to get back to the root of what I loved, the thing that made me write reams of code in Jr and Sr High School. Just get something up and going no matter how sloppy or lame it was and have fun doing it. So I put some 3d graphics to music using glut, and it was a blast.

After awhile just doing different 3d scenes at different sample points in the song became a bit mundane for my own personal enjoyment so I decided to make the blocks fall down and controllable. And that's more or less how beatbox was born. I wanted to have poyupoyu style gameplay with my own individual twists because that was really what I wanted to play and I didn't have a poyupoyu game on hand to enjoy.

This whole time I was still hacking. The entire game logic was in poyu.cpp and the rendering was in render.cpp. It was a pretty mess. I copy-pasted chunks of code that I dragged in from all kinds of personal projects from as far back as 2002, yeah a glorius mess. At some point I just dropped the binaries in a folder and called it good. I realized this was a dead end and I was re-inventing and ruining all kinds of work I had already done for the past few years as well as writing some code that would never again be useful. So I made a big choice. I was going to take 5 years of code and make it into a set of consistent usable libraries and make all my games compile off of that. I knew this was a huge project but I decided that it would be fun and good for me.

So I've come to a summit of that work. I actually have the original beatbox code retrofit into the new set of libraries with a new resource system thrown in for good measure. It feels good but all I have to show for it is a white triangle on a grey background. At least I'm happy.