PDA

View Full Version : Andorra 2D - The Next Generation 2D Engine



igel457
06-02-2007, 02:04 PM
Hello everybody,

I'm currently working on my own "2D Engine" for Delphi and Lazarus called "Andorra 2D".
Before I started I was using DelphiX/UnDelphiX for a long time. But in my current project "CrashPoint (http://crashpoint.sourceforge.net/)" it was much too slow. So I thought it was time to make a better DelphiX. So one of my goals is to have some compatibility to DelphiX; the sprite engine interface will be (or already is) to 99% the same as in DelphiX, so it is no big thing to port "old" DelphiX games to "Andorra 2D".

The main goal of development is a flexible 2D Engine which will also be able to handle simple 3D elements (like boxes, spheres, unanimated models etc.). On amazing feature is the possibility to load several plugins, wich allow you to use OpenGL and DirectX by simply loading another plugin.

You may find the current version of Andorra 2D in its CVS Repository (http://andorra.cvs.sourceforge.net/andorra/andorra/) on SourceForge (http://sourceforge.net/projects/andorra/).

Also have a look on Andorra's website (http://andorra.sourceforge.net/). There you'll find a complete list of all features, demos and some tutorials (in german).

I hope, you could post some feedback. Do you like the idea?

Things we haven't done yet are written darkred.

dmantione
06-02-2007, 03:03 PM
Why do you use the VCL??

igel457
06-02-2007, 03:15 PM
Why do you use the VCL??
The first thing I wanted to do is really writing it as a non-VCL engine. But then I thought, that it would be easier to port the engine to other platforms and to Lazarus when I use the VCL.
I think that there is no big disadventage by using it (Except the bigger executable, but what are 400kB today).

dmantione
06-02-2007, 05:55 PM
The VCL/LCL gives you a dependency on a GUI toolkit in Lazarus. Also in Delphi/Win32, but less noticeable. That is of course the idea for a GUI application, but for a game it is useless ballast. What is there in the VCL that you cannot otherwise provide cross-platform?

igel457
06-02-2007, 06:09 PM
What is there in the VCL that you cannot otherwise provide cross-platform?
The main thing are bitmap operations. I allready wrote a own, VCL/LCL independent bitmap class. But I think it is easier for the users to give the possibility of loading a TGraphic into my bitmap and use this as a texture. What I could do is providing a unit which is doing those operations. And if you don't like to use the VCL/LCL you just don't use this unit. I hope this compromise is ok. I look what I can do.

I already tried not to use the VCL wherever it is possible.

tanffn
07-02-2007, 08:16 AM
Don’t mean to sound judgmental but how come everyone is writing their own “Next Generation 2D Engine” they all plan to implement “amazing features” but soon enough the development task will become boring an the project will be abandoned..

Why don’t we as a community develop an engine, something that will fit all of our needs. This is something that had been started by Phoenix game engine, but sadly the development seem to be suspended..

igel457
07-02-2007, 08:10 PM
Hello tanffn.

I think that you're completly right. But when I started writing my engine I didn't have a look on other projects. The only engine for Delphi I knew was "PowerDraw" and somehow I didn't like it very much. First a month ago I heard of the "Phoenix" engine in this forum and I thought, that it wasn't bad.

How I already wrote, I started to write this engine for my game CrashPoint. And one of the next steps I do will be to transform this DelphiX application into an Andorra 2D one.

I can't promise, that developing of the enginie isn't going to bore me. But I don't think so. I already worked on my game for more than a year now, and so I think to know what it means to work on such a "big" project.

It would be a great idea to develop the engine as an "big" project in this community. And this is also what I started this thread for. So if anyone wants to develop on this engine or has a great idea, just add your comment.

I'll also study the Phoenix-Thread and I'll see what I can do.

At the end, there's one big thing left to say: I didn't found a 2D engine wich was able to do both: DelphiX and OpenGL. Someone else is currently writing the OpenGL plugin and looks how to port the engine to Lazarus and Kylix.

So, this was all I wanted to say. (I hope, my english isn't too bad, I'm just 15.)

Thank you for your replies,
igel457

tanffn
07-02-2007, 10:03 PM
I'm just 15
:shock: Well done! Your language skills are great (English and Pascal) especially for your age.
How did you start coding, personal interest, someone pushed you into it, is it a subject in school?
My little brother (14) wants to study programming for a while now, as long as he won’t have to study.. :?

Andreaz
12-02-2007, 06:19 PM
Why don’t we as a community develop an engine, something that will fit all of our needs. This is something that had been started by Phoenix game engine, but sadly the development seem to be suspended..
No not really, just a major lack of spare time from my part, there's some bug fixxes and such going on in the silent.

It's far from dead through and it is in a state where it can be used successfully aswell, there's actually one completed game already that just rocks!

igel457
23-07-2007, 02:08 AM
Hi,

I just want to update this thread (nobody should think that this project is dead - the current version of Andorra is 0.2 ALPHA - there will be a beta version of 0.2 in a few weeks - the best thing is to use the current CVS-Version.
Andorra has now an OpenGL Plugin (lights do not work until now), a mighty GUI library, pixel checking sprites, a extended spriteengine with zoom and splitscreen and much more.

http://andorra.sourceforge.net/

Probably someone could test it,
igel457

arthurprs
23-07-2007, 02:44 AM
Really busy today and tomorow but i Favorited the topic to look later

Traveler
23-07-2007, 08:43 AM
Looks great!

igel457
25-07-2007, 01:23 AM
Hi,

thanks for your replies. Currently I'm on vacation, so I can not develop on Andorra 2D.
To version 0.2 BETA a few thing have to be done - especially the documentation has to be updated and a few more components (TAdListBox) have to be written.

Please use the current CVS Version (if you know how to). The ALPHA Version doesn't contain a lot of the features mentioned!

I'm looking forward to your replies,
Andreas

VilleK
25-07-2007, 12:59 PM
This looks like a very interesting project! Highly impressive, especially considering your age.

WILL
25-07-2007, 05:06 PM
Well I'll say this about the library; When you first presented your idea months ago, I thought that it was quite ambitious task you took on. Though I can't say that it's a complete 'replacement' for DelphiX, it certainly is progressing quite well and show a fair bit of promise.

I'm curious if you have looked at the NEW DelphiX yet? Meaning the one that uses hardware acceleration via Direct3D. Jaro has done a suburb job updating it so far.

I do like the fact that you are supporting both Lazarus and OpenGL. Smart moves since both DirectX and Delphi are VERY limited to Windows only.

igel457
28-07-2007, 09:45 PM
You're right, it isn't a complete replacement. And I don't want to do that. I don't want to include an audio engine, a network engine or an input system in Andorra 2D. I think that there are already good things for doing this (look at FMOD or SDL). Although I started to write a small audio engine using OpenAL. But it was just a simple try. There aren't good OpenAL headers for pascal around.
There's also a roadmap for the project: http://andorra.cvs.sourceforge.net/andorra/andorra/roadmap.txt?revision=1.7&view=markup

If you have an idea for Andorra 2D, probably you ever wanted a 2D-Engine to do, just let me know :-) The same if you know something in the 2D-Part of DelphiX that Andorra 2D can't do.

Thanks for your replies,
Andreas

WILL
29-07-2007, 07:54 AM
Well I think that Andorra 2D is off to a fine start. Just keep doing your thing. Not everyone likes the same things so it's nice to have the variety if nothing else. :thumbup:



Although I started to write a small audio engine using OpenAL. But it was just a simple try. There aren't good OpenAL headers for pascal around.

Really? Have you tried the ones by Noeska (http://www.noeska.com/)? I found them to be quite easy to make use of in both Delphi and Lazarus. (or with plain FPC too I suppose)

I'd recommend giving them a try before giving up on OpenAL. I myself found it quite easy to work with, at least on Win32. And I have tested them as working with Delphi 7 and the latest Lazarus versions. Not actually confirmed as tested under Linux or Mac OS X yet though... worthy of a try no? ;)

igel457
06-08-2007, 03:04 AM
Hi,

I released a set of FAQ about Andorra 2D:
http://andorra.sourceforge.net/index.php?section=FAQ

WILL
06-08-2007, 03:14 AM
Not bad. Don't forget to add links so that people can jump right to the information they need. ;)

igel457
07-10-2007, 09:23 AM
Hi,

there's a new version of Andorra 2D out: Andorra 2D 0.2 - ALPHA 2 (http://andorra.sourceforge.net/index.php?section=downloads).

New features since the last version are:
- TAdSpriteEngineEx
- TAdSetup (Setup dialog)
- OpenGL-Plugin
- Viewports
- JPEG can be loaded
- PixelCheck between sprites
- New features in TAdGUI
- Improved editors
- Improved TPerformanceCounter
- New demos
- Removed a lot of bugs

arthurprs
07-10-2007, 02:01 PM
downloading the new version

igel457
24-12-2007, 10:40 AM
A new version of Andorra 2D is out: 0.3 BETA:

Most important changes:


[*] Reimplemented TAdCanvas
[+] Objects can be textured now
[+] The pen width can be variated now
[+] Objects can be united in displaylists
[*] Reimplementation of the bitmap system
[*] Reimplementation of the font system
...and much more...


Download: Version 0.3 BETA, ZIP, 11,7 MB (http://downloads.sourceforge.net/andorra/ad2d_30_BETA_all.zip?use_mirror=osdn)
Download: Version 0.3 BETA, GZ, 11,7 MB (http://downloads.sourceforge.net/andorra/ad2d_30_BETA_all.tar.gz?use_mirror=osdn)



Source compatibility changes from version 0.2 to 0.3:
- A lot of type declarations moved from AdClasses to AdTypes
- Instead of TRect TAdRect is used, instead of TPoint TAdPoint. The Rect function is called TAdRect etc.
- WMF & EMF are not supported anymore
- TAdBitmap moved to the "AdBitmap" unit
- TAdPerformanceCounter moved to the "AdPerformanceCounter" unit
- TAdFontCollection was renamed to "TAdFontList" and moved to the "AdFontList" unit
- TAdFont.TextOutEx is done by modifing typesetter settings (see "SimpleText" demo)
- TAdCanvas.Polyline is missing
- You have to use a "TAdTextureParameters"-record when loading texture from a TAdBitmap


Important: Please note, that this is a beta version. Because I changed many parts of the engine, this version may contain more bugs than Andorra 0.2.

It would be very nice if you could test this release and post me bugs and things I could improve.

Merry christmas,
Andreas

Senap
25-12-2007, 12:09 AM
[+] The pen width can be variated now


Just what I needed :D

Thanks a lot for this release, I have been using Andorra since August and I must say that it's a really fine and easy to use game engine. I am a newbie game programmer and I have been having a lot of fun working with your engine.

igel457
04-01-2008, 02:35 PM
Andorra 2D 0.30 STABLE

Download:
Version 0.30 STABLE (ZIP): 9,43MB (http://downloads.sourceforge.net/andorra/ad2d_30_STABLE_all.zip?use_mirror=osdn)
Version 0.30 STABLE (BZ2): 8,69MB (http://downloads.sourceforge.net/andorra/ad2d_30_STABLE_all.tar.bz2?use_mirror=osdn)

Important changes since 0.30 BETA:

Removed Bug in TAdCanvasQuad.Generate
Rewrote TAdCanvasLine.Generate
Removed TAdCanvas.BlendMode property. Use Pen.BlendMode and Brush.BlendMode instead.
Implemented "TAdPersistent" - a replacement for TPersistent from "Classes".
Removed Bug in TAdFont.Generate
added TAdBitmapBlur
added possibility of creating blured shadows
Removed bug in TAdFont.TextWidth/TAdFont.TextHeight -> Sizes are now calculated correctly.
Improved particle editor interface.
Removed bug in TAdPNGCompressor.Write


Have fun with the new version,
Andreas

igel457
03-03-2008, 07:57 PM
Andorra 2D Version 0.3.5

With this version, Andorra 2D runs officially with Lazarus under Windows and Linux and probably also under MacOS. This goal had been reached by adding so called "Window-Frameworks" to Andorra 2D. They build another abstraction layer and are necessary to create get your Andorra 2D applications running with a lot of different window systems - You do not have to worry about it. Andorra 2D selects the best window framework, that works hand in hand with the graphic plugin you have chosen.

Now it is also possible to create applications without VCL/LCL dependcies. The choice is yours!

Of course there there are a lot of bug fixes in this version. Now you are also able to draw any polygon with the surface canvas.
Andorra 2D got a new API for the playback of video textures. A simple MPEG2-Video decoder which uses libmpeg2 is included.

So what had be done:
- Added "Windowframeworks"
- Added "TAdCanvas.Polygon" Methode
- Added Video Texture API
- Added MPEG2-Video Decoders, which uses libmpeg2

With this version, Andorra 2D made a big step.
What are you waiting for? Obtain the new version of Andorra 2D here:
https://sourceforge.net/project/platformdownload.php?group_id=182128
16 MB, contains all demos, prerequsites and Win32 binaries

Have a lot of fun with this new version, I'm waiting for your feedback,

Andreas

cairnswm
04-03-2008, 05:48 AM
I've had a look at the demos and it looks really nice. I havn't tried to use it yet but am just browsing through the demo code.

I am using Delphi 7

Problems encountered:
1. ReportMemoryLeaksOnShutdown := true; Undeclared Identifier
2. in function TAdDraw.GetDisplayRect: TAdRect;
result := AdBounds(0,0,FParent.ClientWidth,FParent.ClientHei ght);
Sometimes gives an access violation (Started after I ran the program a few times on Full Screen, then went back to 1024x768). Program still runs after this though.

So far looks really nice!

Well done.

igel457
04-03-2008, 08:50 AM
Hi,

thank you for your feedback.

I forgot to remove this "ReportMemoryLeaksOnShutdown"-Thing. It's just for debugging.

But the second thing you've reported is rather strange.
Because TAdDraw.GetDislayRect should look like this:

function TAdDraw.GetDisplayRect: TAdRect;
begin
if dofullscreen in Options then
begin
result := AdBounds(0,0,Display.Width,Display.Height);
end
else
begin
result := AdBounds(0,0,FWnd.ClientWidth,FWnd.ClientHeight);
end;
end;

So there is no "FParent"...

And that is also what stands in my package. Probably you mixed it up with an elder version of Andorra 2D?

Thanks for testing,
Andreas

cairnswm
04-03-2008, 03:54 PM
I have never had an older version of Andorra - this was the first time I've downloaded it.

I'll change mine tothe FWnd version and test again :)

cairnswm
04-03-2008, 04:12 PM
FWnd = Undeclared Indentifier

:(

Sesilla
11-03-2008, 12:31 PM
Hi to all,

i have a question. How to create parallax scrolling with Andorra?

Thanks in advance
Sesilla

igel457
11-03-2008, 12:43 PM
Hi,

the first solution is to use the "TBackgroundSprite"-Class which owns a property "Depth". This property specifies how fast scrolling will be done.

The second solution is to set the position of the background sprites dependent on the position of the camera. This can be achieved by overwriting the "DoMove" procedure of TSprite.

I'll implement Sprite Layers in one of the next versions of Andorra 2D - they'll make it possible to create parallax scrolling with less effort.

Thank you for your question,
Andreas

Sesilla
11-03-2008, 02:33 PM
Any example?

Thanks
Sesilla