Demo game
Evert

This was discussed a bit a while ago, but this seems like an opportune time to bring the subject up again.

Now that Allegro 4.2 is nearing completion (although no release date has been set yet and there'll be several release candidates out before that time), it's time to start thinking about the demo game. As we all know, Allegro's current demo isn't really a good example of proper coding style, and it's fairly old. So it might be time to replace it.

Therefor, I would like to organise an Allegro Demo Game Competition. I realize that there's allready other competitions going on, but what's one more, right? ;)

To qualify for a good demo game, it should fulfill some requirements:

  • The code should be readable and well documented with comments.

  • The code should use Allegro and only Allegro. No addons.

  • Use the Allegro logo on the opening screen. Optionally feature either of Allegro's mascots, Al or Alex. The latter if Johan Peitz agrees that it's ok to use his character for this.

  • The code should compile cleanly without warnings on Allegro 4.2, on all platforms. That means no deprecated functions can be used, so that means it won't compile on 4.0.

  • The game should feature the list of AUTHORS and their contributions in some way or other, similar to what the current demo game does.

  • The game should showcase a lot of Allegro's capabilities in some way. Think rotating sprites, multiple update methods, separated logic and drawing code, having the game run at the same speed on all computers, things like that.

  • The code should be in C, although I wouldn't be too strongly opposed to having a second demo game (or the same game) written in C++, but we don't want to bloat the default download with a lot of demo games.

  • Original content for the media is a big plus. At the very least sprites, samples and music should be from the public domain. If you don't make your media yourself, make sure that you know where it comes from and has a license that is compatible with Allegro (meaning SpriteLib is out). If possible, ask permission from the author of the media to use it.

  • Size restriction on the media: I know you'll hate this, but the demo game media should not dominate the Allegro package download. The current demo.dat is 383KB. I think we can go a bit above that, but do try to keep it down.

I think that covers most of it. I'll add things to the list if I think of more of them.

