PDA

View Full Version : Hadron Game Engine



Hadron Games
01-08-2010, 07:04 PM
Hi folks

Over the months I've been gearing up for the commercial side of my business efforts and the legal entity from which I will conduct my commercial business will be Hadron Games so I've consolidated all existing game related units under this label going forward. Games & GameDev will be under Hadron Games (http://hadrongames.com) and my hosting business will be under the Hadron Hosting (http://hadronhosting.com) label.

The web hosting is a business unit mainly for developers needing a cost effective hosting solution for their projects. I'm currently promoting the hosting business so I will offer a few free accounts. I can do:
yourname.hadrongames.com (free subdomain)
yourname.[ext] (you can register a domain with me or use or own)
Hit me up and we can make arrangements.

PyroGine (from now on known as Hadron Game Engine) has been enhanced so that it should work with any version of 32 bit Delphi as well as Lazarus/FreePascal. The new procedural API (same API format) even makes it possible to work with additional language bindings. C++ bindings are included. Road map includes cross-platform support starting with 2.0. I would like to get some feedback on the Pascal side to make sure different versions of Delphi and Lazarus/FreePascal are covered. It has been tested with Delphi 5 and 2010 and Lazarus v0.9.28.2/FreePascal 2.2.4.

OVERVIEW
Hadron Game Engine‚Ѣ (HGE) an advanced 2D game engine for PC's running Microsoft Windows¬Ć and uses Direct3D¬Ć for hardware accelerated rendering. It's robust, designed for easy use and suitable for making all types of 2D games and other graphic simulations.

HGE has support for use from multiple programming languages and you access the features from a simple and intuitive procedural API to allow you to rapidly and efficiently develop your graphics simulations. There is support for surfaces, textures, sprites, audio, streams, archives, configuration files, render targets, swap chains, databases and much more.

HGE comes standard with language bindings for Pascal (Delphi, Lazarus/FreePascal) and standard C++. For Pascal, simply add HGE.pas to the project uses section and for C++ add HGE.h and HGE.cpp to you project. The bindings will dynamically load and bind to the exported routines from the HGE.dll.

There is also a thin object oriented layer (optimized for each supported language binding) for fast and efficient object management. Features include Actors, Actor Lists, Actor Scene, AI, Entities and Game Management. You can create an actor, drop it on a list it will be updated and rendered automatically for example. There is enough to provide a foundation to build your own higher level object management system from this.


DOWNLOAD
Hadron Game Engine (http://hadrongames.com/downloads/cat,1/)

Thanks for your continued support.

czar
01-08-2010, 07:27 PM
Is there a market for 2d games installed on a PC? Not meaning to be rude but your business plan seems to reply on the fact that there are pascal developers who are wanting to put out 2d games that other people pay for. I would have thought that the flash development would have killed that concept. 2d games would seem to be firmly the domain of webbased tech.

Having recently bought an ipad I would love to create games for it - the best solution that I can see would be ones based on javascript.

Hadron Games
01-08-2010, 08:12 PM
@czar
No worries, I'm open to different and contrasting points of view. Feel free to bring perspective to the table. All of us can benefit from such discussions.

Things have certainly changed in the past 5 years, that is for sure. As much as I love Pascal the hard fact is that most developers will use C/C++ for game development in general. I use Delphi for 99% of all my development, and want to do my part in providing the Pascal community options for game development. Most of the money made from engine sales will most likely be from the C/C++ crowd and that is why I modified things to work "out of the box" for C/C++. Even in the current build the C/C++ bindings are in sync with the Pascal ones. It took a bit of time to get that working (I don't really like C++ honestly, but it's a necessary evil in this case). I just have to get the examples done.

With all of that said, my overall goal will be game development. I made what has become HGE for my own game development needs. If others can benefit then great, it will only enhance the overall robustness of the engine. You can use it free of charge for your freeware projects and will be just a small indie friendly fee for use in commercial projects. The more people using it, the more feedback I get and that can go back into improving and making it more robust. What I get is real-world feedback for the 5011 different PC configurations out there and one of the things that make game development on the PC such a HUGE task. It's a win/win situation. I win because I now have info, feedback and improvements, and you win because you have an ready made engine that you can do your entire project with and/or for prototyping.

Is there a market for 2d games installed on a PC? Sure there is. The other platforms are very important too so HGE will eventually find it's way to them. Apple is being tight-fisted with 3rd party development tools so I have to watch this closely to see how that plays out. But for Linux and MacOS, I plan to be there soon. Once I get the API solid on Windows then I can explore other platforms. By this time a version of Delphi should be released that will make it a lot easier for me to move over the bulk of my existing code. However, a structure rewrite will be necessary since I will have to take advantage of OpenGL for acceleration on those platforms. The original design did not have cross platform in mind so, a rewrite has to be done. This is on the roadmap.

2D is still cool and lots of great things can be done with it on the PC with the right development tools and imagination. Having great tools that gives you power, choice and options is a must and, if I may say so, HGE has a rich feature set giving you lots of great features while not getting too much in the way. It consists mostly of a procedural API with a thin OOP layer on top that you may or may not use, it's up to you. This will give me a great jump start building my game projects, as I now can concentrate on making the game, fixing bugs, and adding features as needed.

If you have some time, check out HGE and let me know if the examples compile and run on your configuration. This will be invaluable to me. Explore the HGE unit and see all that it currently offers. If you hate or like HGE, no worries I'm open to feedback and my goal is to make it better, so feel free to comment one way or the other.

czar
01-08-2010, 08:37 PM
Thanks for your reply. Very interesting to read.
The business I work for produces educational software for our internal learning centres (spread around the world) and we have done so for 14 years using delphi. We are now starting to think about the next decade or so and trying to decide whether our current model is going to last or if we need to start thinking about producing same stuff but then webbased. I think HTML/CSS/JAVASCRIPT has much potential.

I will check out your work more carefully soon. As soon as I clear this current lot of work that I am doing.

Hadron Games
01-08-2010, 09:52 PM
@czar
Thanking you in advance for your support, your feedback is most appreciated.

What I've noticed is that usually half way into the decade or so, a new wave of opportunity starts to emerge. We have to constantly monitor our industry, looking for these waves. If we can then get in and exploit the market as much as possible, before it becomes saturated, we will therefore have enough momentum to "ride it out" into the next decade. So yes, now would be that time to start thinking about such trends and keeping a close eye on new opportunities. Depending on the situation, one can either create new advancements, which will create totally new markets and/or innovate a current market to create new waves of opportunity.

dazappa
01-08-2010, 10:16 PM
@Hadron = Apple is only close-fisted against 3rd party development tools on the iPod/phone.

There is quite a large market for 2d games still, in my opinion. Most of this though is made up in casual games on large portal sites, at least, that's the most visible I've found.

I think I'll fiddle around with this engine some time tonight, but personally I'm really just waiting for SDL 1.3 to be released (because it'll have hardware acceleration without accessing OGL directly), and is already cross platform.

Hadron Games
01-08-2010, 11:09 PM
@Hadron = Apple is only close-fisted against 3rd party development tools on the iPod/phone.
Yes I mean to say for iPod/phone development, sorry.


There is quite a large market for 2d games still, in my opinion.
Agreed.


I think I'll fiddle around with this engine some time tonight,
Sweet, thanks... I appreciate the feedback.


but personally I'm really just waiting for SDL 1.3 to be released (because it'll have hardware acceleration without accessing OGL directly), and is already cross platform.
Oooohhh.... thanks for the info. I will look into SDL 1.3.

DarkBow
02-08-2010, 06:54 AM
Is there a market for 2d games installed on a PC? Not meaning to be rude but your business plan seems to reply on the fact that there are pascal developers who are wanting to put out 2d games that other people pay for. I would have thought that the flash development would have killed that concept. 2d games would seem to be firmly the domain of webbased tech.

Having recently bought an ipad I would love to create games for it - the best solution that I can see would be ones based on javascript.


Some time ago I would have agreed with you, but not anymore. I firmly believe the future in games lies in game streaming solutions like Gaikai (www.gaikai.com (http://www.gaikai.com)) or OnLive (www.onlive.com (http://www.onlive.com)) so you will be able to create your game in whatever language you prefer and forget about this-language-does-not-fit-for-this-platform problems. Granted, there is still a long way for this to be mainstream but still... :)

User137
02-08-2010, 08:04 AM
I don't believe a middle-server will never override some very fast paced games or those that send alot of data. Such as Starcraft 2, World of Warcraft or even Counterstrike.

Colin
02-08-2010, 09:03 AM
Is there a market for 2d games installed on a PC? Not meaning to be rude but your business plan seems to reply on the fact that there are pascal developers who are wanting to put out 2d games that other people pay for. I would have thought that the flash development would have killed that concept. 2d games would seem to be firmly the domain of webbased tech.

Having recently bought an ipad I would love to create games for it - the best solution that I can see would be ones based on javascript.




flash is 100% no way a web tech, more like a web mess, javascript is far too slow to be considered a useful language for 2d game development, with x86 code and a real engine to back it up, you can made massive 2d games, including online mmorpg, which will be far better than any flash or javascript games. (and dont forget the people that do not have the internet, but still would like to buy some cheap fun games to play on their cr*ppy laptops and computers :)


note to Hadron Games Member - your website does not work in Opera (only see menu, nothing else)

-Colin

Hadron Games
02-08-2010, 12:24 PM
@Colin
Yikes, thanks for letting me know about this, I will look into right away.

@Everyone else
Good feedback, keep it coming please. It's great to get ideas and thoughts about the industry out on the table.

Now let me go and investigate the Opera problem.

jdarling
02-08-2010, 01:02 PM
note to Hadron Games Member - your website does not work in Opera (only see menu, nothing else)

-Colin


He is going to need the exact version of Opera your testing it on as I have no issues here. Tried Chrome, FF, Safari, Opera, and IE and all worked great on Win, Lin, and MAC (where appropriate os->browser combination).

- Jeremy

ize
02-08-2010, 01:24 PM
Hi. I haven't had a chance to check this out yet, but i do recall another Engine called HGE (http://hge.relishgames.com/) which was also ported to Delphi a little while back but that was only 2D though.

Hadron Games
02-08-2010, 02:06 PM
@Colin
There seemed to have been a rendering issues with my theme's CSS. I installed the updated theme. Due let me know if you continue to have issues with the version your using.

@jdarling
Thank you very much for checking those browsers for me, good to know and much appreciated. Also thanks again for the additional feedback.

@ize
Phew, yea I've been getting feedback about the name clash. Not sure what I'm gonna do as I got so much tied up and around the name "Hadron Game Engine" which so happens to have the same initials as Haaf's Game Engine. Doh! Thanks to you and everyone else who has pointed this out.

jdarling
02-08-2010, 02:40 PM
@ize
Phew, yea I've been getting feedback about the name clash. Not sure what I'm gonna do as I got so much tied up and around the name "Hadron Game Engine" which so happens to have the same initials as Haaf's Game Engine. Doh! Thanks to you and everyone else how has pointed this out.


Simple and "easy" solution. Write a few editors and toolchains to go with it. Then package as "Hadron Game Development Studio" done. Quick editor that generates basic code framework from basic process flows. Import graphics, sounds, other etc media. "Script editor" and your re-branded to take on the GameMaker community (LOL).

- Jeremy

Hadron Games
02-08-2010, 03:16 PM
@jdarling
Oooohhhhh.... very good idea. Thanks.

jdarling
02-08-2010, 03:51 PM
@jdarling
Oooohhhhh.... very good idea. Thanks.

I have one of those every now and again... Then again, back in my advertising career days, "Creative Solutions" is what we got paid to come up with LOL.

- Jeremy

djcityscapes
02-08-2010, 04:57 PM
Does the HGE have built-in physics and collision engines?

Hadron Games
02-08-2010, 07:03 PM
@jdarling

I have one of those every now and again... Then again, back in my advertising career days, "Creative Solutions" is what we got paid to come up with LOL.
Hmm... maybe I should contract you to be my "Creative Director." ;) Thanks for the feedback and insight. Also, I was checking on the screen shot error you found. The Laz/FP version works as expected on my dev box... sigh... so it's hard to reproduce. What happens when you press the 'S' key is the routine will try and create the ScreenShot folder if it does not exist then save the frame buffer out as a png file. The error msg was related to not being able to access the frame.. hmm... what vid card are you using? Do you get the error in windowed and/or fullscreen mods? Thanks.

@djcityscapes
Thanks for the inquiry... not as yet, however it is on the road-map. I guesstimate around version 0.5 or so (if not sooner) I hope to have a physics solution added. If I get more requests I will add it sooner of course.

The collision systems that is currently implemented are:
Simple, fast and less accurate radial collision system
More complex, but accurate PolyPoint collision system. HGE can auto trace a arbitrarily shaped sprite and generate a accurate polygon outline around it. It will then do a fast line intersection along the line segment to check for collision. It will first do a faster radial collision to check if the sprites are first overlapping the do the more accurate PolyPoint check. The result is an accurate yet fast collision detection system.

Hadron Games
02-08-2010, 07:16 PM
Based on the feedback I've gotten so far (thanks to everyone) here is my current roadmap for HGE:
Continue enhancing documentation and examples.
Add more language bindings.
Add a physics system.
Add a developer IDE that integrates and expands the feature set.
Add cross-platform support.

It's subject to change based on feedback so feel free to comment.

I've also updated the HGE page (http://hadrongames.com/page,hge/).

pstudio
02-08-2010, 08:23 PM
Hmm,

so you've dropped the OOP in HGE and made it entirely procedural. Honestly I'm not sure how I feel about that. ???
I suppose it may have to do with making language bindings more easily?

About the roadmap. My oppinion is that you should focus on making documentation and examples before adding new features. It may not be the most interesting thing to do, but I think HGE will benefit from it in the end.

Hadron Games
02-08-2010, 09:29 PM
@pstudio
The way you access the majority of the API is procedural while the stuff that benefits more from OOP remains OOP. There is a thin OOP layer (THGEObject, THGEObjectList, THGEActor, etc) for object management. Yes, the current changes where needed for making language bindings easier. The HGE.pas and HGE.cpp are currently in sync which was a HUGE and important step. You can access the OOP layer from C++ the same way you do from Object Pascal.

Your existing code changes would consist of:
Changing PG.xxx.xxx to HGE_xxx_xxx
Changing TPGxxx to THGExxx
Only have to include the one HGE unit
No memory management to worry with.
Works with both Ansi and Unicode versions of Delphi

If there are a lot of requests for full OOP like before then the rest of API can still be wrapped. At this point the areas that most benefit from being OOP are already coded/wrapped.

The order of the current roadmap is pretty much the order that I plan to follow which has docs and example at the very top so your concerns should be covered there.

Thanks BTW for posting your concerns and views. Please keep them coming. The more I know the more I can tailor it to be a better product. Thanks to everyone who has dropped in so far. Keep it coming.

paul_nicholls
04-08-2010, 01:10 AM
Hi Jarrod, I've downloaded HGE and will give it a try ASAP :)

cheers,
Paul

Hadron Games
04-08-2010, 03:42 AM
@paul_nicholls
Coolness. Thanks.

Gonna start working on the docs.

paul_nicholls
04-08-2010, 04:48 AM
Hi Jarrod,
I DID notice that in the HGE.pas file, there seems to be quite a few of the flattened classes that have a ..._Create() or I guess equivalent _Open routine which returns the Integer equivalent of that object instance, but don't seem to have an equivalent destroy routine to free them afterwards when you are finished with them.

Would we just use the generic "HGE_Object_Destroy" method on those?

There also seems to be a generic HGE_Stream_Close routine too, I guess this would work on all HGE stream 'classes'?

Unless I am missing something? LOL ;)

cheers,
Paul

Colin
04-08-2010, 10:24 AM
Hi Hadron - website works just fine now, btw i use latest opera with default opera theme.

Hadron Games
04-08-2010, 12:11 PM
@paul_nicholls
You are correct. The whole game engine is OOP on the back end and those returned integer values are actual instantiated classes. Since all classes are derived from a common base class (THGEObject) every instance can be safely destroyed using HGE_Object_Destroy unless otherwise stated. The same with the stream routines, they are polymorphic so all stream routine can be closed with HGE_Stream_Close. I was able to save on the export count by returning an instance on first use for some of the routines. If a routine does not have a _Create export then most likely one of the other routines (_Open, _Alloc, etc) will return a qualified instance on first use.

More work up front but this should allow any modern programming language that supports binding to 32bit DLLs to work safely. One would only have to code the OOP layer (if it supports OOP) in the native language. Since this OOP layer is thin, it should not get in the way of your coding style and you should be able to build on top using it as a foundation. Or, you can completely build your own OOP layer on top of the procedural API. Again, giving you a choice and complete control.

@Colin
Wonderful, glad to know. Thanks for verifying.

paul_nicholls
04-08-2010, 08:37 PM
@paul_nicholls
You are correct. The whole game engine is OOP on the back end and those returned integer values are actual instantiated classes. Since all classes are derived from a common base class (THGEObject) every instance can be safely destroyed using HGE_Object_Destroy unless otherwise stated. The same with the stream routines, they are polymorphic so all stream routine can be closed with HGE_Stream_Close. I was able to save on the export count by returning an instance on first use for some of the routines. If a routine does not have a _Create export then most likely one of the other routines (_Open, _Alloc, etc) will return a qualified instance on first use.

More work up front but this should allow any modern programming language that supports binding to 32bit DLLs to work safely. One would only have to code the OOP layer (if it supports OOP) in the native language. Since this OOP layer is thin, it should not get in the way of your coding style and you should be able to build on top using it as a foundation. Or, you can completely build your own OOP layer on top of the procedural API. Again, giving you a choice and complete control.

@Colin
Wonderful, glad to know. Thanks for verifying.


@Jarrod
Cool, thanks chief :)
BTW, I was able to compile and run the HGE lazarus examples just fine for your information :)
I hadn't tried the Delphi versions yet...

