Using C-ish code in FreePascal
Posted by Johannes Stein on Dec 3, 2009 in Development, Miscellaneous | 0 comments
I really like the pascal syntax and I really like C# syntax, so how can I mix those two together? I wrote a parser which can manage that task.
The following snippet looks like a mixture between C#, C++, Objective-C and JavaScript:
namespace testunit;
@interface
using
SysUtils;
type
MyClass : class {
private
fMyString: String;
void addMyself();
public
function addThat(): int;
published
property MyString: String get fMyString;
}
@implementation
void MyClass::addMyself();
{
if (fMyString == "") then
{
fMyString = "This is my string.";
}
else
{
fMyString = "This is my new string.";
}
}
function MyClass::addThat(): int;
{
}
@end
Read More
About memory leaks…
Posted by Johannes Stein on Oct 6, 2009 in Games, Libraries | 0 comments
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.
Cavern Defense Update
Posted by Johannes Stein on Sep 4, 2009 in Games, Linux, Mac OS X, Windows | 0 comments
Here is finally an update for Cavern Defense. This is mainly a bugfix release. All critical bugs have been fixed and it is quite playable now. I updated the instructions screen, so that it should be more clearer how to play the game. For more information on what has changed take a look at the changelog.txt file.
Downlod links:
Windows (6,2 MB)
Linux (4,8 MB)
Mac OS X (12 MB; Universal Binary)
Source (132 kB)
If you want to compile the source, you also have to download one the binary releases and combine those two because the resources folder is not included in the source zip file.
Read MoreGLFW for Object Pascal
Posted by Johannes Stein on Aug 1, 2009 in Development, Libraries, Linux, Mac OS X, Windows | 0 comments
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 MorePlay The City
Posted by Johannes Stein on Jul 24, 2009 in Applications, Development, Games, Linux, Mac OS X, Windows | 0 comments
I would like to share with you guys what I’ve been doing the last few months and why I didn’t participate in a few competitions like Game Jolt Shocking Contest or Mini LD #10.
It all began two months back on May 20th in school when a few volunteers including me were introduced to the idea of a business game. The goal was to develop a business idea within eight weeks with a seed money of only five euros.
Our idea: An educational game about a city. We choose Augsburg (a nice city in Germany), it was an obvious choice, because we all (our team) are studying at the university of Augsburg.
And on top of all, we won this business game. *YEAH*


