PDA

View Full Version : Gah, where do I start?



Serenok
22-02-2010, 11:46 PM
I've been studying pascal in school for a semester and i've made a couple games in the console/ASCII

I've made a game where a computer player chases you
I've made a pong clone (Was easy for me)
I've half-made space invaders (Got the shooting and the enemy)

So a couple of questions,
1) When am I ready to learn a graphics library or whatever you call it? Because the restrictions of the console are really getting to me.
2) Should I be able to make a pac-man clone?
3) What is a popular graphics library?
4) This site confuses, is this the right board to post this on?

paul_nicholls
22-02-2010, 11:53 PM
Hi Serenok, welcome to the forums :)

For graphics, I would recommend SDL (Simple Direct-media Library).

You can get the SDL DLLs (windows), and .so files for linux here:

http://www.libsdl.org/

You can get freepascal/Delphi bindings for this here:

http://sourceforge.net/projects/jedi-sdl/

There are lots of tutorials around on the net, and the Jedi-SDL code comes with demos too :)

With SDL, you can make programs what will work with minimal changes on Win32, Linux, Max OSX, and other platforms (even handheld devices like the gp2x).

I hope this helps :)

cheers,
Paul

Serenok
22-02-2010, 11:55 PM
Hi Serenok, welcome to the forums :)

For graphics, I would recommend SDL (Simple Direct-media Library).

You can get the SDL DLLs (windows), and .so files for linux here:

http://www.libsdl.org/

You can get freepascal/Delphi bindings for this here:

http://sourceforge.net/projects/jedi-sdl/

There are lots of tutorials around on the net, and the Jedi-SDL code comes with demos too :)

With SDL, you can make programs what will work with minimal changes on Win32, Linux, Max OSX, and other platforms (even handheld devices like the gp2x).

I hope this helps :)

cheers,
Paul

Thank you, what a nice reply.
What should I be googling for tutorials on how to use these libraries?

paul_nicholls
23-02-2010, 12:06 AM
Well, they might be in C/C++, but this site seems to have good tutorials (see links on right-hand side).

http://www.sdltutorials.com/

should be easy to convert to Pascal format :)

cheers,
Paul

Serenok
23-02-2010, 12:33 AM
Well, they might be in C/C++, but this site seems to have good tutorials (see links on right-hand side).

http://www.sdltutorials.com/

should be easy to convert to Pascal format :)

cheers,
Paul

That's actually good because I already know some C++ and will be switching over to it in a month or to.
My knowledge of SDL would carry over, right?

paul_nicholls
23-02-2010, 12:45 AM
Your knowledge of SDL will be very handy even after you switch over - SDL still works the same way (or very close) in C/C++ as in Pascal with regards to how you use the routines :)

The only thing that will changes is the names of some of the types of course ;)

PSDL_Surface in pascal and SDL_Surface in C I believe...

cheers,
Paul

Serenok
23-02-2010, 12:58 AM
Your knowledge of SDL will be very handy even after you switch over - SDL still works the same way (or very close) in C/C++ as in Pascal with regards to how you use the routines :)

The only thing that will changes is the names of some of the types of course ;)

PSDL_Surface in pascal and SDL_Surface in C I believe...

cheers,
Paul

Ok, well I downloaded the Jedi-SDL file and opened the demos but when I open the files (in bloodshed dev-pascal) it doesn't compile.
Any tutorials on how to make the games (2d) work?

paul_nicholls
23-02-2010, 01:01 AM
Your knowledge of SDL will be very handy even after you switch over - SDL still works the same way (or very close) in C/C++ as in Pascal with regards to how you use the routines :)

The only thing that will changes is the names of some of the types of course ;)

PSDL_Surface in pascal and SDL_Surface in C I believe...

cheers,
Paul

Ok, well I downloaded the Jedi-SDL file and opened the demos but when I open the files (in bloodshed dev-pascal) it doesn't compile.
Any tutorials on how to make the games (2d) work?


what error(s) did you get?

cheers,
Paul

paul_nicholls
23-02-2010, 01:04 AM
BTW, if you go to the Jedi-SDL forum:

http://www.pascalgamedevelopment.com/forum/index.php?board=23.0

You might be able to find more help there :)

Especially this topic (setup SDL for freepascal/lazarus though, not bloodshed dev-pascal):

http://www.pascalgamedevelopment.com/forum/index.php?topic=3973.0

cheers,
Paul

Serenok
23-02-2010, 01:09 AM
BTW, if you go to the Jedi-SDL forum:

http://www.pascalgamedevelopment.com/forum/index.php?board=23.0

You might be able to find more help there :)

Especially this topic (setup SDL for freepascal/lazarus though, not bloodshed dev-pascal):

