<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Pascal Game Development - Blogs - Stoney</title>
		<link>http://www.pascalgamedevelopment.com/blog.php?436-Stoney</link>
		<description>Independent game development with Pascal and Object Pascal language tools.</description>
		<language>en</language>
		<lastBuildDate>Wed, 22 May 2013 16:02:37 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.pascalgamedevelopment.com/images/misc/rss.jpg</url>
			<title>Pascal Game Development - Blogs - Stoney</title>
			<link>http://www.pascalgamedevelopment.com/blog.php?436-Stoney</link>
		</image>
		<item>
			<title>Embarcadero in Action LIVE! in Munich</title>
			<link>http://www.pascalgamedevelopment.com/entry.php?35-Embarcadero-in-Action-LIVE!-in-Munich</link>
			<pubDate>Thu, 10 Feb 2011 00:25:17 GMT</pubDate>
			<description><![CDATA[Yesterday I was at Embarcadero in Action LIVE! in Munich. Well, not exactly in Munich, but near Munich, but that's an another story :) 
I was never...]]></description>
			<content:encoded><![CDATA[<blockquote class="blogcontent restore">Yesterday I was at Embarcadero in Action LIVE! in Munich. Well, not exactly in Munich, but near Munich, but that's an another story :)<br />
I was never at one of Embarcadero events, so this was a whole new experience for me. As I expected I was the youngest one there and probably the only one interested in multimedia and game development. About half of the event was spent on promoting database products.<br />
They showed some of the new features of Delphi XE and C++ Builder XE such as Subversion integration, diff viewer and such. Let's be honest though: SVN is not the most modern version control system any more and for viewing changes there a lot of open-source applications out there such as WinMerge.<br />
They demonstrated RADPHP which impressed me quite a bit that you could web applications very quick and so much Delphi-like.<br />
<br />
There were some news about Delphi XE2, the successor to Delphi XE:<br />
- It's going be released this year, some time around this fall, probably August or September<br />
- 64-bit compiler (yeah for that, although personally I don't care about that one too much)<br />
- Mac cross-compiler, no Mac IDE or linux cross-compiler though<br />
- Something like VCL+ is going to be integrated into the IDE which what formerly KSDev is working on at the moment. It is unclear though if it's just going to be DXScene/VGScene rebranded, if the components will just ship with Delphi or be available for download on their web page or if VCL+ will be compatible to earlier version of Delphi.<br />
<br />
All in all it was a nice event and I'm probably going to a similar event next year. I wish this event in general would showcase more graphical-intensive or games in the future to show what can be all done with Delphi. (Direct2D applications were mentioned in just one sentence.)</blockquote>

]]></content:encoded>
			<dc:creator>Stoney</dc:creator>
			<guid isPermaLink="true">http://www.pascalgamedevelopment.com/entry.php?35-Embarcadero-in-Action-LIVE!-in-Munich</guid>
		</item>
		<item>
			<title>Elysion library</title>
			<link>http://www.pascalgamedevelopment.com/entry.php?23-Elysion-library</link>
			<pubDate>Thu, 11 Nov 2010 19:43:28 GMT</pubDate>
			<description>With all these new game libraries and engines popping up, I finally feel confident enough to promote my own game library with a little more effort....</description>
			<content:encoded><![CDATA[<blockquote class="blogcontent restore">With all these new game libraries and engines popping up, I finally feel confident enough to promote my own game library with a little more effort. So here we go:<br />
<div style="text-align: center;"><img src="http://www.elysion.freeze-dev.com/lib/exe/fetch.php?media=elysionlogo.png" border="0" alt="" /></div>I will open a proper thread in a little while, right now I'm still finishing up a few things for its 3rd official release which will be some day this month. (The first two releases were back in 2005 and 2006 where it was called ElysionSDL. I doubt anyone remembers or used it back then as I never really advertised the library that much. Almost the complete code base has been rebuilt since then.)<br />
<br />
A sample source code for a main menu would look like this:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<pre class="bbcode_code"style="height:372px;">unit uMainMenu;

interface

uses
  ElysionColors,
  ElysionTypes,
  ElysionStage,
  ElysionGraphics,
  ElysionTrueTypeFonts,
  ElysionApplication,
  ElysionGUI,
  ElysionInput;
  // and there are some other units which are not important right now

type
  TMainMenu = class(TelStage) // TelStage might be renamed in the final version
  private
    fBackground: TelSprite;
    fMenu: TelMenu;
    fFont: TelTrueTypeFont;
    fLogo: TelSprite;

    fNewGameClick: Boolean;
  public
    constructor Create; Override;
    destructor Destroy; Override;
	
    procedure Render; Override; // To render any objects from this main menu
    procedure Update(dt: Double); Override; // dt = DeltaTime: Allows time-independent animation/movement
    procedure HandleEvents; Override; // To check for input events like key presses or mouse events
  published
    property Background: TelSprite read fBackground write fBackground;
    property Font: TelTrueTypeFont read fFont write fFont;

    property Logo: TelSprite read fLogo write fLogo;
    property Menu: TelMenu read fMenu write fMenu;

    property NewGameClick: Boolean read fNewGameClick write fNewGameClick;
  end;

implementation

constructor TMainMenu.Create;
begin
  inherited;

  Background := TelSprite.Create;
  Background.LoadFromFile(GetResImgPath + 'background.jpg');

  fFont := TelTrueTypeFont.Create;
  fFont.LoadFromFile(GetStdFont, 14);
  fFont.Color := Color.clWhite;
  fFont.RenderStyle := rtBlended;

  Logo := TelSprite.Create;
  Logo.LoadFromFile(GetResImgPath + 'logo.png');
  Logo.Position.Make((ActiveWindow.Width - Logo.Width) div 2, 16, 0);

  Menu := TelMenu.Create;
  Menu.setButtons(GetResImgPath + 'button.png', GetStdFont, 15, ['New game', 'How to play', 'Credits', 'Settings', 'Quit']);
  Menu.Spacing := 16;
  Menu.Bounds.Make((ActiveWindow.Width - Menu.Width) div 2, Trunc(Logo.Position.Y + Logo.Height + 32));
  Menu.HoverAnimation := true;
  
end;

destructor TMainMenu.Destroy;
begin
  Menu.Destroy;

  inherited;
end;

procedure TMainMenu.Render;
begin
  Background.Draw;

  Logo.Draw;

  GUI.Box(makeRect(Menu.Bounds.X - 8, Menu.Bounds.Y - 8, Menu.Width + 16, Menu.Height), makeCol(0, 0, 0, 128));
  Menu.Draw;

  fFont.TextOut(makeV3f(8, ActiveWindow.Height - 50, 0), 'Some text \n With line break.');
end;

procedure TMainMenu.Update(dt: Double);
begin
  Menu.Update;
end;

procedure TMainMenu.HandleEvents;
begin
  if Menu.OnButtonClick('New game') then
  begin
    GameState := gsGame;
    fNewGameClick := true;
  end;

  if Menu.OnButtonClick('How to play') then GameState := gsInstructions;
  if Menu.OnButtonClick('Credits') then GameState := gsCredits;
  if Menu.OnButtonClick('Settings') then GameState := gsSettings;
  if Menu.OnButtonClick('Quit') or Input.Keyboard.IsKeyHit(Key.Escape) then Application.Quit;
end;

end.</pre>
</div>This source code is taken from the current development version of my <a href="http://www.ludumdare.com/compo/ludum-dare-17/?uid=321" target="_blank">LD17 entry &quot;A Practical Survival Guide for Robots&quot;</a>.<br />
<br />
As you can see the whole library is designed to be as much object-oriented as possible. With the exception of assigning data types (like points, vertices and color) and collision detection pretty much everything is wrapped into classes.<br />
For loading and displaying an image you need at least three lines, first to create an instance of a sprite class, then load an image from file through LoadFromFile(String) and finally call Draw(). The new version also features texture classes and a texture manager. So if load the same image twice, the texture manager thinks: &quot;Oh, alright, so I see you are loading the same image a second time. Well, this would use up more memory if you do that, so I'm returning the instance of the first texture.&quot; (Although if you really want to load the same texture twice you are still able to do so.)<br />
<br />
How would this main menu now be integrated into the game itself. The main source file (main.lpr or main.dpr) just contains the game loop and an instance of a game container class which itself has instances to different game states e.g. the main menu or the game itself.<br />
<br />
<img src="http://images.freeze-dev.com/elysiongame.png" border="0" alt="" /><br />
<br />
<br />
<b>What about 3D graphics?</b><br />
Elysion is primarily designation for 2D application and games (because 2D games are my personal preference) but you are able to integrate Horde3D pretty easily. If you have done some work with Horde3D before you may have noticed that the lack in the 2D department. What Horde3D lacks, Elysion makes up for. Here is a screenshot of a sample application (The Horde3D Knight demo application mixed in with some of Elysion's functions such as sprite rotating, scaling, coloring, alpha, buttons and font rendering):<br />
<br />
<img src="http://images.freeze-dev.com/elysionhorde3d.png" border="0" alt="" /><br />
<br />
<br />
<b>Some technical features</b><br />
Graphical renderer: SDL + OpenGL<br />
Image loading: Handled internally by Vampyre Imaging by default, can be switched to SDL_image<br />
Audio: SDL_mixer<br />
Font rendering: True type fonts with SDL_ttf or optionally bitmap fonts through SFont<br />
Scripting: <a href="http://wiki.sotecware.net/index.php/Thorium_Scripting_Language" target="_blank">Thorium</a> (I'm having a bit of trouble with this right now, so that will be disabled in the next official release)<br />
<br />
<br />
I guess that's it for now. Thank for reading and let me know what you think even if you think there are already enough game engines out there. ;)</blockquote>

]]></content:encoded>
			<dc:creator>Stoney</dc:creator>
			<guid isPermaLink="true">http://www.pascalgamedevelopment.com/entry.php?23-Elysion-library</guid>
		</item>
		<item>
			<title>Rapid Game Prototyping with Lazarus</title>
			<link>http://www.pascalgamedevelopment.com/entry.php?18-Rapid-Game-Prototyping-with-Lazarus</link>
			<pubDate>Thu, 28 Oct 2010 02:19:17 GMT</pubDate>
			<description>Last week-end I was in Ulm at a meet-up for Lazarus and FreePascal developers at which I held a talk about game development and rapid game...</description>
			<content:encoded><![CDATA[<blockquote class="blogcontent restore">Last week-end I was in Ulm at a meet-up for Lazarus and FreePascal developers at which I held a talk about game development and rapid game prototyping.<br />
<br />
The talk is in german, but I added english subtitles.<br />

<iframe class="restrain" title="YouTube video player" width="640" height="390" src="//www.youtube.com/embed/DdzgfKkxrFM?wmode=opaque" frameborder="0"></iframe>
<br />
If you set the video quality to 720p and fullscreen, you can even see the code (most of the time). Its length was originally 35 minutes, but I had to cut it down to 15 minutes.<br />
<br />
I hope you can still enjoy the video, even if the video and audio quality might not be the best. (First time I really used this camera.)</blockquote>

]]></content:encoded>
			<dc:creator>Stoney</dc:creator>
			<guid isPermaLink="true">http://www.pascalgamedevelopment.com/entry.php?18-Rapid-Game-Prototyping-with-Lazarus</guid>
		</item>
		<item>
			<title>Devmania and a Pascal game</title>
			<link>http://www.pascalgamedevelopment.com/entry.php?11-Devmania-and-a-Pascal-game</link>
			<pubDate>Sun, 03 Oct 2010 23:52:33 GMT</pubDate>
			<description>So, me and some teammates of mine from Incognita Studios (http://www.incognita-studios.com/) were at the Devmania in Mainz, Germany this week-end....</description>
			<content:encoded><![CDATA[<blockquote class="blogcontent restore">So, me and some teammates of mine from <a href="http://www.incognita-studios.com/" target="_blank">Incognita Studios</a> were at the Devmania in Mainz, Germany this week-end.<br />
What is Devmania you might ask? It is a get-together for german independent game developers which lasted about 24 hours beginning Saturday 2 pm local time. Besides having project presentations and talks they organisators were also hosting an overnight contest in which an entry had to incorporate the theme moonlight. We had about 18 hours to complete a game. We started with Processing.js, a Java-like language based on Javascript HTML5 Canvas where you use classes and inheritance with your keywords like <b>class</b> and <b>extends</b>. But wait, this is supposed to be about Pascal, right? Allright, to speed up things up a little, the syntax and style of Processing.js is great, the debugging not so great to say the least. So the more stuff we kept adding to our game the slower it began to perform with bounding box collision finally being the death sentence to the performance. Even the latest WebKit JavaScript engine showed some serious lags.<br />
With now 12 hours spent on debugging... pardon developing with Processing.js (don't get me wrong: I still like Processing and Processing.js), the results were not quite what we expected to see and only about six hours left on the clock we were faced with a difficult choice: Give up? <i>Never.</i> So we redid the whole game with FreePascal and Lazarus using my game framework I've been working on nearly half a decade and which I've been using for school projects and especially my Ludum Dare entries. The game is functional and has most of the features we wanted in the game, but it still suffers from a few bugs and is in need of polishing and balancing, but basically what we did in just six hours is pretty cool.<br />
<br />
You have two zombies and two sperate screens of the game. You need the lead the way for the zombies who only react to moonlight which is evidently on your cursor. You can switch between two modes: Either use one light cone to move only one zombie around and leave the other one completely unprotected or use two light cones to control both zombies at the same time.<br />
But be careful along your way to reach the castles: There are traps, fireballs and even the castles are hostile to you and are shooting arrows in your direction.<br />
<br />
Here is a screenshot of the game:<br />
<img src="http://www.images.freeze-dev.com/overknight.png" border="0" alt="" /><br />
<br />
Graphics by Artur Sch?štz (the zombies are even animated :) ), Coding by Jesse Klugmann and me<br />
<br />
<br />
Thanks for reading my first blog post on PGD. Leave a comment if you liked it and there may be more coming in that case.</blockquote>

]]></content:encoded>
			<dc:creator>Stoney</dc:creator>
			<guid isPermaLink="true">http://www.pascalgamedevelopment.com/entry.php?11-Devmania-and-a-Pascal-game</guid>
		</item>
	</channel>
</rss>
