Recent

Author Topic: Programming games in Pascal - FAQ  (Read 20817 times)

Paul_

  • Full Member
  • ***
  • Posts: 143
Programming games in Pascal - FAQ
« on: December 28, 2017, 08:59:20 pm »
Libraries/Framework - "All what do you need for creating application under OS with OpenGL/DirectX support, loading and drawing graphics, text, playing sounds, videos, timers, networking, game physics etc."
Game engine - "Framework + game loop + texture and sound managers + own tools for 3D modeling, creating scenes, fonts, particle editors.."


Game engines: (Pascal)
Castle Game Engine (OOP) - https://castle-engine.sourceforge.io/
Info: The free open-source 3D and 2D game engine using modern Object Pascal!
Status: under development


NxPascal - https://github.com/Zaflis/nxpascal
Info: nxPascal is a free 3D game engine that tries to remain lightweight and portable.
Status: ?


Mingro - https://sourceforge.net/projects/mingro/
Info: An old-school game engine, much like good old ID and Apogee games as Duke Nukem, Commander Keen and Biomenace,
slightly inspired by Diana Gruber's "Action Arcade Adventure Set". Made with Allegro.pas and programmed in Pascal.
Status: under development


ZenGL (Structured) - http://www.zengl.org/download.html, http://www.zengl.org/forum/
https://code.google.com/archive/p/zengl/
Info: Cross-platform game development library written in Pascal, designed to provide necessary functionality for rendering 2D-graphics,
handling input, sound output, etc.
Status: Project is stopped, but author (Andru) is answering questions on forum



Frameworks:
Allegro - Bindings - http://liballeg.org/ (C)
http://allegro-pas.sourceforge.net/
Info: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows,
accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform.
Status: maintained


Asphyre - http://asphyre.net/products/pxl (Pascal)
Info: Platform eXtended Library (PXL) is a cross-platform framework for developing 2D/3D video games, interactive and scientific applications. It aids the developer with mathematics,
hardware control, resource management, displaying real-time graphics and text, handle user input and network communication capabilities.
Status: under development


BGRABitmap - https://bgrabitmap.github.io/ (Pascal, LCL)
Info: BGRABitmap is a package designed to modify and create images with transparency. Direct pixel access allows fast image processing. The library has been tested on Windows, Ubuntu and Mac.
Status: under development


SDL2 - bindings - https://www.libsdl.org/ (C)
https://github.com/ev1313/Pascal-SDL-2-Headers
https://sourceforge.net/projects/lazsdl2/
Info: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick,
and graphics hardware via OpenGL and Direct3D.
Status: maintained


SFML - bindings - https://www.sfml-dev.org/ (C++)
CSFML-FPC (Structured) - https://github.com/DJMaster/csfml-fpc, https://forum.lazarus.freepascal.org/index.php/topic,33877.0.html
Status: maintained
PasSFML (OOP) - https://github.com/CWBudde/PasSFML, https://forum.lazarus.freepascal.org/index.php/topic,39209.0.html
Info: SFML provides a simple interface to the various components of your PC, to ease the development of games and multimedia applications.
It is composed of five modules: system, window, graphics, audio and network.
Status: maintained


Next engines or frameworks:
Bare game - https://www.baregame.org/#topic_welcome (Lazarus / FPC)
TERRA Engine - https://github.com/Relfos/TERRA-Engine (Object Pascal)
Luna Game Library - http://www.pascalgamedevelopment.com/showthread.php?32560-Luna-Game-Library-Simple-amp-Elegant-Game-Programming (Delphi)

Bigger games with source code:
Knights & Merchants Remake - https://github.com/Kromster80/kam_remake (Full game, Delphi)
Hedgewars - http://www.hedgewars.org/download.html (Full game, FPC)

Pascal related links:
Why use Pascal - http://wiki.freepascal.org/Why_use_Pascal
FPC Wiki - http://wiki.freepascal.org/Game_Engine
PGD - http://www.pascalgamedevelopment.com/forum.php

Universal sources based on gamedev:
Reddit - https://www.reddit.com/r/gamedev/
Gamedev.net - https://www.gamedev.net/
Indiegamer - http://forums.indiegamer.com/
Tig Source - https://forums.tigsource.com/
Stackoverflow - https://stackoverflow.com/


What is the "best"? - It depends what do you prefer.. but some hints:
* What makes sense: SDL2, SFML, Castle Game engine, maybe Allegro
* For inspiration, best from Pascal world was ZenGL - simple structure, structured source code, easy to learn, optimized. Andru made great job here
* You can also learn from all projects like nxPascal, Asphyre ..
* I recommend using frameworks which have big user base in general - SDL2, SFML, Allegro. They are documented, you can read or watch tutorials. They are used also for commercial games like Factorio (Allegro), FTL: Faster Than Light (SDL). Programming a game loop is not such a problem (I will give some example later).
* If you can render output from framework or game engine inside LCL Form it's big plus, because you can create a level editor really fast and use all features, components etc. from LCL
* With BGRABitmap you can make games inside LCL Form, it's quite accessible. On other hand it lacks performance because game loop has no priority. Anyway for simple games it does not matter, also it have OpenGL support etc.
« Last Edit: January 10, 2018, 06:37:10 pm by Paul_ »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Programming games in Pascal - FAQ
« Reply #1 on: December 28, 2017, 09:15:15 pm »

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Programming games in Pascal - FAQ
« Reply #2 on: December 28, 2017, 09:18:46 pm »
BGRABitmap - https://bgrabitmap.github.io/ (Pascal, LCL)
http://allegro-pas.sourceforge.net/
Info: BGRABitmap is a package designed to modify and create images with transparency. Direct pixel access allows fast image processing. The library has been tested on Windows, Ubuntu and Mac.
Status: under development


