PDA

View Full Version : Hello! (New to Pascal where can I start?)



turminator
08-03-2007, 07:48 PM
Hello!

i have one idea of create a gem but, I don't know very much of Delphi. I think...

Is there any package that englobe delphi and all components to do games?

Similar that Gamemaker but wich more functionlly and development.

Thanks for all

And I'm sorry for my bad english.

chronozphere
08-03-2007, 08:21 PM
There are plenty pascal-libraries available. Coding with pascal is harder than using the drag-drop gamemaker interface, but it gives you tons of extra possibilities.
You must ask yourself some questions first:

>> Do you want to use OpenGL or DirectX?
with openGL you can make cross-platform games, and it also tends to be a bit easier to learn. DirectX is harder and windows-only, but is the standard for commercial games. DirectX also includes sound, input and networking modules.

>> Do you want to make 2d or 3d games?
2d games are a lot easier and don't require as much math as 3d games do.

So here are some lib's for ya ;) :

UnDelphiX (2D using Direct3d) (http://turbo.gamedev.net/undelphix.asp)
Asphyre (3d using directX) (http://www.afterwarp.net/)
Necro3d (3d using DirectX) (http://necrodome.homeftp.net/)
pascal-headers for SDL (OpenGL based... not quite sure :? ) (http://sourceforge.net/projects/jedi-sdl/)
GLScene (3d with OpenGL) (http://glscene.sourceforge.net/wikka/HomePage)

You could also start from the scratch by using
Clooties DX headers (http://www.clootie.ru/delphi/download_dx92.html) or you could start learning openGL.
But this is a lot harder and requires much time.

Good luck ;)

WILL
08-03-2007, 10:25 PM
Hi turminator.

Truthfully, if you want to use Pascal or Object Pascal to make a game, you're going to have to learn how to program. There is no way around it.

Good news is that it's easier to learn than most other languages. ;)


Now if you've gotten at least the basics of the Pascal or Object Pascal language(s) down, then the above will be able to help you out making your first few game projects.

For a beginner (who does not have a lot of programming knowledge), I'd recommend either UnDelphiX (only if you have a version of Delphi that supports components), Asphyre, GLScene or JEDI-SDL (supports all the 'big' compilers!) as a starters library. You eventually may want to move away to other ones as you learn more.

Each of these use different API (Application Programming Interface (http://en.wikipedia.org/wiki/API)) for graphics, input (mouse/joysticks) and sound.

The main 3 that are commonly used for graphics are: DirectX (http://en.wikipedia.org/wiki/DirectX), OpenGL (http://en.wikipedia.org/wiki/OpenGL) and SDL (http://en.wikipedia.org/wiki/Simple_DirectMedia_Layer).

For sound there's: DirectX, OpenAL (http://en.wikipedia.org/wiki/OpenAL) (made as a 3rd party compliment to OpenGL) and others like BASS & FMOD (http://en.wikipedia.org/wiki/FMOD).

Here is what they use...

UnDelphiX: (mainly DirectX 9)

2D Graphics -- DirectDraw/Direct3D
3D Graphics -- Direct3D (but weak implimentation)
Input -- DirectInput
Sound -- DirectSound
Networking -- DirectPlay

Asphyre: (mainly DirectX 9)

2D/3D Graphics -- DirectDraw/Direct3D
Input -- DirectInput
Sound -- ???

GLScene:

3D Graphics -- OpenGL
Sound -- BASS/FMOD
Input -- ???

JEDI-SDL: (mainly SDL)

2D Graphics -- sdl
3D Graphics -- OpenGL
Input -- sdl
Sound -- sdl_mixer
Networking -- sdl_net
Video -- smpeg


If I missed any, someone please let me know. :)

turminator
08-03-2007, 10:56 PM
Ok!

Thanks for all information chronozphere.

Now I know that I would do:

- 2D game
- multi across plataform (Using OpenGL)

I see Jedi and it's good. The next trouble is which program you recommend me:

I only know Borland Delphi (but isn't free)

Exists other option?

Thanks a lot!

AthenaOfDelphi
09-03-2007, 12:54 AM
FreePascal (http://www.freepascal.org/) with Lazarus (http://www.lazarus.freepascal.org/) is a viable alternative to Delphi and the environment shouldn't be too different from what you're used to (at least thats how I understand it).

WILL
09-03-2007, 01:49 AM
Yes, Lazarus is a very nice FREE environment for Object Pascal and you'll be able to support most major PC platforms. (and a few others that none of the other compilers will support, GameBoy Advance, Nintendo DS, MacOSX, etc)

But if you are set on Delphi there is Turbo Delphi (http://www.turboexplorer.com/delphi) versions that are still available from CodeGear.

And perhaps to help get you started Nick Hodges has a bunch of Flash Tutorials on his blog site: http://blogs.codegear.com/nickhodges/articles/26687.aspx

cairnswm
09-03-2007, 05:19 AM
The way I make games is to create them in Delphi which has a very nice and user friendly IDE but at the same time ensuring that my code will compile with FreePascal. This allows my games to be cross platform while letting me code in the more user friendly developent environment.

If you are just starting off with game development I would strongly suggest that you do NOT start with just the DirectX or OpenGL header files. I've been making games for over 5 years and I still dont understand the various header files.

Start with a component set that will allow you to make games easily. My suggestins would be UnDelphiX , Asphyre as suggested above or S2DL (http://www.cairnsgames.co.za/files/s2dl.zip)which are similat wrappers for SDL.

masonwheeler
18-05-2009, 01:16 PM
I'm going to have to take the opposite view to the last few posts. Don't even try to work with Lazarus if you value your sanity. Yes, it's "mostly" compatible with Delphi. But it has no support for some of the most useful features, such as Packages (no plugins for you!) and Frames (a very useful way to divide a form up into reusable sub-groups.) Also, the debugger is a real pain to work with.

I was at the Delphi Live conference last week, and they showed off a demo of a working Delphi compiler for OSX. They're working on a cross-platform compilation system for Delphi, and it's making a lot of progress. Lazarus has cross-platform development for years now, but I haven't seen them actually make any progress on rectifying the crippling lack of features that makes it useless for serious development. You need cross-platform and a strong feature set to write cross-platform software, and to be honest, my money's on CodeGear reaching the point where they have both long before the Lazarus people do.

I love open-source software, when it's done right. Sadly, Lazarus is almost a textbook example of how to do it wrong.

Traveler
18-05-2009, 03:05 PM
Mind you the OP's question dates back 2 years. ::)

masonwheeler
19-05-2009, 02:54 PM
Mind you the OP's question dates back 2 years. ::)

Oh wow. I didn't even notice that. I found the post at the top of the page...

Traveler
19-05-2009, 04:08 PM
True, it was a sticky (for reasons unknown to me). I have removed that status now.

asqarmands
21-05-2009, 10:24 AM
Hi I`ve download Opengl but it doesn`t work!! I`m working on FPC 2.0.4 :o
I must reinstall FPC or find new Opengl source?

Traveler
21-05-2009, 12:09 PM
asqarmands, please start a new topic in a more appropriate category. Also you might want to provide a bit more information. Stating that 'it' does not work is obviously not enough.

Thanks,

I'm closing this topic now as the OP is long gone