View Full Version : Allegro.pas Next Step
Ñuño Martínez
06-05-2010, 01:24 PM
I know there aren't a lot of Allegro.pas (http://allegro-pas.sf.net/) users here ::) but anyway may be you can give me your opinion and suggestions about it. Next text is mostly a copy of the one I did send to the Allegro.pas' mailing-list and forums.
There are some issues about Allegro.pas that makes it hard to evolve. For example: Free Pascal's way to load the OpenGL libraries seems to conflict AllegroGL; and Allegro.pas broke Delphi support in version 4.3 due to technical issues (Delphi doesn't support shared variables with DLL libraries).
Due these issues I was thinking about to make Allegro.pas actually a fork from the original Allegro reimplementing the whole thing directly in Pascal keeping the original idea. There will be some benefits:
No more problems with libraries as it will use them through the FPC/Delphi RTL.
Delphi support granted (hopefully ::) ).
Use only Pascal data types, which means no more pointers, no more wrap procedures/functions, no more INTEGER to represent BOOLEAN, etc. And also easier integration with Delphi and Lazarus.
No need of external dynamic libraries (except the usual ones: OpenGL, OpneAL, zlib, ...).
More platforms potentially available, as DOS, Haiku, PalmOS, etc. May be also some game consoles too (Game Boy, DS, GP32...).
My idea is to create a new branch which will use almost the same API than the current version, and implement it using Free Pascal's RTL library which includes cross-platform units to deal with almost everything. Then use this implementation to create more specific and optimised code for each platform and compiler (i.e. Delphi).
So, what do you think? Will this approach attract more developers to the project? It will be easer to keep it stable and useful? Should I kill the project and use any other?
I hope you'll not suggest the last one. ;)
chronozphere
06-05-2010, 04:03 PM
I think adding delphi support will really matter here. :) I have both Delphi and FPC/Lazarus installed, but I'm more familiar with delphi so I use it for my projects. I think there are quite some others who use only Delphi.
The other features are also quite nice. :)
However, if you really want more people to use it, you should show it off a bit more. I knew about Allergo for some time, but I was never interested because I was writing my own engine/library. If you let us know about its features + some screenshots, more people will actually check it out. :)
arthurprs
06-05-2010, 09:33 PM
Delphi compatibility is a must
Ñuño Martínez
17-05-2010, 02:19 PM
Thanks for the answers, and sorry. I was bussy.
Yes, Delphi is a must. And yes, I should show more things done by Allegro.pas. Actually I have a lot of ideas but I want to do all them at same time, and you can imagine the results. :S
So how goes the next version of Allegro.pas?
Ñuño Martínez
06-10-2010, 11:05 AM
I'd updaded version 4.4.2 on Monday. I didn't say it here because after this summer I have less free time (I don't know why as I didn't changed my routine).
It has new functions to calculate "paths". They're similar than the ones that draws lines, circles, ellipses, etc. but they call a callback function for each point instead. Also I've added "splines", few more examples and some other small changes.
And I've changed the demonstration game a bit. I've simplified the tilemap unit so the drawing function is simpler (actually I don't know why I did it so complicated) and I've made a better interface for the map-editor using some "algui" objects and drawings.
http://allegro-pas.sourceforge.net/images/mapedit.png
Download it from here (http://allegro-pas.sourceforge.net/download).
About the next version, I've decided that version 4.5 will be fully rewritten; actually it should be version 5.0, but I want to use the old API (Allegro developers are designing a new one for 5.0). The idea is to wipe out the shared library and do everything in Pascal (first using the RTL to define the basic drivers, then adding new drivers for DirectX, DOS, Linux, GameBoy, etc), trying to make it compilable in FPC, Delphi and others (GNU/Pascal, may be)
But first I'll try to create some small games to try to attract developers that would help in the new version. And also the new TileStudio (http://www.pascalgamedevelopment.com/showthread.php?5837-TileStudio-for-Lazarus)...
EmbranceII
02-12-2010, 07:03 AM
Will you rewrite some of the docs to match the changes that are done in Pascal verion of Allegro vs the C/C++ one?
code_glitch
02-12-2010, 06:23 PM
How much cross platform compatibility is there? Ie. Can I run it natively on Linux and Mac? Just wondering...
slenkar
02-12-2010, 06:45 PM
DOS and DS support sound good
How are those small game demos coming too btw? It's always nice to have a few examples that you can play around with when starting with a new game library/engine.
Ñuño Martínez
15-12-2010, 12:10 PM
Hi. Sorry for this long time to answer but I was wasting my time in things that finally doesn't be useful (except an HTML5 example I wrote).
Will you rewrite some of the docs to match the changes that are done in Pascal verion of Allegro vs the C/C++ one? I try to keep the documentation up-to-date, and it's slightly different than the original Allegro. Actually there are some procedures, functions and variables that behave a bit different than the original.
For example: in C you do:
if (allegro_init ()) ManageError ("Can't init Allegro");
While in Pascal you do:
IF NOT al_init THEN ManageError ('Can''t init Allegro');
Which is just the opposite. All that is documented.
I know there are some lacks in the documentation, specially it lacks of "See also" links.
How much cross platform compatibility is there? Ie. Can I run it natively on Linux and Mac? Just wondering... Actually I didn't tested it because my G4 dead some years ago, but AFAIK it should work, but you must do some work:
Install Allegro and Free Pascal (obviously ;))
Get Allegro.pas and edit the file albase.pas (http://allegro-pas.svn.sourceforge.net/viewvc/allegro-pas/TRUNK/lib/albase.pas?revision=121&view=markup) adding a new "ALLEGRO_SHARED_LIBRARY_NAME" for MacOS (You'll see I've added a "TODO" note mentioning MacOS X ;)). It should be the name of the dylib file.
Use the "make" file to build the examples and demo game, or compile them using your favourite IDE.
Tell me what happened and the patch so I can add it to the next release.
Note that Allegro itself doesn't work perfectly on MacOS. Also Lazarus has some problems on this platform. So be kind and don't blame me a lot if it doesn't work.
About Linux, it's my platform so it works like a charm. 8)
How are those small game demos coming too btw? It's always nice to have a few examples that you can play around with when starting with a new game library/engine.
Yes, I know, I should do some small game demos... Actually I have two games (one is this one (http://sourceforge.net/projects/koffe/) 8)) but both are too large. I had some small game ideas but I never feel the motivation.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.