So, what's to win? Obviously, the grand prize would be to have your game shipped with Allegro. If there are several entries that qualify (and I hope there will be!) I'm in favour of making a separate `demo game' package linked from Allegro's homepage with a description and small screenshot of each game.

For game ideas, think simple games. Remakes of old games everyone knows and loves should be fine. Feel free to recycle old projects and work in teams.

Again, no release date has been fixed for Allegro 4.2, although it should be sometime in the next few months. If you want to try to make a demo, do say so and I'll try to keep everyone up to date on the release schedule. Compared to the rigorous 72 hours of SpeedHack or TINS, this should allow you ample time to finish the project anyway as you'll have at least that much time. ;)

If someone feels like helping me set up a webpage for this event similar to the website for SpeedHack or TINS, let me know.

So go thee forth and make some demo games!

gnolam

separate >:(

Evert

Very good. Now go post something useful. :P

razor

Wouldn't be better to make a community game?

HoHo
Quote:

Wouldn't be better to make a community game?

It would be great if anything gets done

Rick

Someone would have to take lead.

I personally think a short and simple tetris clone would be a good example. Not to hard so it will get done in time.

Evert

As I said, feel free to make it a team effort.
Considering how well Allegro.cc's last team project fared, I wouldn't recommend trying to get a significant portion of the community to work on a single game for this. It's probably also overkill for a project of this magnitude. I think one person for coding, one for graphics and one for music should be about the maximum that is realistically feasable.

Anyway, feel free to do this any way you see fit!

Trezker

I smell a really good compo!
Uncertain deadline... I wonder if that motivates or not...

One thing I'm wondering. Should the code be in one single sourcefile like the current demo?

Chris Katko

I'll write one, but it'll be in C++, and most certainly use blending of some sort. ;D But 4.2 isn't out yet, so how can I use 4.2 "features"?

Though, to add to that, should the demo require decent specs, or almost none at all (like the previous)? If you go too high, people can't run it (and Allegro will seem slow). But if you go too low, Allegro won't look very pretty.

Evert
Quote:

Uncertain deadline... I wonder if that motivates or not...

I think it might put people off... count on having at least a month, perhaps more to polish things. Of course, entries need to be tested for suitability and maybe modified somewhat too.

Quote:

One thing I'm wondering. Should the code be in one single sourcefile like the current demo?

Well, it's usually good coding style not to do that - amd we want to showcase good coding style. That said, it can be a little easier to learn from if all the code is in one source module.
I think readable and well documented should be the criterion. The way I would interpret this is to say that single source file should be the starting point, but that seperating clearly independent modules could make sense. Of course, having a lot of sourcefiles floating around make it too hard for newbies to look at the code. Five or so would be about the maximum, I suppose.

EDIT:

Quote:

I'll write one, but it'll be in C++, and most certainly use blending of some sort. ;D

That's fine. As I said, even if it wouldn't qualify as an extra demo, it would qualify as a download from Allegro's homepage.

Quote:

But 4.2 isn't out yet, so how can I use 4.2 "features"?

The CVS tree is in feature-freeze. There will only be minor additions between 4.1.18 and 4.2.0, feature-wise.

Quote:

Though, to add to that, should the demo require decent specs, or almost none at all (like the previous)? If you go too high, people can't run it (and Allegro will seem slow). But if you go too low, Allegro won't look very pretty.

I think the aim should be for it to run decently on the average PC, although I suppose it could go higher if that is documented or, better yet, configurable by picking a lower resolution or using less visual effects.

Krzysztof Kluczek

Should it be 2D or can we make use of Allegro 3D functions and make something fully 3D? :)

Trezker

I don't think using 3d only is good, 3d really isn't very allegro...

But using it for some effect, maybe displaying the authors, could be good.

David Grace

Hmm, good incentive for me to clean up G-Fighter's source and slap some better graphics on it. :) It's been on my to-do list for ages...

Elias

Hm, what happened to Spellcaster? I thought he was working on a new demo game, at least he volunteered in that last thread about it :)

About multiple files - I think it shouldn't be a huge single file like the current demo. Hm, and I think it doesn't hurt at all that there's already TINS - after all who wants can make an entry for TINS, and then polish up the code to be used as a demo game :)

Eradicor

Why on earth is this topic yellow.. hurts my eyes.

Thomas Fjellstrom
Evert said:

Very good. Now go post something useful. :P

Krzysztof Kluczek
Quote:

I don't think using 3d only is good, 3d really isn't very allegro...

The fact that almost nobody uses certain Allegro function doesn't make it non-Allegro. ;) In fact, Allegro has cool 3D functions and I think somebody should finally start using them. Of course it can't be compared to hardware accelerated drawing, but it's probably best thing you can get without it. :)

Trezker

Well, ofcourse it's still something worth showing. But the game itself should be 2d since that's where Allegro has most gfx weight.

HoHo

3d can be used to create some bitmaps runtime: render stuff to bitmaps and use as usually. Only problem is that I couldn't find a way doing ortho projection with allegro.

I once converted some nehe's model loading tutorials to allegro3d but unfortunately thse got lost while installing new OS.

Evert

I don't think there needs to be any limitaion on requiring the game to be either 2D or 3D.
I don't know if showcasing Allegro's 3D functionality is that useful, but it's there and could be used.

Elias

About 3D, a separate demo for Allegro GL wouldn't be bad maybe. It could show how to combine OpenGL with Allegro's font and bitmap routines and so on.

Oh, and speaking of OpenGL reminds me - we should probably synchronize the 4.2.0 release of Allegro with the 0.3.0 release (or whatever version number) of AllegroGL. So at the release day, someone should be able to get both and convert over old projects..

gillius

The demo game isn't all that bad, the game is a decent game and it is simple enough to be understood. Perhaps a better idea is to try to update the code and whatnot and just simply spiff-up the old demo?

Elias
Quote:

The demo game isn't all that bad, the game is a decent game and it is simple enough to be understood. Perhaps a better idea is to try to update the code and whatnot and just simply spiff-up the old demo?

Yes, if someone would just remake the current demo, but with readable code (i.e. code where you could say "that's how you should do it" to new users, and which could be used as base for other projects), that would be perfect.

james_lohr

Nah, I think I fresh Demo would be a lot better.

Evert

Well, if you want to submit a cleaned up version of the current demo, that would qualify... at the very least, the current demo would have to be made available as a seperate download.
But I think a newer demo game would be nice to have :)

Plucky

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

james_lohr

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

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

David Grace

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

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

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

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).

Richard Phipps

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

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.

Matthew Leverton
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

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
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

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

Evert
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
Quote:

Why not use Alex4?

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

Kanzure

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
Quote:

Ok, so make a clone.

Your entry, perhaps? ;)

Kanzure

Me? Do something?

kazzmir

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

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

tobing

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

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

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

Thomas Fjellstrom

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

Elias

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.

Richard Phipps

Of course there could also be several demo games (increasing in complexity) for example from pong to tetris to a galaxian style game. The small amount of gfx for some of these games shouldn't make much of a dent in the space allowance.

Chris Katko

Well, if that were the case (and I like the idea), I'd prefer we put them all (except "the Winner") in a Demo Pack instead of the main distro.

spellcaster

What about this:

I write a "template", something pretty basic containing set-up and shutdown code, maybe hiscore code.

Then we create several small games. That would mean that no single game needs to use all of allegro's features.
In the end we have a demos directory with the ready to use template, and some small games the user can use to get a better idea.
That way we can also add more games later.

demo
demo/template
demo/puzzle
demo/sportsgame
demo/platformer
demo/snake

The template code would be really generic. Not even sure if it should include menu code, since most games prefer to use their own, personal code for that.
On the other hand, all games need some sort of menu.

What do you guys think? If it's ok for you that I write the template, I'd try to start pretty soon and finish it on the weekend.
Once that is done, we just need to decide what type of demo games we want, and need somebody to code them :)

Richard Phipps

It sounds a great idea to me. :)

How detailed should the template be though?

Thomas Fjellstrom

Less talk, more action ;) ie: It doesn't matter. Its up to the coder till [s]he releases it. Then it can be tweeked or massaged into what people want.

Chris Katko
Quote:

If it's ok for you that I write the template,

Lemmie guess, C? I don't think I'll be using that, or at least for my next project (the planet one).

HoHo
Quote:

Lemmie guess, C? I don't think I'll be using that, or at least for my next project (the planet one).

YTou could make c++ bindings or c++ alternative of it

I guess including several games is a bit too much for allegro. Perhaps it would be good idea to seperate the library and tests, examples and games into two or more seperate packages.

An official tutorial with example games/programs would be nice but I don't think it would be done in forseeable future

Evert
Quote:

What about this:

I write a "template", something pretty basic containing set-up and shutdown code, maybe hiscore code.

Then we create several small games. That would mean that no single game needs to use all of allegro's features.
In the end we have a demos directory with the ready to use template, and some small games the user can use to get a better idea.
That way we can also add more games later.

I like the idea, it's neat. But I don't feel like requiring people to follow this way... if they really want to write their own game independent of a single framework, then I think it should be ok for them to do so.
It would be a great way to show how to create reusable modules for your games though.

james_lohr

Spellcaster: I think your idea is great. To me the idea of writing something within a template is quite attractive. I'd also like to prove that I can write legible code with comments ;).

kikabo

OT: The template/framework idea would be great for a Bishi-Bashi style game competition.
Bishi Bashi was a collection of fun/silly small games, each game was one round of a bigger game and a nice size for a programming competition.

I've always thought that BB was a good framework for a compo, but the result being more substantial and structured for demo purposes.
Having said that, a full BB game would probably be too much to be packaged with Allegro as a demo game but I think that'd be a great competition for the future some day.
I don't know why but writing a Bishi Bashi level seems less intimidating than a solo game, even though it's more or less the same thing :)

David Grace

The template idea does sound like a good idea -- I would do a menu using that, because almost all of my games use a similiar menu that contains options such as "start game", "configure game options/controls", and "exit". (But then again, I tend to work on the same paradigm as console games -- Limited input ability, rarely support the mouse, etc.)

The highscore tables code and such rarely change between my games. In fact I tend to just cut-n-paste between my projects. :) Usually the only thing that changes is what sort of values are being written to the score file, but if you just keep it to score and name, that would be fine for a small subset of games.

One more to add: Shooter, like Space Invaders (the current demo, in other words) Whether it's a scrolling shooter is debatable, as tilemaps could be shown in the platformer.

If we are VERY creative with resources, I see no reason why we couldn't make several very simple games with just 200k or so of artwork/sound assets. Yeah, sounds like a lot of work but I have fun doing stuff like Game In A Day so I guess it doesn't bother me as much, heh.

spellcaster

I've the basic template ready. It allows you to handle initialisation, switching between windowed and fullscreen mode and has a simple hiscore code.

I'll add some simple menu code and make it available for download.

Do you think I should add some allegro logo display and a scrolling display of a customizable textfile as well?

tobing

Wow, I'd like to see what it looks like...

Add the allegro logo, I think that's a good idea. Don't know if a scrolling text is necessary. The logo would be enough to show how to display some sort of splash screen, which is fine for almost all games.

spellcaster
Quote:

Wow, I'd like to see what it looks like...

Here's my current code, it still contains some testing code and the menu function is missing.

#SelectExpand
1#include <allegro.h> 2#include <stdio.h> 3#include <stdlib.h> 4 5 6enum { 7 HI_COLOR = -3, 8 TRUE_COLOR, 9 INDEXED_COLOR 10}; 11 12enum { 13 MODE_FAILED, 14 WINDOWED, 15 FULLSCREEN, 16 WINDOWED_OR_FULLSCREEN, 17 FULLSCREEN_OR_WINDOWED 18}; 19 20typedef struct { 21 int w, h, bpp; 22 int windowed; 23 int preferred_bpp; 24 25 BITMAP* buffer; 26} ScreenInfo; 27 28enum { HISCORE_COUNT = 10 }; 29enum { HISCORE_NAME_LENGTH = 16 }; 30 31 32typedef struct { 33 int score; 34 char name[HISCORE_NAME_LENGTH]; 35 char new_entry; 36} HiscoreEntry; 37 38/* We need one element more than actually used by the game */ 39HiscoreEntry hiscores[HISCORE_COUNT +1]; 40ScreenInfo screen_info = { 0, 0, 0, 0, 0, NULL }; 41 42 43/* 44 * Sets all hiscore table entries to a given name and value. 45 * name - the name to use. If longer than HISCORE_NAME_LENGTH, the name will be truncated. 46 * score - the score 47 */ 48void hiscore_init(char *name, int score) { 49 int a; 50 for (a = 0; a < HISCORE_COUNT; ++a) { 51 snprintf(hiscores[a].name, HISCORE_NAME_LENGTH, name); 52 hiscores[a].score = score; 53 hiscores[a].new_entry = 0; 54 } 55} 56 57/* 58 * Compares two hiscore entries. Used by quicksort in the hiscore_add() method 59 */ 60int hiscore_compare(const void *lhs, const void *rhs) { 61 return ((HiscoreEntry*) rhs)->score - ((HiscoreEntry*) lhs)->score; 62} 63 64 65/* 66 * Adds a new score to the table. After the call to this function 67 * you can recognize the new element in the table by the state of the 68 * new_entry flag - so if you want to display the latest entry to the table 69 * differently, just check the newly added flag. 70 */ 71void hiscore_add(char *name, int score) { 72 int a; 73 for (a=0; a < HISCORE_COUNT; ++a) { 74 hiscores[a].new_entry = 0; 75 } 76 77 /* the table contains one element more than HISCORE_COUNT, 78 * allowing us to add new scores easily 79 */ 80 snprintf(hiscores[HISCORE_COUNT].name, HISCORE_NAME_LENGTH, name); 81 hiscores[HISCORE_COUNT].score = score; 82 hiscores[a].new_entry = 1; 83 84 qsort(hiscores, HISCORE_COUNT+1, sizeof(HiscoreEntry), hiscore_compare); 85} 86 87int hiscore_save(const char* filename) { 88 int a; 89 PACKFILE *f = pack_fopen(filename, "w"); 90 91 if (f != NULL) { 92 for (a = 0; a < HISCORE_COUNT; ++a) { 93 pack_fwrite(hiscores[a].name, HISCORE_NAME_LENGTH, f); 94 pack_iputw(hiscores[a].score, f); 95 } 96 pack_fclose(f); 97 98 return TRUE; 99 } 100 return FALSE; 101} 102 103int hiscore_load(const char* filename) { 104 int a; 105 PACKFILE *f = pack_fopen(filename, "r"); 106 107 if (f != NULL) { 108 for (a = 0; a < HISCORE_COUNT; ++a) { 109 pack_fread(hiscores[a].name, HISCORE_NAME_LENGTH, f); 110 hiscores[a].score = pack_igetw(f); 111 } 112 pack_fclose(f); 113 114 return TRUE; 115 } 116 return FALSE; 117} 118 119 120/* 121 * Sets a gfx mode. 122 * If you pass a literal value for the colordepth (say 16) this 123 * routine will try to set the colordepth and return a failure if 124 * this depth could not be set. If you pass a mode constant the 125 * routine will try several fitting color depths if the preferred 126 * one could not be set. 127 * If you want to force a windowed mode, pass WINDOWED as windowed parameter 128 * If you want to force a fullscreen mode, pass FULLSCREEN as windowed. 129 * If you prefer windowed, but can live with fullscreen use WINDOWE_OR_FULLSCREEN. 130 * If you prefer fullscreen, but windowed is ok as well, pass FULLSCREEN_OR_WINDOWED 131 * 132 * width - screen width 133 * height - screen height 134 * colordepth - either HI_COLOR, TRUE_COLOR, INDEXED_COLOR or the bpp 135 * value you want to use (8, 16, etc..) 136 * windowed - either WINDOWED, FULLSCREEN, WINDOWED_OR_FULLSCREEN or 137 * FULLSCREEN_OR_WINDOWED 138 * 139 * returns TRUE if the mode was set, FALSE otherwise 140 */ 141int init_graphics(int width, int height, int colordepth, int windowed) { 142 143 /* 144 * Not all cards support 16 bit color, some require 15 145 * even if they are listed as "HiColor". 146 * In order to set a fitting graphics mode, some 147 * alternatives are defined. 148 * The 24 bit color mode is always tried last, since 149 * the 3 byte alignement makes it a terribly slow mode to 150 * use. 151 */ 152 static int hicolor[] = { 16, 15, 32, 24, 0 }; 153 static int truecolor[] = { 32, 16, 15, 24, 0 }; 154 int *depths = NULL; 155 int bpp = 0; 156 int a; 157 int mode = 0; 158 int result = -1; 159 160 /* 161 * depths is the array containing the bpp values. 162 * We'll iterate over that array (if it is != NULL) 163 * below and set the corresponding mode. If the 164 * array is NULL we'll try to set the colordepth 165 * stored in bpp (if bpp != 0) 166 */ 167 switch (colordepth) { 168 case HI_COLOR: 169 depths = hicolor; 170 break; 171 case TRUE_COLOR: 172 depths = truecolor; 173 break; 174 case INDEXED_COLOR: 175 bpp = 8; 176 break; 177 default: 178 bpp = colordepth; 179 } 180 181 /* Set the first mode (windows or fullscreen) to try */ 182 if (windowed == WINDOWED || windowed == WINDOWED_OR_FULLSCREEN) { 183 mode = GFX_AUTODETECT_WINDOWED; 184 } else { 185 mode = GFX_AUTODETECT_FULLSCREEN; 186 } 187 188 if (depths) { 189 /* While no mode is set and we have alternative modes */ 190 while (result < 0 && windowed != MODE_FAILED) { 191 a = 0; 192 while (depths[a] != 0 && result < 0) { 193 set_color_depth(depths[a]); 194 result = set_gfx_mode(mode, width, height, 0, 0); 195 if (result >= 0) { 196 bpp = depths[a]; 197 } 198 ++a; 199 } 200 201 if (result < 0) { 202 if (windowed == WINDOWED_OR_FULLSCREEN && mode == GFX_AUTODETECT_WINDOWED) { 203 mode = GFX_AUTODETECT_FULLSCREEN; 204 } else if (windowed == FULLSCREEN_OR_WINDOWED && mode == GFX_AUTODETECT_FULLSCREEN) { 205 mode = GFX_AUTODETECT_WINDOWED; 206 } else { 207 windowed = MODE_FAILED; 208 } 209 } 210 } 211 } else if (bpp != 0) { 212 /* User has requested a very specific color depth */ 213 set_color_depth(bpp); 214 result = set_gfx_mode(mode, width, height, 0, 0); 215 216 if (result < 0) { 217 if (windowed == WINDOWED_OR_FULLSCREEN && mode == GFX_AUTODETECT_WINDOWED) { 218 mode = GFX_AUTODETECT_FULLSCREEN; 219 } else if (windowed == FULLSCREEN_OR_WINDOWED && mode == GFX_AUTODETECT_FULLSCREEN) { 220 mode = GFX_AUTODETECT_WINDOWED; 221 } else { 222 windowed = MODE_FAILED; 223 } 224 225 /* if there is a 2nd mode we can try, try it: */ 226 if (windowed !=MODE_FAILED) { 227 result = set_gfx_mode(mode, width, height, 0, 0); 228 } 229 } 230 } 231 232 /* If a mode was set, result is equal to (or greater than) 0. 233 */ 234 if (result >= 0) { 235 236 /* If this method was called to change the graphics mode, 237 * we'll try to maintain the contents of the screen 238 */ 239 if (screen_info.w == width && screen_info.h == height) { 240 /* screensize was not changed, blit doublebuffer to screen */ 241 blit(screen_info.buffer, screen, 0, 0, 0, 0, width, height); 242 243 if (screen_info.bpp != bpp) { 244 /* colordepth has changed, we need a new buffer. 245 * If we destroy the buffer here and set it to NULL, 246 * a new bufer will be created below 247 */ 248 destroy_bitmap(screen_info.buffer); 249 screen_info.buffer = NULL; 250 } 251 } 252 screen_info.w = width; 253 screen_info.h = height; 254 screen_info.bpp = bpp; 255 screen_info.preferred_bpp = colordepth; 256 screen_info.windowed = (mode == GFX_AUTODETECT_WINDOWED); 257 258 /* create a doublebuffer if needed */ 259 if (screen_info.buffer == NULL) { 260 screen_info.buffer = create_bitmap(width, height); 261 } 262 263 return TRUE; 264 } else { 265 return FALSE; 266 } 267} 268 269/* 270 * Allows you to toggle the fullscreen / windowed aspect of your game. 271 * windowed - set to TRUE if you want to switch to windowed mode, 272 * set to FALSE if you want to switch to fullscreen mode. 273 * 274 * returns TRUE if the switch worked, FALSE otherwise 275 */ 276int set_window_mode(int windowed) { 277 if (screen_info.windowed != windowed) { 278 /* if your game uses video BITMAPs make sure to release them here, 279 * and recreate them after the call to init_graphics, kinda like this: 280 * 281 * int result = 0; 282 * unload_all_video_bitmaps(); 283 * result = init_graphics(screen_info.w, screen_info.h, screen_info.preferred_bpp, windowed ? WINDOWED : FULLSCREEN); 284 * load_all_video_bitmaps(); 285 * return result; 286 */ 287 return init_graphics(screen_info.w, screen_info.h, screen_info.preferred_bpp, windowed ? WINDOWED : FULLSCREEN); 288 } 289 return TRUE; 290} 291 292 293void update_screen() { 294 blit(screen_info.buffer, screen, 0, 0, 0, 0, screen_info.w, screen_info.h); 295} 296 297 298int main(int argc, char* argv) { 299 int lastkey = 0; 300 int a; 301 302 FONT *colorFont; 303 304 allegro_init(); 305 if (init_graphics(800, 600, HI_COLOR, WINDOWED_OR_FULLSCREEN)) { 306 install_keyboard(); 307 308 text_mode(-1); 309 310 clear_keybuf(); 311 clear(screen_info.buffer); 312 textprintf(screen_info.buffer, font, 10, 10, makecol(255,255,255), "%ix%ix%i", screen_info.w, screen_info.h, screen_info.bpp); 313 314 update_screen(); 315 316 while (!key[KEY_ESC]) { 317 318 if (key[KEY_W] && lastkey != KEY_W) { 319 lastkey = KEY_W; 320 set_window_mode(TRUE); 321 } else if (key[KEY_F] && lastkey != KEY_F) { 322 lastkey = KEY_F; 323 set_window_mode(FALSE); 324 } else { 325 lastkey = 0; 326 } 327 328 rest(1); 329 } 330 } 331 332 hiscore_init("This string is way too long. Way too long", 10); 333 hiscore_add("foo", 20); 334 hiscore_add("bar", 30); 335 hiscore_add("baz", 15); 336 for (a=0; a < HISCORE_COUNT; ++a) { 337 printf("%2i %16s %i\n", (a+1), hiscores[a].name, hiscores[a].score); 338 } 339 hiscore_save("hiscores.bin"); 340 hiscore_load("hiscores.bin"); 341 for (a=0; a < HISCORE_COUNT; ++a) { 342 printf("%2i %16s %i\n", (a+1), hiscores[a].name, hiscores[a].score); 343 } 344} 345END_OF_MAIN()

Rick

Nothing big, but I would take this out:

windowed ? WINDOWED : FULLSCREEN

Like someone said above, any shorthand code I think should be avoided. Not that it's a big deal or anything, but the less questions about something the better.

Otherwise I think it look great. :)

Matt Smith
Quote:

I'd go with a single resolution (with high-color) to avoid the confusion that comes with "customization"

The single resolution is a mistake, as it would be better to provide a clear example of using SCREEN_W and SCREEN_H correctly.

All the examples use a fixed resolution too and that makes it a pain to port to machines that don't offer a 'safe' 320x200 or 640x480.

Eradicor

Really.. Why is this forum in the forum arena shown as yellow.. It is killing me..

btw: 500'th Post with this profile

Evert

It's yellow because it's sticky. As if it's bookmarked for everyone. And its sticky so that everyone can see it and it doesn't get burried and lost among all the other posts.

Quote:

The single resolution is a mistake, as it would be better to provide a clear example of using SCREEN_W and SCREEN_H correctly.

Thinking more about it, I think this is right. The examples show simple things or single features and there it's ok to use a singlefixed resolution, but the demo game can be a bit more complex than that.
Showing in a clear way, with good documentation and comments, how to support different screen modes, colour depths or even update methods would be a good thing in a demo game.
Again, the important words IMO are understandable, clean and well documented code.

Eradicor

Can i get rid of it? That Yellow is killing my eyes.

Evert

Sure. Use a custom stylesheet. Please open a new thread if you need to ask how to use one though.

Kitty Cat

Use the Blue Lotus Blossom style sheet. It's a nice light-blue that blends nicely with the surrounding area. It's enough to be noticeable, but it's not harsh and distracting. :)

Thomas Fjellstrom

Drumcode, you didn't get my hint earlier did you :P Oh, you can also "Kill Thread". that should get rid of the yellow.

spellcaster

The problem with the variable screen resolution is that get_gfx_mode_list() won't function with meta drivers like GFX_AUTODETECT.

So, you'll have to write platform or at least driver specific code to get a list - or you need to show a list of all drivers to the user.

I'd say that at GFX_AUTODETECT and GFX_AUTODETECT_FULLSCREEN should work - and return the modes for the first driver in the GFX_AUTODETECT_FULLSCREEN list.

I'm also not sure if something like this is really needed for 2d games. If your artwork is pixel based, you'll normally want a specific logical size of the screen. The only 2d games that allow different screen resolutions are normally strategy titles that display more of the map on larger screens or emulators which scale their contents to the size of the screen.

In both cases you'll need some extra logic - either to position the elements on the screen or to do the scaling.

While I think that we should have a better example for the get_gfx_mode_list() function, I'm not sure if a demo game is the right place for it.

Michael Jensen

My plate is fairly full, but I'd like to attempt a demo game for this, I have some ideas that could involve using the joystick/mouse/keyboard for game play; as for c programming, I still haven't learned oop but I practice putting my code into .cpp files so I can evily declare variables anywhere I want -- this will have to change, and I can put off learning oop a few weeks or so... -- Also I could benefit from trying to write clear cut code

Also I think some things the demo should DEFINATLEY DO, are be tile based!!! Too many people have trouble building tile based games... Also I think it should be fairly polished, since we are competing with SDL which has hardware accelerated 3D (so I'm against making anything that looks TOO old-style, but then again, I'm a fan of some of the classics so I'm kind of torn...)

Anyway SC, I'd love to use your template, I haven't looked at it yet, but your code has always been understandable for me in the past -- as for the ? operator -- I've been programming in C about 5 years now and I still don't know what it does (I know, that what it does do could be accomplished with an if/else block, but off the top of my head w/o looking it's function up, I couldn't tell you what it does...) Anyway, I might get started on my entry sometime next week, update this thread when you get menuing support in your template...

I'd love to see alex take a bite out of the SDL logo... Can we do this? or is there some kind of copyright on their logo?

Maybe just an alegator that looks like it has an SDL logo in it's mouth but you wouldn't notice unless you knew what it looked like?

Anyway...

spellcaster

The ?: operator is gone.
I'll add an allegro logo and a scrolling credits screen and a hiscore display function.
I'll change the kb handling to the memcpy-the-key-array variant.
I've added a window close hook while in windowed mode.

Anything else that should be in the template?

I think I'll create a "summer games" like game as a first demo game using the template. Not that many games, just the standards:
- 100 m dash
- 100 m hurdles
- Javelin throw (or maybe hammer throw)
- Long jump
- Platform diving
I might add an opening / closing ceremony.

I plan to allow both hotseat and single screen multiplayer (depending on the event and the number of joypads connected).
The game would then show how to use joysticks / keyboard, handle options and player entry screens, multiple hiscores and similar things.

And with Bryce / Poser it shouldn't even be that hard to create the gfx ;)

Inphernic
Quote:

I think I'll create a "summer games" like game as a first demo game using the template.

Heh, wagglemania ahoy!

This sounds like a good idea though. What I'd also like to see is a good (professionalish) Allegro logo. Maybe it's high time for someone to organize a competition about that?

Rampage

Wasn't there one competition like that already?

Yes, I found the results.

[EDIT] Personally, I like this:

02.png

spellcaster

That's the image I use normally:
{"name":"allegro.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/3\/53743769a810134207c7893a603c9fd5.jpg","w":640,"h":480,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/3\/53743769a810134207c7893a603c9fd5"}allegro.jpg

Evert
Quote:

but I practice putting my code into .cpp files so I can evily declare variables anywhere I want

Well, that has nothing to do with OOP (nor does writing C++ have anything to do with OOP - it's a style of programming, not a language feature) and C99 allows this too. That said, Allegro code is pre-C99 and declaring variables halfway a function is evil and ugly anyway.

Quote:

I'd love to see alex take a bite out of the SDL logo... Can we do this? or is there some kind of copyright on their logo?

I don't know if we can, but I sure think that we shouldn't. Never mind how funny it is or if it's intended in good spirit or not, we don't want to come off as bashing SDL. Ultimately, that's not going to do Allegro any good, and there's room for both libraries to coexist anyway.
Does SDL have some sort of mascot? If so, having a two player game where one player controls Alex and the other controls the SDL mascot would be ok in my opinion - but maybe we should ask for permission.

Quote:

I'll add an allegro logo and a scrolling credits screen and a hiscore display function.

Something I remembered when I looked at the contents of demo.dat: the sample of Shawn saying `welcome to Allegro'. I think we should keep that.