cheers,
Paul

Hadron Games
05-08-2010, 05:07 PM
@paul_nicholls
Thanks. HGE should work fine with D5 (the lowest version I tested with) and up. Any issues let me know asap.

paul_nicholls
06-08-2010, 12:11 AM
@paul_nicholls
Thanks. HGE should work fine with D5 (the lowest version I tested with) and up. Any issues let me know asap.


hmm....I can't get the Delphi version of the TestBed to compile using Delphi 6 Enterprise here at work or at home :(

It is this project I have loaded:


HGE\1.0\examples\pascal\Delphi\pasTestbed.dpr

When I compile, I get an internal fatal error:


[Fatal Error] Internal error: L594

Is this the correct version for Delphi to load, or have I tried the wrong project?

cheers,
Paul

paul_nicholls
06-08-2010, 12:16 AM
Ok, I got it to compile by swapping the first two units in the project Uses clause:


uses
HGE in '..\..\..\bindings\pascal\HGE.pas',
SysUtils,

HGE wasn't the first one :)

As a 'bonus', the demos also run too!! haha :D

cheers,
Paul

Hadron Games
06-08-2010, 03:05 AM
Interesting. I started to get the Internal error in D5 too. I could do a compile but not a build. I will check out the unit swap. I think it has something to do with some of the declarations. I will check on this. Thanks for the confirmation.