You have 2 links. Remove the allegro one.
« Last Edit: December 28, 2017, 09:26:13 pm by lainz »

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: Programming games in Pascal - FAQ
« Reply #3 on: December 28, 2017, 10:19:43 pm »
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

turrican

  • Full Member
  • ***
  • Posts: 133
  • Pascal is my life.
    • Homepage
Re: Programming games in Pascal - FAQ
« Reply #4 on: January 09, 2018, 04:33:45 pm »
Libraries/Framework - "All what do you need for creating application under OS with OpenGL/DirectX support, loading and drawing graphics, text, playing sounds, videos, timers, networking, game physics etc."
Game engine - "Framework + game loop + texture and sound managers + with own tools for 3D modeling, creating scenes, fonts, particle editors"


Game engines: (Pascal)
Castle Game Engine (OOP) - https://castle-engine.sourceforge.io/
Info: The free open-source 3D and 2D game engine using modern Object Pascal!
Status: under development


NxPascal - https://github.com/Zaflis/nxpascal
Info: nxPascal is a free 3D game engine that tries to remain lightweight and portable.
Status: ?


Mingro - https://sourceforge.net/projects/mingro/
Info: An old-school game engine, much like good old ID and Apogee games as Duke Nukem, Commander Keen and Biomenace,
slightly inspired by Diana Gruber's "Action Arcade Adventure Set". Made with Allegro.pas and programmed in Pascal.
Status: under development


ZenGL (Structured) - http://www.zengl.org/download.html, http://www.zengl.org/forum/
https://code.google.com/archive/p/zengl/
Info: Cross-platform game development library written in Pascal, designed to provide necessary functionality for rendering 2D-graphics,
handling input, sound output, etc.
Status: Project is stopped, but author (Andru) is answering questions on forum



Frameworks:
Allegro - Bindings - http://liballeg.org/ (C)
http://allegro-pas.sourceforge.net/
Info: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows,
accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform.
Status: maintained


Asphyre - http://asphyre.net/products/pxl (Pascal)
Info: Platform eXtended Library (PXL) is a cross-platform framework for developing 2D/3D video games, interactive and scientific applications. It aids the developer with mathematics,
hardware control, resource management, displaying real-time graphics and text, handle user input and network communication capabilities.
Status: ?


BGRABitmap - https://bgrabitmap.github.io/ (Pascal, LCL)
Info: BGRABitmap is a package designed to modify and create images with transparency. Direct pixel access allows fast image processing. The library has been tested on Windows, Ubuntu and Mac.
Status: under development


SDL2 - bindings - https://www.libsdl.org/ (C)
https://github.com/ev1313/Pascal-SDL-2-Headers
https://sourceforge.net/projects/lazsdl2/
Info: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick,
and graphics hardware via OpenGL and Direct3D.
Status: maintained


SFML - bindings - https://www.sfml-dev.org/ (C++)
CSFML-FPC (Structured) - https://github.com/DJMaster/csfml-fpc, https://forum.lazarus.freepascal.org/index.php/topic,33877.0.html
Status: maintained
PasSFML (OOP) - https://github.com/CWBudde/PasSFML, https://forum.lazarus.freepascal.org/index.php/topic,39209.0.html
Info: SFML provides a simple interface to the various components of your PC, to ease the development of games and multimedia applications.
It is composed of five modules: system, window, graphics, audio and network.
Status: maintained


Pascal related links:
Why use Pascal - http://wiki.freepascal.org/Why_use_Pascal
FPC Wiki - http://wiki.freepascal.org/Game_Engine
PGD - http://www.pascalgamedevelopment.com/forum.php

Universal sources based on gamedev:
Reddit - https://www.reddit.com/r/gamedev/
Gamedev.net - https://www.gamedev.net/
Indiegamer - http://forums.indiegamer.com/
Tig Source - https://forums.tigsource.com/
Stackoverflow - https://stackoverflow.com/


