Elysion Frameworks: Structural changes

As for now, the different branches of the Elysion Frameworks consisted of just one single unit (e.g. ElysionLegacy.pas), but this is gonna change (or already has changed but is not commited to the SVN repository).
Why is this change necessary?
- I got to the point of nearly having ~150 kB code in one unit. It got a bit difficult to manage to say the least
- I’m in the progess of adding Irrlicht as a backend and found me in desperate need of an abstraction layer. The defines alone just won’t cut it.

elysionunits

Elysion Frameworks = This is just an example for an unit (ElysionKronos, ElysionLegacy, ElysionMobile)
ElysionTypes = Basic types like TelPoint, TelVertex and so on
ElysionInterfaces = Contains abstract interfaces
ElysionMath = Arithmethical functions for basic types, espacially for older Delphi versions (earlier than Delphi 2005), but can also be used to combine TelPoint with TelVertex or an array of TelRGBColor
ElysionClasses = Basic classes like TelObject, TelLogger and so on

The backends can also be combined for example using SDL_mixer with Irrlicht graphics engine or using SDL graphics backend with IrrKlang.

Read More

Irrlicht for (Free)Pascal: Progress

I wasn’t actually thinking I would continue my Irrlicht port since it was kinda just an experiment. But hey, I’ve updated IrrlichtWrapper to Irrlicht 1.6 and got it working on a Mac.

irrpasmacos

I’ve just registered this as a project on sourceforge: http://sourceforge.net/projects/irrlichtpas/
Feel free to check out the source code on SVN.

Btw: I’m in the progress of adding Irrlicht as a backend for the Elysion Frameworks.

Read More

About memory leaks…

There were a few memory leaks in the Elysion Frameworks. Well, “few” is clearly an understatement. Fortunately I found some code from the (old) ElysionSDL library on some backup DVDs and after a couple of days I was finally able to fix all memory leaks in the classes TelSprite and TelTrueTypeFont (and all derived classes like TelButton).

There a few things which are not working as I hoped, for example the VirtualClone procedure just loads the original image file now, because copying from an existing SDL_Surface gives for some reason unknown to me a null pointer.

I marked the Generate procedure as deprecated, it still works now, but in the near future Generate won’t exist any more and that code will most likely be moved to the Draw procedure. The reason is, ElysionKronos doesn’t need Generate and I’m trying to keep the Elysion Frameworks as much compatible to each other as I can.
If you want to try the Elysion Frameworks (it’s still not stable) check out the SVN repository on http://sourceforge.net/projects/elysionsdl/

On another note:
I’ve updated Cavern Defense to the newest ElysionLegacy version and also included a 64-bit Linux build. The Mac OS application is significantly smaller this time. (I inadvertently included debug SDL libraries in the last release.)
The download links have been updated.

Read More

Irrlicht for (Free)Pascal: First preview version

Here is the first preview version of IrrlichtWrapper for Pascal.

You need the Microsoft Visual Studio C++ Redist package, or you can use alternatively the MingW DLLs, but the MingW DLLs don’t have DirectX support. I translated six of the original 78 examples. It’s actually working pretty well, but there are a few issues:
- The wrapper supports only Irrlicht 1.4.2
- The particle system is not working, creates an AV
- Text output isn’t working correctly on Linux
- Mac OS is not supported at the moment (for some unknown reason I cannot create a dynamic IrrlichtWrapper library on Mac OS X)
Download IrrlichtWrapperPas (8,1 MB)

And here is a port of Frank Dodd’s IrrKlangWrapper for Pascal: Download here (1,1 MB)
It just features a few functions at the moment, but works on Windows, Linux and Mac OS X.

Read More

Porting Irrlicht to Object Pascal began…

A lot of people googling for irrlicht, freepascal and delphi have been redirected here lately. (Just because I link to the Irrlicht page in my blogroll.)

Nevertheless porting Irrlicht to FreePascal and Delphi has always been a big dream to me. So I took a few hours and began to port Frank Dodd’s IrrlichtWrapper to FreePascal.
That went pretty well and I got a hello world example up and running.

Here is a screenshot:
Irrlicht Pascal HelloWorld Example

I’ll continue to work on that later as I have a few other projects at the moment.

Read More

GLFW for Object Pascal

GLFW is a platform-independant framework for OpenGL applications written in C and quite similar to SDL. Back in 2007, the latest version (2.6) of GLFW has been released containing a (deprecated) header file for Delphi. Unfortunately, it hasn’t had FreePascal support and only worked with Windows.

A few days back the question has been raised in the Pascal Game Development forum if it is possible to use PhoenixLib or Andorra2D on Mac OS X, both engines can be used with GLFW as a backend. I took the time to add FreePascal support to glfw.pas and ensured crossplatform-compability. I also replaced the old OpenGL header with the latest header from dglOpenGL and modified slightly it to work with GLFW. While I was at it, I updated the glfw.pas header version from API 2.5 to 2.6. It took a bit longer than expected, but after all it was not that much work.

Download here (2,4 MB; contains examples Triangle + Mipmaps with binaries and source)

Patch files here (7 kB; if you already have glfw.pas and dglOpenGL.pas installed on your system and you just want to apply the changes)

I contacted the maintainer(s) of GLFW, I haven’t received an answer yet, but I think if they find it useful it could be part of the next release. I certainly hope so.

Update: As of now, I am the offical maintainer of the Pascal bindings.

Read More