Other than that, sounds great! I've seen some very good and interesting ideas.

Chris Katko
Quote:

That said, Allegro code is pre-C99 and declaring variables halfway a function is evil and ugly anyway.

I wouldn't go that far. Just like goto, it has its time and place.

Thomas Fjellstrom

no, it still ugly ;) and its easy to loose a defns if theyre intersperced in the code... Or so I find.

Michael Jensen

I think that if you have big functions that declaring a variable only in it's scope of usage can be cleaner in some situations, but in others yes it can be evil and ugly... yet convienient -- which is not what I should be striving for in this project...

wish list for template: make the menu have sub menus in it for key customization/mouse sensitivity/joy calib/joy etc, and that the menu can be navigated by key/mouse/joy...

spellcaster

Could we postpone the coding guideline wars? Or move them to another forum? It's hard to believe how easy it is to derail a thread here...

Marcello

You've been on a.cc since september 2001 and you still find it hard to believe? ;-)

Marcello

Elias
Quote:

That's the image I use normally:

I like it. Maybe the "A" could be left out though, so it says just "Allegro Game Programming Library".. sounds somehow better to me. Like it's not just any game programming library, but the game programming library. Or don't know - the "A" just sounds odd to me. Could just be me though :)

Marcello

Llegro? ;-)