What is the "best"? - It depends what do you prefer.. but some hints:
* What makes sense: SDL2, SFML, Castle Game engine, maybe Allegro
* For inspiration, best from Pascal world was ZenGL - simple structure, structured source code, easy to learn, optimized. Andru made great job here
* You can also learn from all projects like nxPascal, Asphyre ..
* I recommend using frameworks which have big user base in general - SDL2, SFML, Allegro. They are documented, you can read or watch tutorials. They are used also for commercial games like Factorio (Allegro), FTL: Faster Than Light (SDL). Programming a game loop is not such a problem (I will give some example later).
* If you can render output from framework or game engine inside LCL Form it's big plus, because you can create a level editor really fast and use all features, components etc. from LCL
* With BGRABitmap you can make games inside LCL Form, it's quite accessible. On other hand it lacks performance because game loop has no priority. Anyway for simple games it does not matter, also it have OpenGL support etc.

What about : https://github.com/Relfos/TERRA-Engine

Seems outdated but the main engine is working. Can be a good solution at all.

turrican

  • Full Member
  • ***
  • Posts: 133
  • Pascal is my life.
    • Homepage
Re: Programming games in Pascal - FAQ
« Reply #5 on: January 09, 2018, 04:35:38 pm »

Asphyre - http://asphyre.net/products/pxl (Pascal)
Info: Platform eXtended Library (PXL) is a cross-platform framework for developing 2D/3D video games, interactive and scientific applications. It aids the developer with mathematics,
hardware control, resource management, displaying real-time graphics and text, handle user input and network communication capabilities.
Status: ?



Devlopment is active as you can see here http://www.pascalgamedevelopment.com/showthread.php?32632-Platform-eXtended-Library-v1-10-released&p=148641#post148641


Paul_

  • Full Member
  • ***
  • Posts: 143
Re: Programming games in Pascal - FAQ
« Reply #6 on: January 09, 2018, 08:04:37 pm »
Thanks, it's updated.

TERRA-Engine seems complex, but idea of such projects is weird. You spent lot of time with programing own engine with lof of (useless) features and result is 0 projects and 0 users.

Maybe: "Make Games, not Engines" is better motto :)




turrican

  • Full Member
  • ***
  • Posts: 133
  • Pascal is my life.
    • Homepage
Re: Programming games in Pascal - FAQ
« Reply #7 on: January 10, 2018, 10:54:32 am »
Thanks, it's updated.

TERRA-Engine seems complex, but idea of such projects is weird. You spent lot of time with programing own engine with lof of (useless) features and result is 0 projects and 0 users.

Maybe: "Make Games, not Engines" is better motto :)

I'm not sure at all... as I know the engine has developed to develop this commercial game https://play.google.com/store/apps/details?id=com.terra.minimon3d&hl=es

Relfos (The autor of engine) : https://github.com/Relfos

I'm completly sure this is a working engine, not easy one but a very competitive one.

turrican

  • Full Member
  • ***
  • Posts: 133
  • Pascal is my life.
    • Homepage
Re: Programming games in Pascal - FAQ
« Reply #8 on: January 10, 2018, 11:00:58 am »
« Last Edit: January 10, 2018, 11:04:13 am by turrican »

Paul_

  • Full Member
  • ***
  • Posts: 143
Re: Programming games in Pascal - FAQ
« Reply #9 on: January 10, 2018, 06:34:54 pm »
You're right, author created 4 games (https://play.google.com/store/apps/developer?id=Lunar%20Labs%20Studios&hl=es), I was checking only http://minimon3d.com/ (empty) mentioned in the project description.

Such project is perfect for inspiration or learning, no doubt. But competitive? That's question.

If you will use any engine or frameworks it needs something like:
1) Standards in code and usability - well designed, easy to use, optimalization etc.
2) Documentation & samples
3) Community & future

Added, thanks.
« Last Edit: January 10, 2018, 06:37:39 pm by Paul_ »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Programming games in Pascal - FAQ
« Reply #10 on: January 10, 2018, 07:59:02 pm »
a similar page: http://wiki.freepascal.org/Game_Engine
That wiki page seems to need some updating (i.e. Allegro, SDL, GLScene, etc. aren't engines but libraries)

This is mostly a "self note" as I can't do it right now. If nobodyelse updates it in few hours I'll do.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Paul_

  • Full Member
  • ***
  • Posts: 143
Re: Programming games in Pascal - FAQ
« Reply #11 on: January 10, 2018, 09:07:28 pm »
+ lot of dead links, I have plan update it and make structure based +- on first post.

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Programming games in Pascal - FAQ
« Reply #12 on: January 11, 2018, 02:08:07 pm »
I've created a rough draft of Game Development Portal. I hope it helps.
« Last Edit: January 11, 2018, 02:11:54 pm by Ñuño_Martínez »
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Programming games in Pascal - FAQ
« Reply #13 on: March 22, 2018, 12:53:35 pm »
I did some updates to the wiki pages about game development, adding the Game framework page and modifying the Game Engine and the Graphics libraries ones.  Tell me what do you think and don't hesitate to suggest or update them.

There's some issues because the Game development infobox template doesn't seems to be updated in all pages.  %)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Josh

  • Hero Member
  • *****
  • Posts: 1271
Re: Programming games in Pascal - FAQ
« Reply #14 on: March 22, 2018, 01:02:48 pm »
Hi

In game engine DGLE link, goes to various not so nice sites.
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

 

TinyPortal © 2005-2018