![]() |
|
Collaborators for Allegro Demo Game Competition? |
Thomas Harte
Member #33
April 2000
![]() |
I am considering an entry for the new Allegro Demo Game and have been throwing together a 2d physics based platformer based upon a vector landscape with bitmaps/etc for objects and possibly a background. I'm thinking of a Sonic style platformer or else a racing game. I've put together the following:
</li> Source & 'art' (ground texture 'borrowed' from GIMP!) are attached. Big style commenting is still required. Is anyone willing to help in any way? I'm especially desperate for the artisic resources of graphics and audio. If not then I'll probably just turn it into a personal project, throw together a proper level editor, etc. EDIT: remembered to actually attach the file! And make the comment I forgot to include: I'm not going to hold my breath! [My site] [Tetrominoes] |
Evert
Member #794
November 2000
![]() |
Looks good so far! I'm afraid I cannot contribute much in the way of graphics, possibly except for some stars/gems/hearts, but even those you may be able to get prettier versions of elsewhere. A few comments about the code: if it's going to be the Allegro Demo game, it should follow Allegro's coding style, meaning underscore_symbol_names instead of AlternatingCaps. That's ok though, sed can do that at the end. |
Thomas Harte
Member #33
April 2000
![]() |
Quote: One more serious thing: do you need to do #include <Allegro/allegro.h>? If yes... well, why? I don't know MacOS X at all, really, but this brutally breaks on other platforms. If it's the norm, then maybe allegro.h should do #include <Allegro/allegro.h> for you on MacOS X, if it doesn't already? Oh, I don't know. The project stationery that comes with Allegro (i.e. the template source file that appears when you start a new Allegro project) #includes that way and has all include paths set accordingly. As I'd been away from Allegro for a while before installing the Mac OS X port I just assumed this was normal now. Anyway, I'm living in the expectation that I won't find enough art/sound to finish this in the next 14 days but I thought it was worth a try. [My site] [Tetrominoes] |
Evert
Member #794
November 2000
![]() |
Considering some rather serious issues have popped up, it'll take a bit longer to release 4.2 final. So it's probably fair to extend the deadline for at least a week or so. EDIT: I've attached the BlitzHack sound samples, I don't know if they're that useful though. Also, if you think it fits the game well enough, you can use the current demo game music. From what I remember it's quite decent. |
amarillion
Member #940
January 2001
![]() |
I can help you with graphics. I've always wanted to do a sonic game Why do you do #include <Allegro/allegro.h> instead of just #include <allegro.h>? That is not very standard? edit: also, you forgot to include stdio.h in Level.c, now it complains that it doesn't know FILE* -- |
Jakub Wasilewski
Member #3,653
June 2003
![]() |
I could help you with the static graphics, of course if you think I'm good enough. To get an idea of my limited skills, you can check out the screenshots for SWB and Sokoban Advance. Of course, you could check the games themselves, but the first likely won't work on a Mac even if compiled from source. I also have a big archive of freeware/public domain sounds, so maybe I could help with that too. However, I'm really no good at drawing animated characters, so if you still want the platformer, you would have to find somebody else for doing sprites. [EDIT] oops, beaten. --------------------------- |
miran
Member #2,407
June 2002
|
I started working on my entry quite some time ago, and got as far as having an almost finished working game framework with menus and everything. Then I ran out of free time and left the project to rot. As I mentioned in one of the earlier threads it was supposed to be a top down racing game, a bit like Micromachines, but with (slightly cartoonish stylized) formula 1 cars. I just started work on a level/track editor at the time (tracks were supposed to be very similar to what TH has now; vector based road, kerbs, gravel and grass, with trees, houses, walls, etc. as sprites on top of everything). Attached is the whole project as I left it about a month ago. The music and the welcome sound are taken from the Allegro 4.0 demo, as well as the scroller code (although I took out some parts so it now loads text only from readme.txt and thanks._tx). The gamepad input driver is still NYI but other than that the framework is almost finished. It is written in such a way that menu/game screens can easily be plugged in. If anyone wants to use it, go ahead, it's easy to pull out my game's specific menus and put in your own. Ask about details if you're interested, because I didn't write any comments yet (I was planning to do that eventually)... But perhaps it is just slightly too complex for an Allegro demo game -- |
amarillion
Member #940
January 2001
![]() |
That menu system looks quite spiffy. Thomas, perhaps you can use that on top of your game? -- |
FMC
Member #4,431
March 2004
![]() |
Miran, nice menus you got there! [FMC Studios] - [Caries Field] - [Ctris] - [Pman] - [Chess for allegroites] |
amarillion
Member #940
January 2001
![]() |
Miran: I didn't realize that the RGB triangle is now the official allegro logo, but I think it is a good choice. -- |
miran
Member #2,407
June 2002
|
No, that's my personal temporary Allegro icon I've been using for the last year and half or so. Just until I get something better... -- |
Peter Hull
Member #1,136
March 2001
|
re: <Allegro/allegro.h>, this is a Mac thing. A framework is a bundle containing all the headers, libs, helpfiles and any other resources for a library. It can contain binaries for different platforms and different revisions. If you compile with command line options -framework Fred, then Fred.framework is searched for headers and libs (a bit like -I and -L combined). If you specify <Fred/header.h>, that means look for header.h in Fred.framework. So <allegro.h> would work, as long as you have the Unix-like version installed. AllegroGL (IIRC) uses #ifdef to specify one or the other. Pete
|
Evert
Member #794
November 2000
![]() |
But Allegro's own examples use #include <allegro.h> on MacOS X; I assume they compile fine? |
Ultio
Member #1,336
April 2001
|
Using #include <allegro.h> on MacOS X works fine without any problems. I do that in all of my projects to maintain cross compatability. As far as I can recall I didn't do anything special in the ways of tossing allegro.h someplace my compiler would be able to get at it. I'm sure the basic compiling/installing procedures took care of that. --- |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Quote: But Allegro's own examples use #include <allegro.h> on MacOS X; I assume they compile fine? Yes, because the include directory is specified on the command line. However, even from within an XCode project file the #include <allegro.h> works exactly like it would on a UNIX system. |
OICW
Member #4,069
November 2003
![]() |
struct Sym { enum SymbolTypes Type; char Text[256]; float FQuantity; int IQuantity; } Symbol; FILE *input = NULL; Compiler says: syntax error before '*' token [My website][CppReference][Pixelate][Allegators worldwide][Who's online] |
Neil Walker
Member #210
April 2000
![]() |
I'm running windows visual studio 2003 and I get the following errors (after putting in the proper allegro.h include). Any ideas? Neil. ------ Build started: Project: temp, Configuration: Debug Win32 ------ Compiling... Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Thomas Harte
Member #33
April 2000
![]() |
Quote: Any ideas? There's really nothing to see, I just wanted to make it obvious that I wasn't doing some stupid hypothetical team building experiment. Anyway, I guess I've been doing C++ so long that I've forgotten what C does and doesn't offer. Quick fix for the code should be to rename it .cpp and recompile! With respect to proper C compliance, keep reading. I've been coding to C99. I had assumed this is what everything (including MSVC 2003) supports, but dealing with Level.c first: e:\gamedev\ADemo\Level.c(5) : error C2054: expected '(' to follow 'inline' All seem to imply that MSVC doesn't like the line: inline int GetChild(int x1, int y1, int x2, int y2, int qx, int qy) Now I can't think when a bracket would follow an inline, so my only guess is that MSVC 2003 doesn't support inline functions in C. These were introducted with C99. Try removing the 'inline' from all the functions up to and including ToggleChildPtrX on line 28 and you should kill all the errors pre-line 75 as well as the errors related to lines such as 138, 139, 140 and 141. e:\gamedev\ADemo\Level.c(75) : error C2143: syntax error : missing ';' before 'type' Refers to a declaration of "struct EdgeContainer *ENext;" right in the middle of a function. This also is a C99 addition. If MSVC doesn't support this (as implied by the error) then this explains pretty much all of the other errors. stdio.h needs to be #include'd as previously noted to deal with my use of FILE *, etc. The same problems explain away Main.c problems. The only thing I'm dumbfounded by is: e:\gamedev\allegro\include\allegro\internal\alconfig.h(296) : warning C4312: 'type cast' : conversion from 'unsigned long' to 'unsigned char *' of greater size (etc) I can downgrade to whatever was C pre-99 but has anyone got any suggestions on that? Quote: A few comments about the code: if it's going to be the Allegro Demo game, it should follow Allegro's coding style, meaning underscore_symbol_names instead of AlternatingCaps. That's ok though, sed can do that at the end. Then I'll leave that to sed. The less ugly the code looks on my screen the more selfishly happy I am! krajzega said: I could help you with the static graphics, of course if you think I'm good enough. To get an idea of my limited skills, you can check out the screenshots for SWB and Sokoban Advance. Any chance of inheriting the ground texture from SWB? amarillion said: I can help you with graphics. I've always wanted to do a sonic game I figured that to meet the deadline there probably isn't time for any coherent enemies at this stage so I propose skipping them and doing a game that involves lots of running around geometrically interesting levels purely to collect rings or fruit or coins or whatever, possibly against a time limit. Like Sonic 2's race, I guess. Maybe some enemies can be thrown in for a later iteration of the demo game. So, with that in mind all I really need are some interesting textures (I was thinking soil, marble, grass and ice) and a central sprite. I don't propose incorporating spins at this stage, so I guess all that is needed is the character walking, the character running (i.e. after it builds up some speed), the character jumping (during an upward arc) and tumbling (while coming down from a jump or having walked off a ledge). The character sprite is a 32x32 block. For simplicity and due to time constraints the collision form is a circle of radius 32. Although don't really worry about making a fat sprite just do something that looks good and if necessary I'll switch to an ellipsoid for collisions. Some coins/fruit/rings that animate would be nice. Finally there is the job of the background. I was thinking of a long stretch of water at the bottom and some passing clouds. I plan on doing some pseudo light refraction on the water so just a texture that looks a bit like the murky depths would be good. Quote: [miran's] menu system looks quite spiffy. Thomas, perhaps you can use that on top of your game? I will endeavour to do that exact thing. Quote: So <allegro.h> would work, as long as you have the Unix-like version installed. AllegroGL (IIRC) uses #ifdef to specify one or the other. Which is funny given that AllegroGL doesn't come with project stationery. [My site] [Tetrominoes] |
Evert
Member #794
November 2000
![]() |
Quote: Anyway, I guess I've been doing C++ so long that I've forgotten what C does and doesn't offer. It compiles fine as C here. But... Quote: I had assumed this is what everything (including MSVC 2003) supports ... MSVC doesn't do C99. The workaround in this case would be to use Allegro's AL_INLINE macro (I never use ir personally) or just not bother at all. Quote: The only thing I'm dumbfounded by is: I think it's telling you that you're converting a long integer to a pointer, which may not be safe since they don't have the same size (MSVC allows 64 bit pointers on 64 bit systems, but it still has 32 bit long integers). Quote: I can downgrade to whatever was C pre-99 but has anyone got any suggestions on that?
Allegro is still officially C89, so I would suggest sticking to that. I'd be all for switching to C99, but I have a feeling the MSVC people won't be very happy about that. |
Neil Walker
Member #210
April 2000
![]() |
ok, i changed them all to cpp files and the error list was as below. I imagine the void casts errors are because you need to be more explict with your casting. I then changed them back to c files, removed the inline and the errors are as below this first error list. as for C99, this might shed some light: A: I happen to think there'll pretty cool as well. We haven't had a lot of demand for varargs macros. We happen to have an extension '__noop' which can be used for some of the same purposes varargs macros are (debuging printf's). Host: Brandon (Microsoft) A: In general, we have seen little demand for many C99 features. Some features have more demand than others, and we will consider them in future releases provided they are compatible with C++. It is more likely we'll entertain C99 features if they are picked up in the next version of the C++ standard. ------ Build started: Project: project, Configuration: Release Win32 ------ Compiling... Build log was saved at "file://e:\gamedev\allegro_system\tests\temp\project vs2003\Release\BuildLog.htm" ************** errors from c ******* ------ Build started: Project: project, Configuration: Release Win32 ------ Compiling... Build log was saved at "file://e:\gamedev\allegro_system\tests\temp\project vs2003\Release\BuildLog.htm" ---------------------- Done ---------------------- Build: 0 succeeded, 1 failed, 0 skipped ***************** Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Thomas Harte
Member #33
April 2000
![]() |
Quote: I think it's telling you that you're converting a long integer to a pointer, which may not be safe since they don't have the same size (MSVC allows 64 bit pointers on 64 bit systems, but it still has 32 bit long integers). I definitely am not! All 32 lines of my Display.c are:
And Neil gets the errors: Quote: I imagine the void casts errors are because you need to be more explict with your casting. Yes. In particular I'm not casting the results of malloc. Nothing that puts the code too far beyond fixability, thankfully. Evert said: Allegro is still officially C89, so I would suggest sticking to that. Well you could have said that on your website! [My site] [Tetrominoes] |
Neil Walker
Member #210
April 2000
![]() |
So in summary, the only problems are: > set_close_button_callback(QuitFunc); > if(NewAng < (M_PI*0.5f) || NewAng > (-M_PI*0.5f) || fabs(NewAng - *a) < (-M_PI*0.25f)) it tells me M_PI is undeclared yet when i hover over it, it tells me the value, which seems odd, especially as it is defined in math.h > p->x = Symbol.IQuantity; Pos seems to be declared in loads of windows headers, is it getting mixed up somewhere with yours and windows? Neil. Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Thomas Harte
Member #33
April 2000
![]() |
Quote: I take it this is a newer feature, i'm still using 4.0.3 Yes. It's the new name for 'set_window_close_hook'. Don't ask me why. Quote: Pos seems to be declared in loads of windows headers, is it getting mixed up somewhere with yours and windows? I guess so. I'll use the full word 'position'. I've also switched 'M_PI' to 'AL_PI'. Please try the fixed source attached? Oddly the behaviour of the 'player controls hack' seems to have changed and the controlled object seems to be using energy less efficiently but as its a hack about to vanish I don't really care. [My site] [Tetrominoes] |
Neil Walker
Member #210
April 2000
![]() |
I was just about to go to bed there Your problem is 'Position' is declared within the Triangle Struct yet you are passing it in directly to a function which is probably why it it getting mixed up. so I took it out, as in:
and it all works apart from the renamed allegro function and strtof(Symbol.Text, &eptr); i think the only function msvc has in string.h for converting to floats is strod Neil. Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Evert
Member #794
November 2000
![]() |
Quote: I take it this is a newer feature, i'm still using 4.0.3 well, as it's for the 4.2 demo game, there will be things that are incompatible with 4.0. Quote: Yes. It's the new name for 'set_window_close_hook'. Don't ask me why.
Well, the name `set_window_close_hook' sucks for one thing. |
|
|