Michael Jensen
Quote:

I like it. Maybe the "A" could be left out though, so it says just "Allegro Game Programming Library"

Marcello, look again: it says Allegro A game programming library, he wants it changed to Allegro Game Programming Library; I like the idea, and second it. 8-)

edit: hey sc-- I'm looking at the template you posted, and I noticed some odd things right off the bat, in the for loop in hiscore_init, you do ++a instead of a++, what is the significance of this -- from what I understand, in this context, I think I would be correct in guessing nothing would be different? Sorry that my code-fu is not up to date...

edit: as far as gfx/sfx being compatable with the allegro license, I belive allegro is the only thing I've ever seen released as "gift ware" or whatever it is (or am I confused...?) -- is the GPL compatable with the allegro license?

Evert
Quote:

is the GPL compatable with the allegro license?

No.
It is in the sense that you can use both Allegro and GPL stuff in your game, and your game would then be GPL too since Allegro doesn't care and GPL requires it. But obviously, we can't include GPLed code or artwork in Allegro.

spellcaster

I genereally prefer ++a if it wouldn't make a difference. As you say, it makes no difference, so why do you think it's odd? ;)

Regarding the "a":

     ______   ___    ___
    /\  _  \ /_ \  /_ \
    \ \ \L\ \//\ \ //\ \      __     __   _ __   ___ 
     \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `/\`'__/ __`\
      \ \ /\ \ _\ _ _\ _/\  __//\ \L\ \ \ //\ \L\ \
       \ _\ _/____/____\ ____\ ____ \ _\\ ____/
        /_//_//____//____//____//___L\ /_/ /___/
                                       /____/
                                       _/__/     Version 4.1.18 (WIP)


                A game programming library.

             By Shawn Hargreaves, Jan 23, 2005.

                See the AUTHORS file for a
               complete list of contributors.

