PDA

View Full Version : SDL tuts for pascal/lazarus?



Darkhog
04-05-2009, 04:03 PM
Hello there. Has anybody links to pascal sdl tuts? I found some for c++, but there was too hard to translate into pascal. The library/help doesn't help me too.

Traveler
04-05-2009, 04:10 PM
Hi Darkhog,

Welcome to PGD! The library is still a work in progress, we hope to add more links and information in the near future.

As for SDL, have you looked into jedi-sdl (http://sourceforge.net/projects/jedi-sdl/)?

pjpdev
04-05-2009, 04:37 PM
JEDI-SDL's documentation will help a lot. Though there are a few mistakes in it. Especially when it comes to pointer references:

A simple example for the input handling chapter:


var
  event_: TSDL_Event;

procedure ...
begin
  ...
  ...
  while (SDL_PollEvent(^event_)) do
  begin
    ...
  end;
end;


The SDL_PollEvent(^event_) is wrong, it should look like this...


SDL_PollEvent(@event_);


That is important, especially for Lazarus.

WILL
04-05-2009, 09:12 PM
I have a whole series 'Artillery Game Tutorial' that I'm still not finished writing (Don't worry I'll get to it soon enough :)) You can check out the first one in the PGD Library, or go to my blog (http://redantproductions.blogspot.com/) and read the first 2 that have been reposted.

I know it's not too much to go on right now, but it's a start and you can see how to get started with JEDI-SDL at least.

pjpdev
05-05-2009, 04:17 PM
I have a whole series 'Artillery Game Tutorial' that I'm still not finished writing (Don't worry I'll get to it soon enough :)) You can check out the first one in the PGD Library, or go to my blog (http://redantproductions.blogspot.com/) and read the first 2 that have been reposted.

I know it's not too much to go on right now, but it's a start and you can see how to get started with JEDI-SDL at least.


Those tutorials are good. I went through them myself on the old PGD site. It helped me a lot. ;)