PDA

View Full Version : GameVision SDK 2007



Pyrogine
21-01-2007, 04:30 AM
The next version of GVSDK will now be known as GameVision SDK 2007. A new feature planned for this release will include GVScript. It can be embedded within your application to add scripting support or can be used standalone.

[Features]
* Object Pascal/Delphi language syntax subset with C/C++ & Basic to be added later.
* Full support for OOP
* Compiles to native x86 machine code
* Can be embedded within your application or compile to standalone EXE
* Will support DLMs (dynamic loadable modules). You can compile a unit and save it to disk or a stream and then later load it back into memory and it will execute.
* DLMs can be written in any of the supported languages and then be used by any supported language. For example, you can create a unit in Pascal and then use it from C/C++ or Basic.
* The GVC compiler supports a simple project file format. When a unit is referenced during compilation, it will be loaded in only once and compiled. This allows you to only need one main project source file.
* Many more features planned.

[GVC Test]
As a proof-of-concept, I put together a small demo that does smooth 4 ways scrolling with parallaxing:
* Unzip the archive and then click on the compile.bat file. It will invoke the compiler and compile scroll.pas to the stand-alone scroll.exe file.
* You can then click on this file and it will then run. You can pick a folder on your computer with music files and it should then start to play them in the background.
* You can use the arrow keys to fly around the screen.
* The project.ini file allows you to configure project options. You can make the demo run in fullscreen by setting this option in the scroll.ini.

There will be an API layer that will allow you to use GVSDK using your preferred compiler. The advanced features of GVSDK will be available via GVScript such as actors, entities, AI and OOP. You will be able to bind native routines to GVScript from any supported compiler, but binding your own native classes will only be available from Delphi at the present time. The graphics and application framework portion of GVSDK2007 is pretty stable at this point. The compiler part is currently work-in-progress and there is still much work left to do. If you play around with changing the source in scroll.pas things may crash or not work as expected, just let me know if you find a problem. I would appreciate a little feedback to see if it compiles and runs on different configurations. Thanks in advance. You can download the test here:
GVC Test (http://www.softbeat.net/index.php?component/option,com_docman/task,doc_download/gid,1/Itemid,45/)

Thanks

technomage
21-01-2007, 08:48 AM
Worked fine on Pentium 2.66 with 512M of ram. It ran at about 40 fps. I will try it on my other machine which is a bit more powerful and see if I get higher frame rates.

nice work :D

Galfar
21-01-2007, 10:45 AM
Runs fine on AthlonXP 1900 + GeForce6600, about 90 FPS.

NecroDOME
21-01-2007, 11:27 AM
Runs @ 74 FPS. AMD 64, GeForce 6800 * 2 (SLI)

Pyrogine
21-01-2007, 01:06 PM
Thanks very much. Good to know it working on other configs. If you find any problems, have suggestions and/or comments, let me know.

JSoftware
21-01-2007, 03:11 PM
Neat! I love the consistency in the script language. It looks very polished and like there's alot of work gone into it

Ran with 74 fps on Athlon 2500+, radeon 9600pro

chronozphere
21-01-2007, 04:27 PM
Just tried it on a crappy PIII with W98 and it didn't work :(

Kernel.dll: AttachConsole was missing.

It's obvious that its not a bug in your app but a missing feature in the W98 kernel. It's very old so dont bother. :)

Pyrogine
21-01-2007, 04:39 PM
JSoftware:
Thanks. A large subset of Object Pascal/Delphi is implemented so it should feel right at home. What is nice too is that in script, you will be able to do:

type

TMyActor = class(TGVActor)
procedure OnUpdate(aElapsedTime: Single); override;
procedure OnRender; override;
end;

procedure TMyActor.OnUpdate(aElapsedTime: Single);
begin
end;

procedure TMyActorOnRender;
begin
end;


Now, TMyActor can be used anywhere a TGVActor can be used. A TGVActor is the base object from which all high level objects that exist in the game world are derived from.

chronozphere:
Thanks for trying this. The target OS will be win2k and up, but the more configurations it's tested on, the more polished I can make it so thanks.

Pyrogine
21-01-2007, 04:47 PM
technomage:

What type of video card are you using in your Pentium 2.66?

My devbox config:
Celeron 2.93 + GeForce FX 5200 + WinXP Pro SP2

I'm getting 60 FPS

bigsofty
21-01-2007, 05:50 PM
Athlon 64x2 3800+, 667DDRII, NVidia 6800...

60 FPS Windowed, 1058 FPS full

Pyrogine
21-01-2007, 06:31 PM
bigsofty:

Impressive framerate in fullscreen. Let me ask, in fullscreen on your machine the simulation runs smooth and consistent correct? GVSDK is designed around frame-based timing which allows the game loop (rendering and game logic) to run as fast as your computer can do it, but the overall simulation should continue to run at a known rate, in the case of the demo will be 35 fps. If the simuation speed goes below/above the desired rate the elapsed time value will be updated to keep the objects moving at a consistent rate. If the simulation rate goes beyond a specified threshold, then elapsed time will max to ONE. This will prevent HUGE jumps in motion if there a large delay between the next frame. The fps display is the overall game loop rate. Do you have vsync turned off?

Well guys I want to again say thanks for your feedback and continued support. This is great as it gives me an opportunity to get some real-world feedback which helps in making a better product.

bigsofty
21-01-2007, 07:05 PM
Yes, my vsync was off, the simulation has slight graphical problems, the ship would not stay in the middle of the screen for example. But the game stayed smooth and tried retain its target speed.

bigsofty
21-01-2007, 07:35 PM
P.S. as a small (or large) request, simple thread support for scripting (locking, read only global vars) is something... no one seems to be supporting Multi-core (Yes I know I can do it in Delphi)... even though, its obviously the way of the future.

Pyrogine
21-01-2007, 07:50 PM
bigsofty:

The ship should eventually come to rest. I need to check for a certain threshold value and if its at this value, set the speed to zero.

Thread support, noted. thanks for the suggestion.

Jarrod

AthenaOfDelphi
21-01-2007, 08:43 PM
Just tried it on a crappy PIII with W98 and it didn't work :(

Kernel.dll: AttachConsole was missing.

It's obvious that its not a bug in your app but a missing feature in the W98 kernel. It's very old so dont bother. :)