But it wouldn't bea problem to remove the "a".

Michael Jensen

I dunno, a splash screen is different than documentation saying "Allegro Game Programming Library" in a splash screen looks cooler than "Allegro A game programming library" -- but that's just MHO...

Quote:

I genereally prefer ++a if it wouldn't make a difference. As you say, it makes no difference, so why do you think it's odd?

I usually see a++, etc, and I was just wondering if I had interpreted that wrong, but I was guessing I hadn't, and oh nevermind... just making sure I wasn't missing something... I'm going to sleep now! :P

Elias

Hm, or as mentioned in that other thread, it actually could be called "multimedia library".

Trezker

Maybe the allegro logo should be some flashy version of the ascii art.

Paul Pridham

Or spinning, rotating vectors! :D A demoscene style Allegro splash would be impressive.

Michael Jensen
Quote:

Hm, or as mentioned in that other thread, it actually could be called "multimedia library".

I was kind of going after something that sounded cool to newbs instead of something truthful -- I should either go into advertising or politics... or maybe just sell used cars...

I wont fight the "A" anymore -- I submit.

Trezker

Anyone have a program for recording what you type in. So you can run a replay of the writing process, like some c64 demos and such...

Would be cool to present the allegro ascii like that. ;D

spellcaster

I've updated the code to 4.1.18. I've added a scroller. Guess that's it for the template. I'll now start to write a summer olympics game using the template.