Hadron Games
22-08-2010, 01:38 PM
I'm finally able to record in-game video in real-time at a decent frame rate. Here is a quick video I made of the AstroBlaster demo included in the HGE distro:


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

paul_nicholls
22-08-2010, 10:57 PM
Nice, good one Jarrod! :)

cheers,
Paul

Hadron Games
22-08-2010, 11:29 PM
Thanks. A decent PC + decent video card + Fraps does the trick. My old aging dev box just was not able to do it. Sigh. It was 4.5 years old and was time to retired it to the bone yard, haha. More videos are forthcoming.

paul_nicholls
11-10-2010, 10:25 PM
Hi all,
I thought I'd let you know I have now joined forces with Jarrod so I can help him with the development of HGE!

I have a video to share of a new addition to HGE that I have added and should be available in the next version:


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

I have added to HGE the capability to do OpenGL-like graphics now using these routines:


RenderDevice_BeginPrimitive: procedure(aPrimitiveType: Integer; aRenderState: Integer; aTexture: Integer); stdcall;
RenderDevice_Color4f: procedure(r,g,b,a: Single); stdcall;
RenderDevice_Color4ub: procedure(r,g,b,a: Integer); stdcall;
RenderDevice_Texcoord2f: procedure(aX,aY: Single); stdcall;
RenderDevice_Vertex2f: procedure(aX,aY: Single); stdcall;
RenderDevice_EndPrimitive: procedure; stdcall;