Nothing to do with Win98 because I get the same thing with Windows 2000 Server :-(

Pyrogine
21-01-2007, 09:22 PM
AthenaOfDelphi:

Thanks for the test. It looks like AttachConsole is only available on:
Client OS: Windows Vista or Windows XP
Server OS: Windows Server "Longhorn" or Windows Server 2003

according to MSDN: http://msdn2.microsoft.com/en-us/library/ms681952.aspx

I have a simple console class called TGVConsoleWindow that I am using to control the console window. It will try to allocate a console at startup. If that fails this means that you are already running in a console window so it will try to attach to the current one. I assume this is what the normal actions would be for a normal console app. When you run a delphi console app from the command prompt it uses the same window rather than creating a new one. Anybody know more about using the win32 console routines?

Pyrogine
21-01-2007, 10:02 PM
chronozphere, AthenaOfDelphi:

If you create a delphi consol app and run it from a dos box, it will use the dos box window already open correct?

if yes, then this is what AttachConsole does. Does any know of any links or any code that will allow me to emulate the AttachConsole function?

VilleK
23-01-2007, 07:04 PM
Very cool with an actual Pascal x86 compiler!
Have you used any compiler-generator tools, or is it written from scratch?
How large subset of Delphi language features are you planning to implement?

Pyrogine
24-01-2007, 12:58 PM
VilleK:

Thanks. It's written from scratch. A fairly large subset. The standard stuff, oop and more. Eventually C/C++ and Basic.

Pyrogine
05-02-2007, 01:35 PM
I finally got a new working build. Phew. I almost went nuts trying to track down one very illusive bug. Ok here is what Ive got:

1. You download the build here: http://www.softbeat.net/temp/gvsdk2007.zip

2. The compiler can work stand alone or within and editor/IDE such as PSPad ( http://www.pspad.com ). I have been using PSPad to test with and you will find a project file in the archive for this editor. See PROJECT.PPR

3. The compiler uses a simple .INI project file. See PROJECT.INI for details.

4. To make things work from within the editor/IDE, the compiler needs to be called from a batch file. See GVC.BAT and COMPILE.BAT. You should not touch GVC.BAT, but compile.bat is an example of how you setup your batch file for your own project.

5. When you run COMPILE.BAT it will compile the project and if there are any compiler/runtime errors they will be written to a log file and displayed in the console window. If you compile from the editor/IDE you can click on an error line in the log window and it will jump to this line in the editor.

6. GVAPI.PAS is the import unit for the exported API routines and GVSCLASSES.PAS shows all the declarations available from compiled script.

7. See TESTBED.DPR for an example of how to use the API to compile and run a script.

8. It should now run on those OSes that reported a problem. Please let me if you still have problems.

Hopefully by the next build things will be more organized and streamlined to start to include some docs and more examples. There are just so many things in flux at the moment. Since last time there has been such a major effort to get the project to a good and stable point. There is still much work yet to do, but I am most happy with my progress.

At this point you can compile an Object Pascal file to a standalone executable and using the API can do the same thing from within your own code. In fact the compiler EXE was written using the API routines. If you add a unit to the uses statement and this unit has not been registered already in code it will attempt to load the unit from disk. The nice thing about this is that you only need one main source file and you can just have a simple .INI project file. See the OnCompileUseUnitProc callback in TESTBED.DPR. You will notice in the project.ini file you can specify version info and an icon for your executable. GVSClasses.pas shows all the classes, routines and types that are currently available from compiled screen. As you can see there are already an extensive number of classes that allow for some powerful and robust game development.

I hope to release an official public beta in the coming weeks.

Pyrogine
11-02-2007, 10:09 PM
I uploaded a new build that now has WIP documentation. You will most likely find mistakes, spelling errors and omissions, but eventually all of this will get sorted out. I included a unit called GVImports.pas so you can see how you would bind your own native classes and routines to the system. This is the very unit that binds GVSDK to the scripting system.

http://www.softbeat.net/temp/gvsdk2007.zip

Pyrogine
13-02-2007, 05:09 PM
Download: GVSDK2007 (http://www.softbeat.net/temp/gvsdk2007.zip)

I've posted a new build. At last stability. Now I can continue to move forward and add new features.

Some info:

1. GVC.EXE is the compiler. It uses a simple and elegant project file format, a standard .INI file. See PROJECT.INI.
2. GVC.BAT is the .BAT file that can be used in conjunction with an external IDE/Editor. Ive been using PSPad ( http://www.pspad.com ). There is a project file for this editor. See PROJECT.PPR.
3. If you click on COMPILE.BAT it will invoke the compiler and compile the SCROLL.PAS source file and output SCROLL.EXE. COMPILE_RUN.BAT does the same but also will run the EXE.
4. Notice that SCROLL.PAS has DEMOUTILS.PAS in the uses statement; it will find this in the current folder and compile this as well.
5. Notice that SCROLL.EXE has version info and an icon. All of this can be controlled via PROJECT.INI.
6. Notice GVSClasses.pas, this is just an interface only listing off all GVSDK classes that have been registered with the system and available in the compiled script.
7. SCROLL.EXE uses lots of GVSDK functionality: audio, textures, math, sprites, fonts and more.
8. Should work on those OSes that had problems before.
9. API update: LogFile, Streams (memory, file, resource, zip), Application, Script
10. Updated the WIP docs.

It would be great if you could let me know if the new changes do work properly on your configuration. Thanks in advance.

Galfar
13-02-2007, 05:23 PM
Do you plan adding some GUI controls?

Pyrogine
13-02-2007, 06:28 PM
Galfar:

Yes this is something that I plan to add in a future release. I am also open to collaborating with someone wishing to write a gui module and/or other add-ons.

chronozphere
13-02-2007, 07:50 PM
I've just tested GVC.exe but it doesn't work.

I get the following error (i'll try to translate it from dutch):

"This application performed an invalid operation and needs to close.. etc"

With these details (also needed some translation):



GVC caused an error related to an invalid page caused in
module KEYBOARD.DRV op00de:bff90777.
Registers:
EAX=81b6fe14 CS=81b70288 EIP=bff90777 EFLGS=bff741f7
EBX=81b6f00c SS=bff7dafa ESP=81b70298 EBP=0065ff6c
ECX=bff741f7 DS=0040 ESI=00000008 FS=bff7a567
EDX=00000000 ES=81afd000 EDI=81b6f018 GS=bff7a10e
Bytes in CS:EIP:


The last line in the console was: website=www.company.com or something like that. :)

I dont think you need to debug this since W98 is not your target OS. I just want to let you know whether it works on my system and what kind of problems i encounter. :)

Good luck. ;)

Pyrogine
13-02-2007, 08:04 PM
chronozphere:

Thanks for the test. Let me ask, what version of DirectX do you have installed? Minimal needed is DirectX9 (Summer 2003) with a D3D9 compliant video card.

Pyrogine
14-02-2007, 04:28 AM
Ok, daily snapshots will be here for now:
http://www.softbeat.net/snapshot/

See the HISTORY.TXT file for change information.

Pyrogine
27-04-2007, 06:09 AM
Testing out new installer for the SDK. Feedback appreciated. Need to make sure it works on different configurations including Windows Vista.
See this page (http://www.softbeat.net/index.php?component/option,com_fireboard/Itemid,56/func,view/id,12/catid,8/) for details.