|
|
| tried allegro 5 today, some ideas |
|
kronoman
Member #2,911
November 2002
|
hello well, I have some things to say about allegro 5 first, works really fast, Im using a ASUS EEE netbook , 1.6 Atom, and really works awesome, more fps than the allegro 4.x series on my projects the ttf font support rocks!! computer: ASUS EEE 1,6ghz now, what I did not liked... pretty hard to compile, had to download a lot of stuff that I detail here: allegro-4.9.21.7z then, make install did not install the proper dlls, so I had to install them by hand dlls needed (A LOT, 13,04 MB OF THEM) I did not compiled the ogg, DUMB stuff etc so well, whats my point? I feel it a little bloated, no more small 500 kb games that I could send to my friends by mail also, aint very clear on the documentation about what files you need, or how to install, UNINSTALL them if you dont want to use A5 anymore, and how to compile your game the features of A5 are really cool, just like I said, I found the build docs pretty thin, and the product a little big, i.e a small game will be at least 15 MB? btw, never managed to get audio on the examples, but I got audio on the demo speed the demo a5steroids should work anyways if you did not compiled ogg, just dont use those resources thanks for your time, just trying to help to improve and make easier to use A5 |
|
Matthew Leverton
Supreme Loser
January 1999
|
You can download binaries, including single DLL ones, here: SPEED uses code generated music and sound, which is why that worked. Otherwise you are stuck with WAV files if you don't have OGG. |
|
Trent Gamblin
Member #261
April 2000
|
The game doesn't need to be 15MB. For example, here's a game that's a 1.5MB binary: http://www.nooskewl.com/stuff/downloads/Happy-WordZ-1.1-linux.zip. That includes the dlls and a fair bit of graphics and even music. |
|
Elias
Member #358
May 2000
|
The next version will also not include libpng and libjpeg by default (we use GDI+ instead) so less size. And Micał (hope I spell that right) also managed to create a single .dll which includes all the addons and dependencies. So no need to build yourself, and very easy distribution. -- |
|
X-G
Member #856
December 2000
|
The lack of fully compatible MSVC10 binaries is still a problem. The batch currently up on the site inexplicably link to the MSVC9 debug runtime, and are thus useless for MSVC10. -- |
|
kronoman
Member #2,911
November 2002
|
thanks for all the info now, the link to the pre compiled binaries should be clear on the readme inside the source files pack, like some warning, you could do this faster if you want I downloaded my copy from here that goes here http://sourceforge.net/projects/alleg/files/allegro-unstable/4.9.21/ I cant see any reference or link to the binary files, or a visible link to the new website of Allegro that I found thanks to you: http://allegro5.org/ other idea, I know there is OGG support, but a MP3 add-on would be nice too and about GDI+, will that work on linux? we need more info on the docs on how to distribute a game for linux, i.e in binary form, at least for the major current distros that kind of info would make allegro useful for commercial development of games |
|
Trent Gamblin
Member #261
April 2000
|
kronoman said: and about GDI+, will that work on linux? No, it's a Windows thing. But every Linux distro already has libpng and libjpeg, so you don't have to include those with your distribution. Same for libogg, libvorbis, libvorbisefile, and others can be installed by the package manager. Quote: we need more info on the docs on how to distribute a game for linux, i.e in binary form, at least for the major current distros The best solution I've find so far is to compile on an old version of Ubuntu (I use 8.04). I haven't had many problems when doing that. I like as much stuff statically as makes sense (like stuff that may vary between distros: lua, physfs and so on). Then I include the allegro shared libraries with my program, though you can link statically also. I put the shared libs in though, and run my game with a little script: #!/bin/sh LD_LIBRARY_PATH=shared_libs:$DL_LIBRARY_PATH ./mygame.real
|
|
Michał Cichoń
Member #11,736
March 2010
|
Elias said: <slash>Micał (hope I spell that right)<slash> Almost. Michał - that's my name in Polish, Michael in English. So you miss 'h' letter. ; ) kronoman said: other idea, I know there is OGG support, but a MP3 add-on would be nice too To use MP3 in your game/application you have to pay a fee. Check this site for details. kronoman said: and about GDI+, will that work on linux? No, it would not. GDI+ is not available under Linux. libpng and jpeglib will be used instead. "God starts from scratch too" |
|
verthex
Member #11,340
September 2009
|
Well, it would be nice to have a tutorial on setting up allegro 5 for fedora linux users. I'm not entirely sure how a dll would work on linux, since the .so file is the equivalent for linux. Plus a wiki on allegro "methods" support would be nice, something like a chart that shows what works on mac, windows, linux, etc. for allegro 5.
|
|
Arthur Kalliokoski
Member #5,540
February 2005
|
verthex said: Well, it would be nice to have a tutorial on setting up allegro 5 for fedora linux users. What? I have Slackware, and all I had to do was say tar xv allegro-blahblah.tar.gz #define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull |
|
kronoman
Member #2,911
November 2002
|
Michał Cichoń said: To use MP3 in your game/application you have to pay a fee From the site However, no license is needed for private, non-commercial activities (e.g., home-entertainment, receiving broadcasts and creating a personal music library), not generating revenue or other consideration of any kind or for entities with associated annual gross revenue less than US$ 100 000.00. I wish I had to pay the license, I would be making 100 K !!! now, the legal issue is solved, some examples of code on how to link MP3 to A5?? |
|
Thomas Fjellstrom
Member #476
June 2000
|
kronoman said: However, no license is needed for private, non-commercial activities (e.g., home-entertainment, receiving broadcasts and creating a personal music library), not generating revenue or other consideration of any kind or for entities with associated annual gross revenue less than US$ 100 000.00. If that Jukebox is ever used in a public place or restaraunt they may want money. as for actual games, that isn't included in your quoted text, it has its own exceptions. 5000 distributed copies. -- |
|
Bruce Perry
Member #270
April 2000
|
I would not bother with mp3 support in Allegro. Aside from the legal minefield, there is the fact that mp3 is technically outdated. Ogg Vorbis surpasses it by miles, particularly for smaller file sizes. You know how bad most Flash animations used to sound 5-10 years ago? That's what mp3 does for smaller file sizes. In my view, the only reason to use mp3 is when you want maximum compatibility and you are not in control of the player. For example, if you are distributing music for people to play on their letter-of-the-alphabet-Pods, it makes a degree of sense. Occasionally it's useful, e.g. if your game can make use of the end-user's existing music library, but that's quite rare. In my view it would be sufficient for Allegro 5 to recommend one or more existing mp3 libraries, but to start with a paragraph explaining what Ogg Vorbis is and persuading people as to why they should use it. (I may be biased by some mild sadness that Ogg Vorbis hasn't had more success in the commercial world.) Thanks for making the suggestion thread. I'm not involved with Allegro 5 development (too busy), but it's good to see this sort of thing happening. I have been trying to find time to start using Allegro 5 myself, and I want it to be as good as it can be By the way, in #allegro we were wondering where you were -- |
|
verthex
Member #11,340
September 2009
|
Arthur Kalliokoski said: What? I have Slackware, and all I had to do was say tar xv allegro-blahblah.tar.gz
All I could find are binaries, what about the tar file. Where is it? Also I tried: tar xv allegro-blahblah.tar.gz and the cursor hangs. Tried xvfz but I could not get make to work in the build directory, got an error -- Build files have been written to: /home/cf/Desktop
|
|
Evert
Member #794
November 2000
|
verthex said: Tried xvfz See the .gz ending? That means it's a gzip'ped file you're dealing with. Which means you need to gunzip it before you use it. And that's exactly what the z flag to tar does. Quote: but I could not get make to work in the build directory, got an error
Post the exact commands that you typed here. $ mkdir Build $ cd Build $ cmake .. $ make
|
|
Thomas Fjellstrom
Member #476
June 2000
|
Arthur Kalliokoski said: tar xv allegro-blahblah.tar.gz Yeah, you want to put the 'f' flag there, and put it last. all you should need in most cases is: tar xf file.tar.gz -- |
|
verthex
Member #11,340
September 2009
|
I got it to install using this for fedora 13: tar xvfz allegro-4.9.21.tar.gz Not sure how this was a problem before, I did the same exact thing previously. Now how do I setup the linker in codeblocks. What name.a do I use to link with? I also noticed several of these messages with different names with .so extension. Removed runtime path from "/usr/local/lib/liballegro_main.so.4.9.21" Is that ok? So I tried to compile this code after commenting out some statements related to common.c: 1#include <allegro5/allegro5.h>
2#include "allegro5/allegro_image.h"
3#include <allegro5/allegro_primitives.h>
4
5//#include "common.c"
6
7#define NUM_BUTTONS 3
8
9static void draw_mouse_button(int but, bool down)
10{
11 const int offset[NUM_BUTTONS] = {0, 70, 35};
12 ALLEGRO_COLOR grey;
13 ALLEGRO_COLOR black;
14 int x;
15 int y;
16
17 x = 400 + offset[but-1];
18 y = 130;
19
20 grey = al_map_rgb(0xe0, 0xe0, 0xe0);
21 black = al_map_rgb(0, 0, 0);
22
23 al_draw_filled_rectangle(x, y, x + 26.5, y + 41.5, grey);
24 al_draw_rectangle(x, y, x + 26.5, y + 41.5, black, 0);
25 if (down) {
26 al_draw_filled_rectangle(x + 2, y + 2, x + 24.5, y + 39.5, black);
27 }
28}
29
30int main(void)
31{
32 ALLEGRO_DISPLAY *display;
33 ALLEGRO_BITMAP *cursor;
34 ALLEGRO_MOUSE_STATE msestate;
35 ALLEGRO_KEYBOARD_STATE kbdstate;
36 int i;
37
38 if (!al_init()) {
39 //abort_example("Could not init Allegro.\n");
40 return 1;
41 }
42
43 al_init_primitives_addon();
44 al_install_mouse();
45 al_install_keyboard();
46 al_init_image_addon();
47
48 display = al_create_display(640, 480);
49 if (!display) {
50 // abort_example("Error creating display\n");
51 return 1;
52 }
53
54 al_hide_mouse_cursor(display);
55
56 cursor = al_load_bitmap("data/cursor.tga");
57 if (!cursor) {
58 // abort_example("Error loading cursor.tga\n");
59 return 1;
60 }
61
62 do {
63 al_get_mouse_state(&msestate);
64 al_get_keyboard_state(&kbdstate);
65
66 al_clear_to_color(al_map_rgb(0xff, 0xff, 0xc0));
67 for (i = 1; i <= NUM_BUTTONS; i++) {
68 draw_mouse_button(i, al_mouse_button_down(&msestate, i));
69 }
70 al_draw_bitmap(cursor, msestate.x, msestate.y, 0);
71 al_flip_display();
72
73 al_rest(0.005);
74 } while (!al_key_down(&kbdstate, ALLEGRO_KEY_ESCAPE));
75
76 return 0;
77}
I added liballeg.a in the link libraries but then I got this error: ld||cannot find -lalleg| This was in codeblocks. I tried to put -lalleg in the box next to the libraries box under the "other linker options" heading with no luck, do I need to specify a directory? If so where? EDIT I tried this page where on the bottom it says to change the project build options. I added the directory under usr/local/lib but adding liballegro.so didn't work? I did remove the liballeg.a option in the link libraries section as well. EDIT: I just had to import every .so file from usr/local/lib and it compiled fine. But then I got this error running the program in xterm, {"name":"602127","src":"http:\/\/static.allegro.cc\/image\/cache\/4\/d\/4d8f2ea044bc275e5d7dd23211e142b2.png","w":513,"h":168,"tn":"http:\/\/static.allegro.cc\/image\/cache\/4\/d\/4d8f2ea044bc275e5d7dd23211e142b2"} I did find these 2 pages (allegro thread and fedora thread) but Im not sure how to modify the sudo command to fix the above error. Example:
|
|
Michał Cichoń
Member #11,736
March 2010
|
kronoman said: now, the legal issue is solved, some examples of code on how to link MP3 to A5??
I wrote allegro_mpeg plugin which handle MP1, MP2 and MP3. As far as I know it cover whole Allegro feature set about sound and music. "God starts from scratch too" |
|
kronoman
Member #2,911
November 2002
|
Michał Cichoń said: I wrote allegro_mpeg plugin which handle MP1, MP2 and MP3. As far as I know it cover whole Allegro feature set about sound and music. wow, great! I just did a travel and left my netbook behind, I will try it when I get back to it... this patch should be done a plugin or addon to A5, like those add-ons that add MP3 to Ubuntu i.e, so if the guy is going to make something for in-home use, he can play around with MP3, or if he is in some country where copyright law is meaningless... Bruce Perry said: in #allegro we were wondering where you were here and there, going around doing lots of stuff, I will get to #allegro soon to chat! Thomas Fjellstrom said: they may want money. let them want money, they will need to get me first... not like RIAA, MPAA or something have any jurisdiction here, they can whine all what they want, but they are meaningless here |
|
Bob
Free Market Evangelist
September 2000
|
Can Allegro detect which packages are missing and automagically install them, at least for the common platforms? -- |
|
verthex
Member #11,340
September 2009
|
Bob said: Can Allegro detect which packages are missing and automagically install them, at least for the common platforms? On fedora and redhat its yum install allegro but thats the 4.2.2 version I believe. I wish it was possible to get allegro 5 with it.
|
|
Thomas Fjellstrom
Member #476
June 2000
|
verthex said: And even if it was possible to install it then the codeblocks setup issues would still exist since the two things are unrelated. There would be no setup issues since the distro will install allegro to /usr rather than /usr/local. -- |
|
Karadoc ~~
Member #2,749
September 2002
|
I recently found something really useful... it isn't directly related to allegro, but I'd like to share it here anyway: This guy had put together a useful MinGW bundle which includes most of the stuff one is likely to want to have installed for programming with MinGW. The reason I'm posting it is that it includes the most recent version of MinGW in a form that is much easier to get than from the MinGW homepage; this new MinGW is required for some a5 features. The package also includes a few packages that a5 uses, including libpng and libogg. So I'd recommend that package to anyone who wants to use allegro. ----------- |
|
Myrdos
Member #1,772
December 2001
|
Bob said: Can Allegro detect which packages are missing and automagically install them, at least for the common platforms? I suspect the best way would be to create .deb and .rpm packages. __________________________________________________ |
|
Don Freeman
Member #5,110
October 2004
|
Just some ideas:
Various others, but those are the ones I remember right now...been a long day at work. -- |
|
|
|