It opens up the posibilites for neat effects using HGE :)

I have tested all but the Texturing part, but in theory that should work too ;)

An example bit of code is here which draws 10 triangles with 2 random coloured vertices:


if ExampleIndex = 4 then
begin
RenderDevice_BeginPrimitive(ptTriangleList,rsImage ,0);

for i := 1 to 10 do
begin
RenderDevice_Color4f(Random,Random,Random,Random);
RenderDevice_Vertex2f(Random(w),Random(h));
RenderDevice_Color4f(Random,Random,Random,1);
RenderDevice_Vertex2f(Random(w),Random(h));
RenderDevice_Vertex2f(Random(w),Random(h));
end;

RenderDevice_EndPrimitive;
end


cheers,
Paul

WILL
12-10-2010, 06:10 AM
Hey cool. :)

You know you can post video (YouTube, Google, etc) directly in the forums now right?

Well HGE is really starting to get exciting. How is the documentation and included small demos? That can be something that helps promote the usage of HGE for other developers to use.

paul_nicholls
12-10-2010, 09:00 AM
Hey cool. :)

You know you can post video (YouTube, Google, etc) directly in the forums now right?

Well HGE is really starting to get exciting. How is the documentation and included small demos? That can be something that helps promote the usage of HGE for other developers to use.

1. So how do I put in the video link? I didn't see an insert video bit when doing the post? EDITED: Ok, fixed

2. The documentation and examples for HGE are always being added to and being improved.

PS. if the youtube video is too blury (mutter...mutter...) I can always add back in the direct link to the SWF video...

cheers,
Paul

Hadron Games
12-10-2010, 01:18 PM
Hi,

We understand the concern about docs + example and working on rectifying this situation. Look for more examples in the next build and the docs will continue to be WIP as we move towards a 1.0 release.