PDA

View Full Version : Quantum Engine



Pyrogine
13-08-2009, 04:22 PM
Hi,

I've been working on the next generation of our game engine to be used for a few upcoming game projects. The core code is normally inside a standard win32 DLL. I've been thinking about the possibility to statically link this into your main exe. After many GPFs, AVs, blue screens and system reboots, I think I got something working. So, now you just include QuantumEngine.pas in your uses section and everything gets linked in nice and neat.

One problem I just discovered this morning (and hopefully fixed) was an issue with DirectInput. I would like to get a little feedback and see if anyone else has any issues. This would help me out a great deal and thanks in advance.

[+]Download (http://quantumeventgames.com/temp/QuantumEngine.zip).
[+]There is a qetestbed.exe you can run right away
[+]There is a qetestbed.dpr you can use to compile the qetestbed project
[+]It should all just work
[+]I should be able to get it working in FreePascal/Lazarus as well.
[br]Thanks.

Andreaz
13-08-2009, 10:13 PM
Getting a virus warning from Nod32: Newheur_PE virus

paul_nicholls
13-08-2009, 11:37 PM
Hi,

I've been working on the next generation of our game engine to be used for a few upcoming game projects. The core code is normally inside a standard win32 DLL. I've been thinking about the possibility to statically link this into your main exe. After many GPFs, AVs, blue screens and system reboots, I think I got something working. So, now you just include QuantumEngine.pas in your uses section and everything gets linked in nice and neat.

One problem I just discovered this morning (and hopefully fixed) was an issue with DirectInput. I would like to get a little feedback and see if anyone else has any issues. This would help me out a great deal and thanks in advance.

[+]Download (http://quantumeventgames.com/temp/QuantumEngine.zip).
[+]There is a qetestbed.exe you can run right away
[+]There is a qetestbed.dpr you can use to compile the qetestbed project
[+]It should all just work
[+]I should be able to get it working in FreePascal/Lazarus as well.
[br]Thanks.




Hi JDS, I downloaded it and unzipped the main archive ok...but when I tried to unzip the media.zip file it wants a password...

cheers,
Paul

Pyrogine
13-08-2009, 11:57 PM
@Andreaz
Ouch! Are you getting it on the zip or the compiled exe? That is very interesting. I do a local scan of all files that go out just to try and make sure that does not happen, heh. I'm currently using the very latest version of Avast. Thanks for the heads up.

@paul_nicholls
The Media.zip file is the resource file used by the examples. You should just be able to run QETestbed.exe and they will open and read what they need. This also showcases the new password protection feature I added. If you want to open the archive manually you can get the password from uCommon.pas

I just uploaded a new build:
[+]Download (http://quantumeventgames.com/temp/QuantumEngine.zip).
[+]Added support for Lazarus (tested with Laz 0.9.26.2/FPC 2.2.2).
[+]Organized the distro folder layout.
[br]Thanks

paul_nicholls
14-08-2009, 01:03 AM
@Andreaz
Ouch! Are you getting it on the zip or the compiled exe? That is very interesting. I do a local scan of all files that go out just to try and make sure that does not happen, heh. I'm currently using the very latest version of Avast. Thanks for the heads up.

@paul_nicholls
The Media.zip file is the resource file used by the examples. You should just be able to run QETestbed.exe and they will open and read what they need. This also showcases the new password protection feature I added. If you want to open the archive manually you can get the password from uCommon.pas

I just uploaded a new build:
[+]Download (http://quantumeventgames.com/temp/QuantumEngine.zip).
[+]Added support for Lazarus (tested with Laz 0.9.26.2/FPC 2.2.2).
[+]Organized the distro folder layout.
[br]Thanks


Ahh...thanks for the info :)

cheers,
Paul

arthurprs
14-08-2009, 01:15 AM
Hi Jarrod,
i use a similar code, but i replaced the binary tree with an array and linear search

reasons:
* the exports pointers are only searched once, the faster search of the binary tree is unnecessary
* you can avoid lot of heap memory allocations
* insertion is faster
* code is much simpler
* if you need searching speed you can sort the array after inserting the exports and use a binary search instead of the linear search

what do you think?

ps: i love to talk about optimizations =P

Pyrogine
14-08-2009, 01:43 AM
@paul_nicholls
No prob. Now there can be at least some level of protection for your assets. Use a long password such as a GUID. The TQEVirtualFile class allows transparent use of files on disk and zip archives. Heh, while I'm on the subject, you can even stream music in real-time from a zip archive. See the streaming example. I was really surprised when this just worked and so far no major issues. So even your streaming music can be protected if you want.

@arthurprs
This sounds wonderful. I would be interesting to see how that code can be optimized. The current dll loader bugs me a little because it feels way too complicated. I wanted to get it at least working (phew, talk about reboot hell) and make sure the engine would still run properly. What you pointed out sounds very good indeed. So yea hit me up and we can talk optimization. Thanks. BTW, I would be interested in a faster way to draw filled and non-filled circles/ellipses. My current code works, but it's a bit slow.

Pyrogine
15-08-2009, 10:28 PM
I'm starting to work on the documentation now. I've made a small sample using the format I plan to use for the 300+ routines and classes that make up the framework (phew, what a task ahead). I would like to get a little feedback to see if the format is adequate.

[+]Download (http://quantumeventgames.com/temp/qedocs.zip) (.chm)
[+]I plan to have .chm version included in the distro
[+]I plan to have an online version accessible from the website
[br]Thanks

Andreaz
16-08-2009, 08:50 AM
@Andreaz
Ouch! Are you getting it on the zip or the compiled exe? That is very interesting. I do a local scan of all files that go out just to try and make sure that does not happen, heh. I'm currently using the very latest version of Avast. Thanks for the heads up.

The strange thing is that i get it on the zip itself, could you try uploading it as rar or 7z?

Pyrogine
16-08-2009, 01:03 PM
@Andreaz
Hmm, I see. Very interesting. Ok you got it, I've now uploaded a .rar version also.

New distro uploaded:

[+]Download (zip (http://quantumeventgames.com/temp/QuantumEngine.zip) | rar (http://quantumeventgames.com/temp/QuantumEngine.rar))
[+]Includes the sample .chm help file. You can view the Object section to see format I plan to use.
[+]Feedback appreciated.
[br]Thanks

Mr. Hania
16-08-2009, 03:14 PM
RAR file still makes NOD32 going crazy:
http://img220.imageshack.us/img220/4706/nodm.jpg

It let me copy everything from RAR except demo (that .exe in "examples\bin").


-edit-
Well, I compiled it under Lazarus and... Yes! NOD32 again starts crying and deletes my .exe ^_^ I have to change that to Kaspersky :/

Colin
16-08-2009, 03:28 PM
Nod32 is a load of crap, and most recently Avast is becoming a load of it aswell... i recommend using a better AV. Avast detected my original delphi 2009 as a virus, as for Nod32 - it is useless, i run a company doing repairs and virus removals, and most of the virus removals run nod32 - that sums it up, not only but is slows down the users computer alot, i would recommend Comodo.

-Colin

Pyrogine
16-08-2009, 04:43 PM
@Mr. Hania
Doh! >:( I don't know. I can assure you that to the best of my knowledge that my dev box and archives are not infected nor do I have any malice code in my products (I have clients using QE to build commercial products and no reported issues of this sort so far). I can only assume it's a false positive. Very interesting.

@Colin
Thanks for the tip. I will look into Comodo. I've been using avast almost two years. I have d2009 too and have not had any issues with it on this dev box. I'm currently using avast 4.8 pro. It constantly updates (seems like daily).

Thanks for the feedback.

arthurprs
18-08-2009, 02:19 PM
Sorry for the delay, too busy. I will keep you informed of my suggestions. ;)

Pyrogine
18-08-2009, 10:05 PM
@arthurprs
No worries. I understand how it goes. Hit me when you can.

Ahhwww man... I just saw this:
http://blog.eurekalog.com/?p=244

This is not good. It says it hits Delphi 4-7. I'm using d2009, but I (we all) need to check our Delphi installations to make sure we're clean. Man! >:(

paul_nicholls
18-08-2009, 10:29 PM
@arthurprs
No worries. I understand how it goes. Hit me when you can.

Ahhwww man... I just saw this:
http://blog.eurekalog.com/?p=244

This is not good. It says it hits Delphi 4-7. I'm using d2009, but I (we all) need to check our Delphi installations to make sure we're clean. Man! >:(





How annoying! at least my Work Delphi seems ok :)

cheers,
Paul

Pyrogine
23-08-2009, 01:29 PM
I now have integrated issue tracking (http://quantumeventgames.com/index.php?action=projects) on the website. Feel free to post bug reports and feature requests.

Thanks.

Pyrogine
24-08-2009, 10:53 PM
Here is how I plan to format the online version (http://quantumeventgames.com/index.php?page=quantum_engine_docs) of the docs.

Pyrogine
27-08-2009, 03:28 AM
New build adds support for displaying CHM files via the following routines:


procedure QE_CHMClose; stdcall;
procedure QE_CHMOpen(aCHMFilename: PAnsiChar); stdcall;
procedure QE_CHMTopicByPage(aCHMFilename, aHTMLPagename: PAnsiChar); stdcall;
procedure QE_CHMTopicByID(aCHMFilename: PAnsiChar; aID: Cardinal); stdcall;

The testbed example as been updated to include a chm test case.

Pyrogine
28-08-2009, 05:18 AM
Okay... rounding out the feature set for version 1.0.0, latest build now include support for an embeddable light-weight compiler with Object Pascal and BASIC compatible syntax.

Some things you are able to do:

[+]Bind to native routines, classes and methods.
[+]Create classes in script and/or extend native classes in script.
[+]Create instances of classes in script and call it's methods.
[+]Call exported dll routines from script.
[+]Use all common calling conventions.
[+]Compile to native x86 code
[+]Much more

[br]In the compiler testcase you see that the scroll demo compiles unmodified (Delphi) and runs very fast. With this latest addition I think I have a pretty robust 2D engine for Windows PC. All the things I've desired to do can now be realized. Thanks to all that give me feedback. The mission continues....

paul_nicholls
28-08-2009, 06:41 AM
Okay... rounding out the feature set for version 1.0.0, latest build now include support for an embeddable light-weight compiler with Object Pascal and BASIC compatible syntax.

Some things you are able to do:

[+]Bind to native routines, classes and methods.
[+]Create classes in script and/or extend native classes in script.
[+]Create instances of classes in script and call it's methods.
[+]Call exported dll routines from script.
[+]Use all common calling conventions.
[+]Compile to native x86 code
[+]Much more

[br]In the compiler testcase you see that the scroll demo compiles unmodified (Delphi) and runs very fast. With this latest addition I think I have a pretty robust 2D engine for Windows PC. All the things I've desired to do can now be realized. Thanks to all that give me feedback. The mission continues....


Wow! Sounds great! :)
cheers,
Paul

Pyrogine
30-09-2009, 01:51 PM
Can someone who is using Vista confirm that the latest build can compile. I have one person that is getting a crash in the unit init section. I don't have Vista. I just need to know if you can compile and run, and can step through the code without a crash. If it crashes which line?

The latest build is here (http://quantumeventgames.com/index.php?action=downloads;sa=downfile&id=2).

Thanks.

Jarrod