Posts Tagged 'Graphics'

Going up in the world

Recently I have been focussing on how to put together `higher level` objects made from multiple curves and straight lines. An `object` in this sense is, for example, a solid filled irregular shape which might require a few or even many curves, straight lines, corners etc to complete it. The idea is to be able to build such objects with commands that `add a curve`, `add a point`, etc. When the shape is finally closed then it is ready for rendering. I’ve got most of the code done to make this happen.

The flow of object construction sort of goes like:

a) Create a bunch of control points which either will define curves or individual polygon vertices
b) Join then all together sequentially in a bunch of arrays ready for conversion to vertices
c) Pass the arrays to a system of `generators` which take the control data and turn it into vertices/triangles
d) Pass the vertex data to OpenGL for rendering.

Eventually this might be optimized, like a single function call that creates objects and tessellates and renders them with texturing and gradients all in one step. It could optimize the speed.

Another thing I’m working towards is filled gradients and texturing. I haven’t written any code on the gradients yet but I have some stuff for textures that is partially done. The idea with gradients is that you either are generating them in realtime as a triangle mesh with vertex colors, or you are doing that at some point and saving it to a texture ready for later texturing. Somewhere along the line there should be gradient and texture warping ie where you can drag around `vertices` within the gradient mesh to shape it how you want it. Of course there’ll be the usual standard gradients – linear, radial, spherical etc. I still have to think about how to translate a realtime gradient mesh into the vertex colors of a bezier shape – it will require some interpolation.

As far as texturing is concerned, it’s going to work much the same as the gradients – either applying a single texture across a shape, or making it out of a mesh, or even my `SuperTexture` which is a collage of multiple textures. Getting that to map to the vertices of a bezier shape is also going to be tricky, especially to deal with how the bezier moves and deforms, and especially if I do anything in 3D. Being able to manipulate vertices of a mesh which don’t map to vertices of a vector shape is the hard part. The first step is just to get a single texture mapped to a curved shape, which should be straightforward.

Gradually I’m working toward a simple editor where I can add tools to manipulate and generate shapes, apply textures, edit gradients and add other effects, so that I can actually start to use it toward a game. I am still aiming for a small game to be released this Christmas, but I am not sure there is time – only about 3 months to go!

Movin’

Hey folks.

Okay so it’s been a little while since the previous bloggage and there’s a good reason for that. We just moved to a new apartment. It was a lot of hard working moving boxes and furniture and getting it all unpacked, but we’re almost done. So I hope to be writing something more useful here in the coming weeks.

I am still working on a library of routines for filled vector-graphics. I have the bezier calculation stuff sorted out, and a working prototype of filled realtime curved objects, complete with really nice antialiasing. The part where I left off a week or so ago was in creating additional library functions to handle more complex/compound objects, and starting to look at things like constructive solid geometry operations. I’m pretty happy with the speed of it all and am confident that a visually impressive game can be created with animated filled shapes, on pretty average graphics hardware.

An introduction to Bezier Curves

I just added a new article, an introduction to bezier curves, which you can read here. It covers some theory about bezier curves, how to calculate them, an algorithm and some useful sourcecode.

I wrote this as part of a first publication at a new Blitz magazine website, blitzmaxcoder.com – which is currently going through a birthing process. I thought it would be a good idea to share it with the world here as well.

Of course, this means that I had to add a new section to the site – Articles – just click on the tab above :-)

Blast from the Past

So I finally got around to trying the E-UAE emulator on Mac OSX. I got up it up and running pretty quickly and there’s  a nice front-end out there called Hi-Toro which helps immensely with configuration. It’s pretty quick too, and there is an intel version of the emulator available. So of course this meant I had to try out some things. I have yet to try one of my favorite games – Datastorm, but I did figure out how to get my fruit machine game up and running. I had to duplicate the Workbench 1.3 disk so that it was writeable, then remove some fonts to make space, and then copy the amos.library into the libs folder. Then booting from that disk allowed me to run the superfruits game from a virtual harddisk, which is basically a folder on the mac with normal files in it. Easy.

SuperFruits starts out with a very simple title screen animation, which I did in the fabulous Deluxe Paint 3 on the Amiga – it’s a whole bunch of `move` animations, which basically means I split up the title image into a grid of tiles and then animate each tile separately. They all sort or wind their way into place and merge together to form the logo. I had to do it in 2 colors because, being written in Amos Basic, it wasn’t fast enough at displaying it full-screen at full speed on the lowly Amiga 500. So instead, I used a copperlist rainbow, which is like a hardware trick to change the colors as the display is being updated.

SuperFruits title screen

Then after a couple of very simple menu’s where you enter your names and how much money to play with etc, you enter the game proper …. all the way from 1993, I present to you, in full 32-color technicolor, and complete with British spellings, it’s SuperFruits!

SuperFruits in-game screen

In this screenshot I have just matched two watermelons next to each other, so it then drops down into a gamble feature. In the gamble feature you get to try to increase your winnings and to access a variety of bonus features, which is where much of the fun is. There’s lots of flashing lights and special features and even a cheat mode for when nudging. Three 7’s gives you a jackpot, although you can also gamble your way up to it. The gambling is done by trying to stop the lights flashing on the number 3, out of 3 lights/sounds, which is not too easy, and actually a bit hard for the lower-value levels. I did get one jackpot so far! The green goes crazy with flashing lights and *color cycling*, woo woo!

A beginning

Greetings, and welcome to this exciting new web log. My aim here is to enlighten, educate and entertain on a variety of computer topics,mainly focussing on the design and development of computer games. As I continue to create games as an independent developer, I will be talking about my progress, sharing insights, ideas and discoveries.

I also aim to explore the spiritual, metaphysical and psychological aspects of games and their design. I will attempt to reverse-engineer the psychology behind todays trends, arriving at the bigger picture, and then returning to the real world with new found inspiration. There is more to life than meets the eye!


Welcome

Enjoy the fun and excitement of computer games, but even moreso, the creative expression of developing your own. And the graphics are cool too. :-)

What was that?

Categorically speaking...

Game Development Graphics Uncategorized

What just happened?

  • 1,403 hits