Showing posts with label XNA. Show all posts
Showing posts with label XNA. Show all posts

Sunday, November 22, 2009

Fractal Viewer v0.1

This past week I sat at my desk and munched on a Subway meatball sandwich while browsing through Wikipedia.  I read an article on the Mandelbrot fractal, which I think is pretty darn neat.  So neat, in fact, that I started planning on programming my own real-time viewer of this impressive mathematical piece of artwork.  This came to some dismay of my coworkers (as my meatball sandwich contained an impressive amount of delicious but odoriferous peppers and onions) when I asked them questions like, "How does one solve (A + Bi)^0.5.  It was a legitimate question, though not one necessary for the computation of a fractal.  That's actually pretty easy.

And when I got home I started programming.  Feverishly.  I have been consumed by learning to develop in C# and in particular programming the GPU.  Along the way I discovered some of the shortcomings of the older shader models.  Of particular vexation is that the older shader models support only a very limited number of instructions on the GPU.  Relatively old video cards will support shader model 2.0.  This shader model has a maximum number of instructions on the GPU of 96.  I'm using 1296.  Oops.  Thus this program requires shader model 3.0 and a relatively newer video card.  Without it, the program just crashes.  Maybe I should introduce some sort of check to see if the user video card can support it?

Anyways: too many words, not enough pictures!




















The Mandelbrot Set





















And the Julia Set

Here's the download.  You'll also need the XNA runtime library.  Try it out.  But be sure to read the readme file.  It has instructions on how to zoom in and out as well as pan around.

Friday, September 4, 2009

VB bites the dust.

So last week, in a fit of frustration, I switched from VB.net to XNA.  XNA (it's not an acronym) has a bunch of built-in tools for both 2D and 3D graphics.  I'm liking it so far.  I also have access to all of the direct3D 10 features as well.  Not that I can really use them: it's taken me a week just to write shaders that will do basic lighting operations.  And I don't even have shadows working yet.

There's two ideas for games that I have that I would like to develop.

1)  A tower defense game with a new twist.

It's set in a post apocalyptic world where energy resources are scarce.  The player defends a high-tech civilization that dwells inside of a volcano.  The base of the volcano has been capped with a structure that draws power from the magma.  This provides all the power that the player needs to develop their civilization.  It's also under an extreme amount of pressure.

The other civilizations in the world are just a little bit jealous of the sweet gig that the player has at the base of the volcano.  But they lack any sophisticated technology to take the volcano.  So they've taken to throwing large rocks and boulders down the volcano.  It's really not very nice.

The player has a wide arsenal of weapons to either destroy the boulders or knock them back up and over the side of the volcano.

2)  Hi-level strategy game set in the ancient world.  I'll have more on this later since it's a rather large topic.