Richard Phipps

Are you going to include the throw the javelin game? I like that one.. :)

Thomas Fjellstrom

Oh, I wonder if I can use one of those old NES running pads for the game? hehe.

Michael Jensen

Umm, were you going to share the template with us? or did you decide just to do only one demo game, yourself? (did I miss a post?)

spellcaster

I wasn't sure if
- I should upload the file
- I should post the file
- nobody cares

I'm also unsure if I should split the file into several (hiscores, scroller, template) source and header iles (as I would normally do) or if it would be better to leave it as one big chunky source.

HoHo

I would like if you:

-post the file(or several files packed together in .zip file)
-divide into several files

That's because dividnig stuff into seperate files is a Good Thing. Having everything in a several thousand lines long file is just awful imo. After all, how long would it take for a newbie to learn how to seperate things? Having an example to see how it's done it shouldn't take long.

Inphernic
Quote:

Oh, I wonder if I can use one of those old NES running pads for the game? hehe.

Real men use Quickshots and, after breaking a number of them, curse loudly and buy a Tac-2.

Trezker

Spellcastah: Upload both versions.

Or people could PM you and then you mail them...

Evert

Nah, I guess I should make a website with the relevant information and some links.

Probably also a way for people to actually register, but I don't have a clue on how to set up something like that (I probably can't anyway, because of my provider), and I don't have the time anyway.

Michael Jensen

