PDA

View Full Version : Castle Game Engine 5.0.0 released



michalis
03-05-2014, 07:08 PM
Hi everyone,

We're proud to announce the release of Castle Game Engine (http://castle-engine.sourceforge.net/engine.php) 5.0.0 :) Castle Game Engine is an open-source (LGPL) 3D and 2D game engine, of course for modern Object Pascal (FreePascal / Lazarus). We support many 3D formats and various graphic effects.

The main new feature of the 5.0.0 release is the support for Android and iOS (iPhone, iPad). Using OpenGLES 2.0 underneath, with most of the normal rendering features working the same as on desktops :) The integration with Android is very comfortable — although the code is compiled in a library (controlled by the main activity) you still have normal message loop. Logging is also integrated with Android. Reading from Android assets (files packed inside Android apk) is immediately available. Multi-touch is fully supported.

Check out also "Darkest Before the Dawn" (http://castle-engine.sourceforge.net/darkest_before_dawn.php), our first game available for Android :) There were many fixes done for Android during development, so if you had trouble running it earlier --- please try again :)

Other new features include comfortable API for 2D rendering --- we have a new TGLImage class to flexibly render images, with corners, scaling etc. The default set of 2D controls is also more themeable now, and in general whole 2D API is much cleaner now. The engine is now quite good for developing 2D games too :) We have also reimplemented our font reading and rendering to use FreeType, which allows us to read ttf font at runtime and render it with anti-aliasing.

The engine page, with all the links, is on http://castle-engine.sourceforge.net/engine.php .


The details about new features are on http://castle-engine.sourceforge.net/news.php?id=2014-05-01
There is also a wiki page documenting Android specifics: https://sourceforge.net/p/castle-engine/wiki/Android%20development/
Likewise, there is a page documenting iOS specifics: https://sourceforge.net/p/castle-engine/wiki/iOS%20Development/
Engine usage tutorial is on http://castle-engine.sourceforge.net/tutorial_intro.php
Engine API reference is on http://castle-engine.sourceforge.net/apidoc/html/index.html


Enjoy :)

Cybermonkey
03-05-2014, 08:47 PM
Great news. I just tried it. I have a problem, though. It's not possible to switch into or start any game in fullscreen on Linux Mint 16 Cinnamon. All examples work fine in windowed mode. I had to change the FPS example to windowed mode for working correctly. Are there any tutorials about the 2D part of the engine?

BTW, wouldn't it be nice to have a sub-forum on PGD for the Castle Game Engine? * hint for Christina;D *

michalis
04-05-2014, 09:11 PM
I have a problem, though. It's not possible to switch into or start any game in fullscreen on Linux Mint 16 Cinnamon. All examples work fine in windowed mode. I had to change the FPS example to windowed mode for working correctly.


Hm, I'll have to look into it. Possibly it's something specific to Cinammon. Fullscreen works fine on Debian and Ubuntu, with Gnome 3, Unity, Mate, Xfce, KDE desktops... If you compile the examples as usual (using provided sh scripts or Lazarus project files) then we use GTK_2 backend, and fullscreen is done using gtk_window_fullscreen procedure, so it should definitely work (many other programs use it too, e.g. Firefox on pressing F11).

In the meantime, you can try compiling for Linux with -dCASTLE_WINDOW_XLIB. It will initialize the window (including fullscreen) using a different backend, based on pure Xlib.



Are there any tutorials about the 2D part of the engine?


http://castle-engine.sourceforge.net/tutorial_player_2d_controls.php contains examples and short overview. It also has links to API docs for the important parts, like TGLImage (http://castle-engine.sourceforge.net/apidoc/html/CastleGLImages.TGLImage.html) class and CastleControls (http://castle-engine.sourceforge.net/apidoc/html/CastleControls.html) unit. The fps_game.lpr source code also contains simple examples. Some other examples also use 2D controls for their UI (TCastleOnScreenMenu is used by examples/terrain/ , some simple ones are also in examples/2d/ and examples/lazarus/model_3d_with_2d_controls/ ).

Please ask if you have any questions, and then we will extend the documentation/tutorial :)

Cybermonkey
05-05-2014, 08:53 AM
Okay, I will try this a.s.a.p. but Firefox fullscreen works, SDL2 fullscreen works, only Castle Game Engine gives me an access violation.
For 2D I am looking for a simple tutorial how to load and display a sprite and moving it on the screen with the keyboard. Is it possible to load a sprite sheet and make an animation out of it with some built-in castle engine functions?

michalis
05-05-2014, 08:27 PM
Okay, I will try this a.s.a.p. but Firefox fullscreen works, SDL2 fullscreen works, only Castle Game Engine gives me an access violation.

Ouh, it's an Access Violation? Then I'll have to try it myself ASAP. Can you try does compiling with -dCASTLE_WINDOW_XLIB helps? Also, what is the version of GTK 2 on Linux Mint 16 Cinnamon?



For 2D I am looking for a simple tutorial how to load and display a sprite and moving it on the screen with the keyboard. Is it possible to load a sprite sheet and make an animation out of it with some built-in castle engine functions?

There is no ready class for this, but you should be able to easily do it yourself :) Use TGLImage.Draw method that takes parameters ImageX, ImageY, ImageWidth, ImageHeight --- saying which part of the image to draw. You can wrap it in your own class to render a specific animation frame.

Cybermonkey
05-05-2014, 09:09 PM
Seems to be GTK 2.24.20-1ubuntu1, the same as on Ubuntu 13.10 I think.
Okay, using -dCASTLE_WINDOW_XLIB works fine.

Rodrigo Robles
10-05-2014, 03:00 AM
Hi everyone,

We're proud to announce the release of Castle Game Engine (http://castle-engine.sourceforge.net/engine.php) 5.0.0 :) Castle Game Engine is an open-source (LGPL) 3D and 2D game engine, of course for modern Object Pascal (FreePascal / Lazarus). We support many 3D formats and various graphic effects.


Man, the engine is pretty impressive! And well-documented too!

Excelent work!

farcodev
05-07-2014, 06:52 PM
Your engine is impressive, keep it up! :D