http://www.pascalgamedevelopment.com/forum/index.php?topic=3973.0

cheers,
Paul

Oh, well bloodshed dev-pascal is using freepascal it's just the program is bloodshed (if you know what I mean)

KidPaddle
23-02-2010, 07:49 AM
FreePascal comes with her own SDL unit files, there is no need to download jedi - sdl ones. I use them for Win32, Linux, GP2X, GP2XWin and since last week for ARM Linux board IGEPv2.

Regards
Thomas

paul_nicholls
23-02-2010, 09:43 AM
FreePascal comes with her own SDL unit files, there is no need to download jedi - sdl ones. I use them for Win32, Linux, GP2X, GP2XWin and since last week for ARM Linux board IGEPv2.

Regards
Thomas


That's all well and good, but what if he wants to use Delphi instead?

Then he will need jedi-sdl...

cheers,
Paul

KidPaddle
23-02-2010, 11:29 AM
Paul,


Oh, well bloodshed dev-pascal is using freepascal

And those files working with Delphi too, i use Delphi for developing, FreePascal for cross compiling only.

Thomas

paul_nicholls
23-02-2010, 07:35 PM
Paul,


Oh, well bloodshed dev-pascal is using freepascal

And those files working with Delphi too, i use Delphi for developing, FreePascal for cross compiling only.

Thomas


Well THAT'S nice to know, thanks Thomas :)

cheers,
Paul

Serenok
23-02-2010, 09:16 PM
Wait, so I didn't need to DL the files??? (i'm not going to be using delphi)
How can I access them, tutorial please?

I've tried putting "uses sdl" but it's telling me it can't find unit SDL

Here's the software i'm using
http://www.bloodshed.net/devpascal.html

Stoney
24-02-2010, 12:10 AM
You need to install at least FreePascal Compiler version 2.2.2 which is the earliest FPC that ships with SDL.
The FreePascal Compiler included in Dev-Pascal is quite old, version 1.0.6 if I remember correctly.

KidPaddle
24-02-2010, 06:29 AM
That's very old :D

Lastest stable Version is: 2.4.0, download from here: http://www.freepascal.org/download.var

And you have to download SDL 1.2 Libraries from www.libsdl.org. Normally you need
SDL
SDL_Mixer
SDL_ttf
SDL_gfx
SDL_net
SDL_Image

Thomas

NecroDOME
25-02-2010, 05:56 PM
For graphics, I recommend Direct3D (DirectX) if you only want to stick to windows.

Ñuño Martínez
26-02-2010, 01:04 PM
For graphics, I recommend Direct3D (DirectX) if you only want to stick to windows.
I totally disagree. SDL + OpenGL is a better option.

Oh, and Allegro.pas (http://allegro-pas.sourceforge.net) is nice too... ::)

NecroDOME
26-02-2010, 01:10 PM
Before we start a fight on what's better: http://www.gamedev.net/community/forums/topic.asp?topic_id=558843
I never used OpenGL/SDL so I cannot comment on what's better. But for what I heard is that OpenGL 3 Api is not what it should be. Dunno how it's now...
But I can tell DirectX API is very nice to work with.

WILL
28-02-2010, 09:52 AM
Big difference between OpenGL and DirectX/3D is that OpenGL operates as a state machine (http://gpwiki.org/index.php/OpenGL:Tutorials:Theory) where as D3D does not. The rest is compatibility requirements and 2 different standards, which may only be preference.

Though hands down SDL is the easiest to start with graphics, but it lacks the advancement of the other 2. However if you do start with SDL moving on to OpenGL is fairly easier than switching right over to Direct3D. In which case you may have wanted to stick with DirectX in the first place. Problem is that DirectX (even just DirectDraw) isn't as easy to start with as SDL is. My 2 cents...

Ñuño Martínez
01-03-2010, 09:04 AM
Before we start a fight on what's better: http://www.gamedev.net/community/forums/topic.asp?topic_id=558843
I never used OpenGL/SDL so I cannot comment on what's better. But for what I heard is that OpenGL 3 Api is not what it should be. Dunno how it's now...
But I can tell DirectX API is very nice to work with.
Didn't use OpenGL 3, only OpenGL 1 (AFAIK OGL 2 is OGL 1 + Extensions, isn't it?) so I can't compare.

Using DirectX constrains you to use Microsoft prlatforms only while OpenGL is supported by more platforms, including Microsoft ones.

Anyway, interesting link. :)

chronozphere
01-03-2010, 05:56 PM
You can also combine OpenGL with SDL. SDL implements the sound + input + windowing part of your application, while OpenGL provides you with fast HW accellerated graphics. A good combo IMHO. :)