Yeah post the code up -- most beginners like one single file, I think that's best -- if you want a site with dynamic content, I can build an asp.net site, if you wanna explain what you want -- but no real host, I can host from my xp computer which occasionally goes down (few hours a week) (see http://overandover.no-ip.com) -- but it's a little slow... (not extreemly, but much slower than something like a.cc, etc...)

Thomas Fjellstrom

Michael, so the single fileness of the current demo is what a newb would prefer? Somehow I doubt it.

Michael Jensen

TF- It's what I prefered when I first started to program, and that's really all I have to go on -- My first big project ended up being about 10 K lines of code in one big file... I still don't always put small projects in more than one file -- I think something small like a demo would go well in one file -- but if the template is huge or something that's cool too. How ever you guys wanna do this, I can just go with it.

Tobias Dammers

The fact that newbies like everything in one big file does not mean this is proper coding practice. I think that especially in an example such as the allegro demo game, proper coding style should be demonstrated. Sooner or later, the newbie in question will be making larger projects, and at that point he/she will come whining about long compile times and errors that are impossible to find because there's 10000 lines of code, with lots of garbage in between.

spellcaster

Ok, I'll split the template into three files then.

da_flo

The point is not exactly that newbies like everything in one big file. It's in fact that they often do know know or understand how to compile mutiple files projects, and when they do, they often do not know how to handle those multiple files properly, to avoid usual pitfalls like multiple declarations errors due to headers, or linker errors due to the lack of use of extern, and so on.

Evert
Quote:

The point is not exactly that newbies like everything in one big file. It's in fact that they often do know know or understand how to compile mutiple files projects, and when they do, they often do not know how to handle those multiple files properly, to avoid usual pitfalls like multiple declarations errors due to headers, or linker errors due to the lack of use of extern, and so on.

Hence the raison d'etre of Allegro's demo game.
It's fine if it is a multi-file project, as long as it's clearly commented and documented, so that we can say if you want to know how to make a multi-file project, just look at Allegro's demo game.

EDIT: not to say that the demo game has to be multiple source files, but it'd be ok for it to be so. Certainly so if we're to have a page with all entries available for download.

Michael Jensen

Since the template isn't posted (so I won't start on the demo game yet) What did you have in mind for the web site?

I was thinking as far as public pages go:
a welcome page, listing details on the whole project/competition/whatever,
a public page for listing all the projects, their team members, a small description field for each proj., maybe a 160x120 screen shot that can be clicked on and enlarged for each proj.... oh and a download
link, maybe the template will be the first listed project on this page.
public signup/login pages
As far as private pages go: a couple of private pages, where each user can manage their project....

sound good?
I can't guarantee this site will stay up longer than 6 months after the projects are all done and over, but I can put something mostly functional up for the now... It will take a couple of days tho, I'll get started on it tonight unless anyone thinks that this is really not needed, or unless anyone else steps up to the plate...

spellcaster

Sorry, I started with my summer games demo, so I kinda forgot to update the demo template and to post ithere.
Current state is attached.

Michael Jensen

I'm quicker than I thought I was. Unless anybody has any objections, I put together a site for this, and everyone interested can head over and register up/post screen shots, and a downloadable zip/post news/leave feedback/manage their projects (description, name, etc) I'm impressed, you should be too.

Allegro Demo Project Site

Evert

