PDA

View Full Version : Castle Game Engine 4.0.0 released



michalis
27-01-2013, 08:04 PM
I'm proud to announce a release of Castle Game Engine 4.0.0 (http://castle-engine.sourceforge.net/news.php?id=release-4.0.0), an open-source 3D game engine for FPC/Lazarus.

This release adds a lot of features to make the engine really comfortable for game developers:

We introduce a nice API to make 3D games, with out-of-the-box intelligent creatures, items, levels, nice game data layout and more. Finally it's really easy to make a complete 3D game using our engine.
Everything is also very flexible under the hood, everything can be extended by overriding appropriate methods in classes, new types of creatures/items/other 3D objects can be defined, with specialized behavior.
We have a couple of new examples, in particular examples/fps_game/ (in engine sources) shows how to easily make a fully-working FPS game using our game. It has a lot of comments in the code describing how things work.




http://www.youtube.com/watch?v=S0bA3mJ8lZc

We also add a lot of new documentation in this release:

We have a nice tutorial that introduces basic engine concepts (http://castle-engine.sourceforge.net/tutorial_intro.php).
Classes overview (http://castle-engine.sourceforge.net/tutorial_classes_overview.php).
And a guide to creating data (http://castle-engine.sourceforge.net/creating_data_intro.php) (3D models, XML configuration files etc.).
And, as always, a complete API reference (http://castle-engine.sourceforge.net/apidoc/html/index.html).

I put a lot of work into this documentation, hopefully it will be useful to new developers that want to try our engine :)

You can read the full news announcement here. (http://castle-engine.sourceforge.net/news.php?id=release-4.0.0)

Engine overview, with all the links to downloads and documentation, are here. (http://castle-engine.sourceforge.net/engine.php)

Engine features at a glance:

Reads many 3D model formats, focusing on VRML/X3D standards (so you can make 3D models in pretty much every 3D modeling software), but also supporting Collada and other popular formats.
We use OpenGL for graphics, and we have many eye-candy features (shadows, mirrors, bump mapping, screen effects, shaders etc.).
The engine is basically integrated into Lazarus (you can drop TCastleContol on Lazarus form, and a couple of non-visual controls, on the form), although it can also be used without LCL (we have our own TCastleWindow).
The engine is open-source, license is modified LGPL (same license as FPC RTL and Lazarus LCL), so you can make both open- and closed-source games with it.
More features listed on engine page (http://castle-engine.sourceforge.net/engine.php#section_features).

Have fun! We welcome people that want to use our engine, and/or contribute of course. If you want to make a game using our engine, give it a try!

P.S. I created also a news announcement about this release on the main page of PGD, it's waiting for site admins to pubilsh it :)

Cybermonkey
27-01-2013, 09:11 PM
Now these are really great news. I hope to find the time soon to do a little game with this awesome engine. Thanks a lot, Michalis.

azrael11
28-01-2013, 11:42 AM
Μπράβο Μιχάλη...
Καταπληκτική, τεράστια δουλειά...
Την μηχανή σου την κοιτώ εδώ και κάτι μήνες και έχω μείνει καταενθουσιαμένος...

Συνέχισε την καταπληκτική δουλειά...


Mprvo michali
Congragulations , monster job...
I look your machine about couple months and i must say it is extremly good...

Keep programming...

WILL
30-01-2013, 07:17 AM
Yeah this does look great. So is this a "serious" game project in the works or just a demo for the Castle engine?

I don't think I've seen much in the way of a game with your engine since "The Castle" way back in 2005.

michalis
30-01-2013, 08:27 AM
Yeah this does look great. So is this a "serious" game project in the works or just a demo for the Castle engine?

You mean the game visible in the video, with knights? That's just a demo of the engine (examples/fps_game/ in sources), not a start of a real game.


I don't think I've seen much in the way of a game with your engine since "The Castle" way back in 2005.

Indeed. It's a shame, but I didn't manage to do any real (larger, somewhat finished) game since the old "The Castle". Although "The Castle" got quite a few updates since 2005, like "DOOM E1M1" level and some technological demos (like the "Fountain" level).

I was working a lot on the engine and there was never enough time to make a real finished game. There are some game attemps in engine examples, besides examples/fps_game/ there is also examples/fixed_camera_game/ (video from it on http://www.youtube.com/watch?v=daIrz3ehN_I ) and even simple 2D isometric game (examples/isometric_game/ ). But nothing that can be considered a real game for actual players.


http://www.youtube.com/watch?v=daIrz3ehN_I
I do hope to fix it this year :) Now that I have an engine I can be proud of, a real game using it should be done :)

phibermon
30-01-2013, 06:20 PM
I'm really happy to see a pascal game engine tackling more middle-ware features, a lot of the 'game engines' here are actually graphics engines, sometimes with audio, window management etc often enough extras to be considered engine frameworks.

High level things like scene management, path finding, AI and customizable entity/creature classes are not often represented so you get a big thumbs up from me! :) any commercial game engine comes with such things and indeed, commercial rendering engines are defined by the lack of such components, being designed so companies can drop in a wide range of middle-ware or to integrate into their own engines.

There are more than a few game ports that have switched rendering engines in such a way, an example that sticks in my mind is the game 'Bully' (Canis Canem Edit) which switched it's entire rendering engine for the enhanced PC version in order to take advantage of more modern graphics features.

This example and others like it highlight the fundemental difference between graphics engines and game engines and I believe looking at your feature set you are accurate to call Castle Engine 4.0.0 a game engine.

Keep up the good work!

WILL
31-01-2013, 06:37 AM
Well next competition or "jam" we have you mst participate with a gme or game prototype ;)

PGD got you into making a game engine (it seems) and we're gonna get you back to making games. (where the real fun is at!) lol

...ok game engines and libraries can be fun too, but games themselves are more fun! :P

LP
31-01-2013, 03:30 PM
For people working on their own engines, on GameDev.Net it is common to point to this article: Write Games, Not Engines (http://scientificninja.com/blog/write-games-not-engines).

There are *so* (http://content.gpwiki.org/index.php/Game_Engines) *many* (http://devmaster.net/devdb/engines) *engines* (http://code.google.com/hosting/search?q=3d+engine&btn=Search+Projects) being developed each day, all in 3D and with some cool features, but very few seem to become an actual game and most fade away once the author gets bored.

This project seems rather promising, but when are we going to see actual game coming out of it? This same question would apply to "nxPascal" thread that is currently active.

I'm not trying to discourage you, but I think it will be more productive for the community to have some great 3D games that show off the potential of Pascal, and for you to have a good portfolio of actually finished games, which may even generate some revenue. Developing an engine is a learning experience, but it's counter-productive learning experience, since developing a game implies much more than working on its engine (which, according to Pareto principle (http://en.wikipedia.org/wiki/Pareto_principle) would take only 20% of time and effort than the rest of the game).

The problem is that once the "yet another cool game engine" is finished and you decide to make a game out of it, you may find it unsuitable for that purpose, because characteristics of uber-cool 3D game engine do not correspond to the functional (http://en.wikipedia.org/wiki/Functional_requirements) and/or non-functional (http://en.wikipedia.org/wiki/Non-functional_requirement) requirements of the game spec. This is why, it is highly recommended, to work on actual game rather than engine.

wagenheimer
31-01-2013, 05:04 PM
--- This is why, it is highly recommended, to work on actual game rather than engine.
+1 for this! There is so few successfully pascal games out there! Today we have some very good engines out already which do the job very well covering almost all your needs (ZenGL, Asphyre, PhoenixLib, and others).

I think we have to spend our time creating successfully games using any of these engines, helping improve them even more (there is always some small fixes and improvements to be done) and nothing better than users creating games using these engines reporting bugs and requiring new features (or even creating these features by itself) to improve them even more.

I do have almost 10 successfully games released, and there is a lot more to come. And this was only possible when I stopped trying to create my own engine and started to really creating, and most important, finishing and releasing these games.

I have an suggestion here to PGD, it would be nice to have a page where we could list all the pascal games we can find. Something simple with Game Name, Description, Release Date, Platforms, Screenshots, Game Engine Used and Links for Download.

Sorry my english.

User137
31-01-2013, 07:05 PM
I don't think there are good enough engines out there yet, to say that we have something finished for most needs. We don't hear about those supposed engines being used or maintained even monthly.

And i do think alot about making games. Problem is i can't get the ideas worked out. Maybe cause i'm alone with my ideas? For instance:
Game 1) Huge 2D tilemap with world wrapping sideways, like Terraria clone. Map engine works fine, but i can't figure out the theme that i'd make game of. What characters, what tile graphics? I'm not an artist...

Game 2) Galaxy generated with 10000 stars, planets and random colonies. Sure, i can zoom in where i want in it and it all renders smoothly. Now what? It was supposed to be RTS, but figuring out how that plays out in action is much harder. Can you really manually control over 10 star systems, or even comprehend it visually... rotate camera a bit and you're lost in space. AI would be able to expand no problem, but you could not keep it in same sort of control.

Would you make it an RPG instead then? Random large empires occupying certain territories, player building his small and widening empire, or just explore and upgrade his ship. Would be massive work to make all the content, UI plans and game design. These things annoy me, you might understand ::)

All in all, these 2 are certainly not the only ideas i've experimented with. I'm not satisfied with small games normally so not even trying them. I play many games in my spare time, if i want to make a game, it must top them in some ways. Lets say Half-Life 2 for example. It has good visuals, gameplay and story. But once campaign is complete, it's time to uninstall. That kind of games are easy to top off - make content that will never be the same each playthrough. Maybe it will never actually finish, like MineCraft. Building games in general have much potential, but that genre has only just began.

On some defence for nxPascal, it is enough of an engine already for me to stick to it, and make games with if i'd wish to do so. Edit3D that i'm working on is rather important too. There are no free modelling programs available at the moment, that would fit for real game making. 3DS - yeah right, not starting pirate discussion, rather not make games at all. Blender - whoever designed the controls was propably a lawyer.

LP
31-01-2013, 07:47 PM
I don't think there are good enough engines out there yet, to say that we have something finished for most needs. We don't hear about those supposed engines being used or maintained even monthly.
I'm sure that every single developer, author of such engines, will have reasons of why his/her engine is good enough and why are they doing it, but you are right - each of those engines is only "good" for whoever does them, but being "good" doesn't really mean "useful", even for the original author.

Think of it as if everyone would be trying to create his/her own car engine - we'd have many of these engines, all stuck in each person's garage, but you can't put any of them into any of the existing or newly built cars due to incompatibilities. This would be really sad as all those talented people could have used their talent to create something more useful both for themselves and people around them, rather wasting their time.

A popular YAGNI (http://en.wikipedia.org/wiki/YAGNI) principle states that you shouldn't be working on particular functionality until you actually need it. You can find many other such principles, such as KISS (http://en.wikipedia.org/wiki/KISS_principle), Overengineering (http://en.wikipedia.org/wiki/Overengineering), etc.

Therefore, once you have specific game idea in mind, and maybe even some spec for it, you can narrow down game's requirements, then work and implement them, effectively using minimal effort to achieve highest impact (the last part can be used to define "wisdom", by the way).

Looking at this engine, I see a lot of potential, but I would love to have a game associated with it that you can actually play; until then, it's just a random set of arbitrary functionality, not dissimilar with many others that I've linked earlier.

The real trick is that when you actually try to make a game out of your engine, is when you realize that you have to "adapt" your game ideas very much to the engine you've created, so you have to either redesign/rewrite your engine to fit your new game ideas (which would essentially restart the vicious cycle), abandon your game ideas, or deform them greatly to fit within the engine in such way that it makes the game senseless.

Instead, you can take the article's advice (http://scientificninja.com/blog/write-games-not-engines), and start working on actual game. After you have released one or several games, or their versions, you will start to find reusable patterns that you will eventually isolate, so they will be reused in multiple projects of yours, becoming your base framework (which, again, is not going to be an engine as such). Many of the "engines" Wagenheimer mentioned are exactly such frameworks, and even so they may not necessarily be useful for a particular project. For instance, in my personal experience, I've known GLScene (http://glscene.sourceforge.net/wikka/HomePage) for many years and it has a lot of fantastic solutions, but due to its design/implementation specifics (see my earlier post about functional and non-functional requirements), I could never use any of it in my projects, not even partially.

hwnd
31-01-2013, 10:07 PM
I use nxPascal in my map editor project and without nxPascal i still would search for good and working picking code.
later i have plan to implement a top down game with that. Nothing fancy, but something interesting to have fun with.
Maybe it will be built in into that editor, kinda like preview of map where you can walk around and see how it will look in real game.

phibermon
31-01-2013, 10:45 PM
It's true that writing an engine is a learning experience, I personally develop my engine because I enjoy experimenting with new techniques, I designed it's scope so I could learn about aspects of their design that I was interested in myself. So it's not going to offer everything you need for a game, only a small subset. but enough to decrease the development time of a game. I think that's the best you can hope for unless you've got a big team of people, and I do think it would be better to have one or two really good community contributed engines than all these talented developers, reinventing the wheel independently.

It's difficult to draw devs together in this way because I suppose that many of them also enjoy learning new engine techniques and improving their engines.

But if there's more than two devs that are just trying to create a kick ass engine for people to use, it'd be a shame to duplicate effort.

Cybermonkey
01-02-2013, 01:48 PM
Just to lead discussion back to the Castle Game Engine: is it possible to use Newton Dynamics? Or has anyone tried to use it with this engine?

michalis
04-02-2013, 09:07 PM
First of all, thanks for all the comments!

As for the "write games, not engines" --- of course, I 100% agree. Even though I just announced a release of my engine :) The playable games are where the fun is, and the engine would not be created if I wasn't dreaming about actually using it for a lot of my future games.

I started creating the engine basically because there were no good 3D engines (at the time) that did what I wanted (including using standardized 3D-modeller-agnostic format like VRML/X3D, and being friendly to FPC/Lazarus, and 100% portable and tested on OSes other than Windows, and open-source, ...).

I'm quite confident that my engine has the features that I need, as I was targetting what I will need in my planned games. The old "The Castle" game is also fully ported to new 4.0.0 version, as one way to proove that the engine is 100% ready for making actual games, not just a technological demo. Other demos in engine examples, like the fixed-camera and isometric demos, hopefully show that the engine is modular --- you can use the engine components for other games than just "normal" 3D FPS-like games. And of course I hope it will be useful for others, and of course others are welcome to extend it and contribute :)

I hope to release a game (working title "Three Servants") this year, in fact most of 2013 will hopefully be spent on making this game. The game will be open-source, I hope to get some funds by crowd-funding (on kickstarted or similar pages) for this game and/or development of some engine features. So, I share the desire to actually have a new playable (and great) game showcasing this engine.



Just to lead discussion back to the Castle Game Engine: is it possible to use Newton Dynamics? Or has anyone tried to use it with this engine?

Not yet. Integration with physics is planned, but not yet done (aside from our own collisions and gravity system, but these do not really deserve the name "physics simulation"). I plan to integrate with Bullet (http://bulletphysics.org/) (as it became a very capable physics engine in recent years, with both rigid and soft body, and optional OpenCL, and Android compatibility, an a lot of (large and small) names using it).

Contributions to this are very welcome (for Bullet or other physics engine of your choice, like Newton).

You should be able integrate the Castle Game Engine with any physics engine without modifying our source code --- just pass appropriate objects to physics engine, and apply back the transformations. Care has been taken that all transformations can dynamically change without any loss of speed. For more involved tasks, some integration may be necessary, but as I said: I welcome contributions here :)

In another news: Castle Game Engine 4.0.1 (http://castle-engine.sourceforge.net/engine.php) was just released. This is a minor release that adds some fixes/improvements around font-related units and examples, like the CastleGLWindowsFonts unit.

Cybermonkey
05-02-2013, 03:35 PM
Are there any Pascal headers for Bullet?

michalis
05-02-2013, 03:55 PM
Are there any Pascal headers for Bullet?

Not yet, as far as I know. But creating a basic Pascal header, that wraps what is exposed inside Bullet-C-Api.h, should be trivial. And once you have this, you can translate to Pascal a Bullet demo like BulletDinoDemo. And then you have working Bullet with rigid body :), which you can start to integrate with Castle Game Engine.

(The next step is to extend Bullet-C-Api.h to add there soft body and other stuff, and then translate that to Pascal too. Currently Buller C header doesn't include the full Bullet API (that is only in Bullet C++ object-oriented API), but Bullet developers have stated many times that they welcome contributions there.)