Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Demo game

This thread is locked; no one can reply to it. rss feed Print
Demo game
Plucky
Member #1,346
May 2001
avatar

The new demo should address common Allegro questions in a clear and commented manner.

james_lohr
Member #1,947
February 2002

Agreed. Maybe it's even worth compiling a list of some of the most common questions and attaching it to the spec for the competition.

Rick
Member #3,572
June 2003
avatar

I agree. I have one right off the bat. Drawing a bitmap with partial transparency.

========================================================
Actually I think I'm a tad ugly, but some women disagree, mostly Asians for some reason.

David Grace
Member #42
April 2000
avatar

You could always incorporate a bit of the 3D into a 2D game. For example, I've used an Allegro-generated 3D skybox as the background for an opening intro.

But I think the new demo should attempt to exercise as many of Allegro's functions as possible (in a logic manner of course), and feature solutions to some of the most common questions. (Rotating/scaling/flipped sprites, translucency/transparency, maybe even have it work seemlessly with truecolor/hicolor/color-index modes.)

Matthew Leverton
Supreme Loser
January 1999
avatar

I think a demo should be written in simple C with an effort to illustrate how to use Allegro's best features in a logical manner. Great gameplay and graphics should be a secondary goal.

The focus should be on:

  • Clear, easy to read, understandable source code!

  • Getting input from joystick, keyboard, and mouse

  • Loading some external media from a datafile

  • Playing background MIDI and sound effects

  • Using a double buffer and blitting sprites (perhaps with rotation, scaling and translucency - if easily done)

  • User controlled object moving in simple x/y directions

  • Simple collision detection between sprites

  • Highscore list (saving / reading to disk)

  • Loading / Saving settings (config files)

Stuff like 3D, GUIs, etc, just make the thing messy for a beginner to understand. I'd go with a single resolution (with high-color) to avoid the confusion that comes with "customization". I'd even stay away from potential pitfalls like linked lists and clever programming tricks. There's also no need to get into complex math - I'd keep it as simple as possible.

A demo that simply illustrates the "power" of Allegro is a waste of space in the source package. I'd hate to see even more space in the ZIP be spent on a demo.dat that is rarely used. If someone wants to see what Allegro can do, then they ought to just download a full fledged game.

All in all, the "keep it simple" philosophy.

Richard Phipps
Member #1,632
November 2001
avatar

Quote:

I'd even stay away from potential pitfalls like linked lists and clever programming tricks. There's also no need to get into complex math - I'd keep it as simple as possible.

Sounds like my code. ;)

Chris Katko
Member #1,881
January 2002
avatar

The more I think about it, the harder it seems. Games aren't simple.

A game I thought of doing would be kind of like missile command, but polar. You have a satellite on a planet that you control with the left and right keys (your orbit direction). The mouse is where the satellite shoots its lasers and rockets. Rockets constantly track the mouse position. Missiles come in from all directions. The outposts on the planet constantly rebuild themselves (but slowly).

But... while I'm still going to make it. Making it simple (and pretty!) seems almost impossible. I'll need a list for bullets, a list for rockets, a list for (enemy) missiles, and so on. It'll be pretty complex. So, I guess I'll have to find something simpler, and keep "Planetary Defender" as more of a "what you can do with Allegro" thing. As it'll have a lot of spiffy blending and lighting (the lasers glow).

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Richard Phipps
Member #1,632
November 2001
avatar

What about a platform game similar to Happyland Adventures? Or is that too complex to?

I suppose it depends if we want a real game, or more of a demo.

Chris Katko
Member #1,881
January 2002
avatar

A platform game has a tile system, collision detection, AI, general logic, and scrolling (to just name a few!). That's pretty big in itself.

That's why I'm having trouble of thinking of something "simple" that hasn't been abused already.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

What about a platform game similar to Happyland Adventures? Or is that too complex too?

If you can make a platformer that illustrates the basic usage of Allegro in a simple manner - then it'd be ok. However, I think the mechanics of the engine would get in the way.

Quote:

That's why I'm having trouble of thinking of something "simple" that hasn't been abused already.

There's nothing wrong with an Allegroid space shooter game. Alex shooting up SDL logos or whatever. ;)

