PDA

View Full Version : need a good 2d library



jorgealdojr
11-08-2010, 02:08 PM
Hello all,

I am trying to write a remake of an old (1990 vintage) game called "Close Combat",

While i am an experienced programmmer, i am having dificulties.

I dont like delphi or lazarus environment (i feel claustrophobic using then) or any kind of RAD tool or paradigm.

So i am stuck...

I tested Andorra 2D and liked it a lot (Very simple and easy to use indeed !) but it needs (or looks like it needs) Lazarus/Delphi to work...

It's there any way to use Andorra 2D from pure FreePascal ? Or any other library that does this ?

Thanks in advance,
J. Aldo

Stoney
11-08-2010, 07:22 PM
You can use Andorra 2D with any text editor and without any RAD tool but it would still need to depend on some Lazarus/Delphi units.
Same applies to other libraries like Phoenix and Asphyre.

Alternatively you could try to use SDL and write your own little library around that.

igel457
12-08-2010, 08:08 AM
With Andorra 2D just have a look at the Non-VCL demo. This one only depends on the "Classes" and "SysUtils" Units, which are always shipped with FPC:
http://andorra.cvs.sourceforge.net/viewvc/andorra/andorra/demos/Simple/SimpleNonVCL/Main.pas?view=markup#l1

All you have to do is to set the "DO_NOT_INCLUDE_STD_FORMATS" and "DO_NOT_INCLUDE_STD_WINDOWMGR" compiler switches or simply set them in the "andorra_conf.inc".

You can use the AdWin32Window Window-Framework-Provider-Unit for DirectX/OpenGL on Windows (as it is done in the demo) or AdGLFW and AdSDL for OpenGL only on Windows/Linux.

Hope that helps you,
Andreas

Stoney
12-08-2010, 10:56 AM
This one only depends on the "Classes" and "SysUtils" Units, which are always shipped with FPC

I didn't know that. I was under general impression that you would need some more units, but I didn't know about those two compiler switches. Seems I going to give this another try.

igel457
12-08-2010, 12:27 PM
I was not completely honest, I think there indeed are some dependencies to "Math", "SyncObjs" and probably "Contnrs" (I'm not sure about that), but theese should also be included with the compiler... ;-)

Edit: Here's the complete dependency chart: http://andorracommons.sourceforge.net/docs/doc/AdDraws.gviz.svg - Units like "Forms" and "Graphics" are only included by the AdVCLFormats and AdComponentWindow Units which are deactivated with the compiler switches above...