Awesome Mike!
Can you put the requirements for qualification up there? They're in the first post (except for Shawn's `Welcome to Allegro' sample). This should probably be extracted from the demo.dat file and uploaded for download.

It's no big deal if the site can't stay up longer than 6 months after the competition. Once the winner is known, all the games and sourcecode (including that of the current demo) should move to Allegro's homepage anyway as an addition to the demo that comes with Allegro.

Trezker

Damn, that's really cool. Simple and easy to use it seems.
Too bad I'm so busy in school, otherwise I would've started working on a demo already. But, if you're learning openGL, there is no time for anything else...

Evert

I hear there's need for an AllegroGL demo too.

Trezker

Hmm, yeah, that's a nice idea...
But I think that's gonna have to wait 'til summer...
And I have to figure out some nice gamedesign...
Perhaps, Dropzone3d that I've thought about making before...

Michael Jensen

OK, I addded the requirements on the News page (the first one that comes up) and just to clarify, if anyone wants to post any news item, you can just log in and click "make announcement", (but don't abuse this privlidge or I might have to revoke it from your account, as long as it's something related to this event, and it's not offensive, blah blah blah, you have nothing to worry about :-)) Right now there is no mark up in the posts, so I think I'm going to try to adopt the allegro way of marking things up. with the square brackets, etc... I should be home again in about 10 hours so, lets see what starts to happen on the site -- this is exciting (first site I've done with an actual functional purpose...)

Evert

Looks fine. You may want to add my name somewhere to the requirements, as it's basically a cut&paste from my first post in this thread.
Do you want links to images of Al and Alex and the Allegro logo?

Oh, just one nitpick: it's Shawn, not Sean. ;)

Tobi Vollebregt
Quote:

The point is not exactly that newbies like everything in one big file. It's in fact that they often do know know or understand how to compile mutiple files projects, and when they do, they often do not know how to handle those multiple files properly, to avoid usual pitfalls like multiple declarations errors due to headers, or linker errors due to the lack of use of extern, and so on.

Personal experience: when I started coding using C and Allegro really didn't know about multiple file projects - my first multiple file projects actually were one .c file with a lot of .h files which declared&defined functions used in the .c file. Only after a few projects I discovered how to handle this properly, so I would say: use a few source files for the demo but not too much because it's really frustrating if you look for something in an example/demo and it appears to be in another source file. And of course explain why & how.

Trezker

Including a guide to modular programming in the demo folder might be a good idea.

Michael Jensen
Quote:

Do you want links to images of Al and Alex and the Allegro logo?

Sure... I'm also thinking about posting the template up there as a download... -- I'd like to see a few more people sign up and post their planned projects/status/screen shots/playable demos in progress etc...

I made the corrections you suggested, feel free to nitpick -- I did add some typecasting functionality for bullets, but I havent compiled it into the release that's running on the site at the moment, I want to add a few more things and then compile them all in at once to minimize the down time([url] comes next...)

...I might also post a resources section, and a small forum if I feel it... :o

Evert

Ok, the relevant links are:

[url http://alleg.sourceforge.net/logos.html]
[url http://alleg.sourceforge.net/images/al_couch.png]
[url http://alleg.sourceforge.net/images/alex.png]

The Welcome to Allegro wav should be attached to this post. I can't check because I don't have a soundcard in my computer at the moment.

Trezker

I like this one, but I don't think video fits in...
http://alleg.sourceforge.net/images/logos/eric_pietrocupo/logo1.jpg

gnolam
Quote:

I like this one, but I don't think video fits in...
http://alleg.sourceforge.net/images/logos/eric_pietrocupo/logo1.jpg

Holy photoshop filters, Batman!

Michael Jensen

I like that one too -- it's neat.

Umm, sorry about the site being down earlier today, it's back up again, maybe cable company killed the internet while I was at school and I had to come home and manually ressurect it -- it's back up now, so feel free to register make announcements, etc... (no data was lost or anything, the site was just offline)

X-G

If anyone ever decides to use that logo for anything, I will personally come to their house and break their kneecaps*. Let's bury that thing in frozen carbonite, burn the carbonite, feed the ashes to hungry dogs, burn the dogs, and freeze the remains in carbonite. Then blast it into space.

* Not really.

Richard Phipps

Back on topic, how are the demo games coming along?

Evert

Seems like no one has registered a project as of yet.
I actually started on something small myself, that Nibbles clone I've been meaning to make. I'm not sure if I'll actually enter it though. For now, I'm busy getting my computer up and running to full capacity.

Richard Phipps

What's more important for a demo game, making an example which shows off a lot of Allegro, or soemthing that might not show as much, but is a fun game?

Or should we have two sections?

Evert
Quote:

What's more important for a demo game, making an example which shows off a lot of Allegro, or soemthing that might not show as much, but is a fun game?

I'd say try to do both, but the emphasis should be on how it shows you to use the library and what it is capable of. We need a demo where we can tell people to look at the source to see how it's done. :) If it's a fun game that's a plus, but it's not nescessarily the point of a demo game.

Michael Jensen

The only registered users, as of right now, are me, and someone who goes by "lucky_monkey" but no project for him yet...

I've got a project started, if I will finish it, no idea -- I've got two huge programming final projects due for this quarter on the 16th... So the site might not get any TLC from me until after that date (which might be after the demo compo is over, and I might not get to make/finish my game :'() anyway...

Feel free to register, put up downloads, etc, there's no file size limit for the zip files/image files, but be respective that one image is supposed to be small, and one big... (maybe an enlarged version of the small?) anyway...

The site seems to be chugging along just fine right now -- I wonder who can make X-G's post into a game? "Launch frozen dog remains into space!"

edit: by the way -- as far as legality goes, can we use public domain gfx/sfx/music in our game?

Evert
Quote:

I've got two huge programming final projects due for this quarter on the 16th... So the site might not get any TLC from me until after that date (which might be after the demo compo is over, and I might not get to make/finish my game :'() anyway...

Don't worry, the competition will run beyond the first release candidate at least, and probably after that. I also think it's only fair to announce the deadline for the end of the competition two weeks in advance.

I think Elias also has a point that we should try to synchronize the release with the next release of AllegroGL if one of those is forthcoming too.

Quote:

edit: by the way -- as far as legality goes, can we use public domain gfx/sfx/music in our game?

As long as you know for sure that it is free, I guess so. But if you do, you should credit whoever made it originally and probably contact them regardless. Bear in mind that if it ships with Allegro, it implicitly falls under Allegro's license and I think the author has to give permission for his work being distributed under this license.

gnolam

If it's in the actual public domain you can do absolutely whatever you want with it...

Niunio

Some weeks ago I read a book about video game making. I had some ideas about a simple space-shooter. It would have:

  • Fake 3D stars background.

  • Simple tile background, to make it less monotonous.

  • Two different enemies: one only shoots, the other tries to collide with the player.

  • The enemy waves and tilemap are programmable with simple byte-codes.

Now I have some free time, so may be I can finish it, but I'll need help to create some enemy waves, graphics and music.

[edit]
I forgot to say that I started to code it some time ago, but I did it in Spanish, so I should translate it to English.

Also it has more than one C file. May I keep it multi modular or should I put all in one file?

And should I put the main funcion in the bottom of the file? I prefer to put it the first.
[/edit]

Paul Pridham

I have some nice'n'easy turtle graphics code that could be used for vectory stuff like Asteroids and lasers and such, or an interactive LOGO-like demo.

Michael Jensen

YeeHaw -- 4 users now! -- 2 projects -- wow this is going to eat up a lot of disk space -- I better upgrade to a 10mb hdd...

anyway... It's 1AM, -- Hey Evert, I was thinking maybe you should sign up, and I can change that news post over to being in your name -- (can't change a news post over to a non-account, and I didn't want to make an account for you, when you could make one on your own, etc...)

Quote:

I have some nice'n'easy turtle graphics code that could be used for vectory stuff like Asteroids and lasers and such, or an interactive LOGO-like demo.

ETCH-A-SKETCH!

Evert

Ok, I've signed up.
Whadda ye mean it's 1AM? ;) I just managed to get to work through half a metre of snow and dysfunctional trains and public transport (luckily, I could get a ride).

spellcaster
Quote:

Seems like no one has registered a project as of yet.

Should I register a depot project?
I decided to start with the boring part, and player name entry / country selection is working.
I then started to create the sprites for the diving event.

EDIT: NM, found the "allegro demo game" website

Evert
Quote:

Should I register a depot project?

Sorry, I meant on Michael's page.
I wouldn't hold it compulsory to register there, but it's nice to have some idea on who is joining the competition and what sort of ideas people have for a demno game.

Trezker
Jensen said:

I better upgrade to a 10mb hdd...

That doesn't sound like much...

Tobias Dammers
Quote:

half a metre of snow and dysfunctional trains

Been to the north of this beautiful country, haven't you? Didn't have any problems traveling from The Hague to Lelystad and back just yesterday, although I wouldn't have thought in my wildest dreams that I would ever have to change trains on a station called 'Almere Oostvaarders'.

Michael Jensen

Ok Evert -- Now you've posted it ;) -- Not much else I plan on doing with c/allegro for at least a week or so here, and the site seems to be chugging along happily enough...

Quote:

That doesn't sound like much...

Nevermind -- I was playing with the idea that it was 1am and I didn't feel very normal. No substance abusage was involved.

Torbjörn Josefsson

Just an alternate logo idea (attached)

Feel free to mess with it :)

Thread #460693. Printed from Allegro.cc