Richard Phipps
Member #1,632
November 2001
avatar

Hmm.. I was thinking of another Dungeons kind of game (Dandy dungeons, the inspiration behind Gauntlet). Basically it's gauntlet with boulderdash style tile movement for everything. It's fun, and would be easier to program (for the game complexity) than other genre's.

I did a version on the Amiga. :)

Evert
Member #794
November 2000
avatar

Quote:

I'd hate to see even more space in the ZIP be spent on a demo.dat that is rarely used.

I had considered imposing more stringent size restrictions than SpeedHack, but the current demo.dat is already larger... yes, a small footprint on the demo.dat is a premium.

Quote:

All in all, the "keep it simple" philosophy.

I agree that should be the goal. If you think you can do a simple enough 3D game, well, sure. But you run the risk of having it disqualify for being too complex afterall.

Quote:

A game I thought of doing would be kind of like missile command, but polar. You have a satellite on a planet that you control with the left and right keys (your orbit direction).

Sounds good. Just make sure your code is well documented, and it should be ok.

Quote:

I'll need a list for bullets, a list for rockets, a list for (enemy) missiles, and so on.

Plain arrays will do. I wouldn't use a linked list for those myself anyway.

Quote:

What about a platform game similar to Happyland Adventures? Or is that too complex to?

A full-fledged platformer would be too complex, I think. You're also going to want levels for it, after all.
Unless you make it Donkey Kong, in which case it would all fit on one screen anyway. Or you could try for a simple Nibbles/Snakes clone.

Quote:

Alex shooting up SDL logos or whatever. ;)

;D

Anyway, looks like some people have some good ideas. Go for it! :D

Kanzure
Member #3,669
July 2003
avatar

Why not use Alex4?
None of us have produced something as polished before, now have we?

Evert
Member #794
November 2000
avatar

Quote:

Why not use Alex4?

It's a 600kB download, which is on the heavy side. The code isn't very pretty, it has too many source files, the structure of the game itself is way too complex, it doesn't use vanilla Allegro but addons as well, doesn't run without modifications on all platforms...
Sure, all (or most) of those things could be fixed in some way or other - but I think you get my point ;)

It's a very nice game and clearly shows that great things can be done with Allegro, but it's not suitable for the demo game.

Rick
Member #3,572
June 2003
avatar

Quote:

Why not use Alex4?

That code is bad. Great game, but man that code is hard to read.

========================================================
Actually I think I'm a tad ugly, but some women disagree, mostly Asians for some reason.

Kanzure
Member #3,669
July 2003
avatar

Right, it uses more than Allegro. Ok, so make a clone. The source is already there, it's a great starting point. Strip everything and build it back up. :)

Evert
Member #794
November 2000
avatar

Quote:

Ok, so make a clone.

Your entry, perhaps? ;)

Kanzure
Member #3,669
July 2003
avatar

Me? Do something?

kazzmir
Member #1,786
December 2001
avatar

I would improve an older game of mine but all my games are written in C++. I really cant understand why people still write games in C, but I guess thats neither here nor there..

I dont have time to start a new project but I would be more than willing to review code written by other people and also write comments.

Avenger
Member #4,550
April 2004

Why not have two demo games? one C and one C++.

tobing
Member #5,213
November 2004
avatar

Just write a demo game in C or C++ and submit - then Evert (or whoever) can select one or more of the games as demo(s).

Trezker
Member #1,739
December 2001
avatar

My idea of cloning an old Qbasic game someone else did sounds more and more appropriate. (I'm not submitting Devospace, I don't wanna see that code again.)

I don't know if I'll do it in time for this thing, but I've been dreaming of cloning this game for a long time.

Johan Halmén
Member #1,550
September 2001

How many of you have studied the demo game code to learn something? I usually go for the example things.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Thomas Fjellstrom
Member #476
June 2000
avatar

I studdied it to learn how not to do things. ;)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Elias
Member #358
May 2000

That's exactly the point. A good demo would be something you can use as base of your own games. You definitely shouldn't do that with the current one.

--
"Either help out or stop whining" - Evert



Go to: