Sign in to follow this  
dopeman

AGen - 2D Game Engine

Recommended Posts

I hate to start a new topic about this but the old one has been "retired" http://www.gamedev.net/community/forums/topic.asp?topic_id=475198 There's a major update to the AGen project. The new version of the engine is much more stable and includes 4 tech demos: -"lion.lua" showcases the new triangulation algorithm in the engine. It's the SVG lion rendered in real time. You can use your mouse to move the camera. -"bench.lua" is a classic moving rectangles demo. You can remove or add more rectangles using the arrow keys. 1,2 and 3 toggles the different effects used on the rectangles -"cull.lua" shows how non-visible object are culled from the scene without affecting the FPS. Again, you use your mouse to move the camera. -"physics.lua" is an experimental tech preview of a physics simulation using box2D as a Lua module. You can apply forces to the red box using the arrow keys as well as move the camera with the mouse. PS. Don't forget to extract the demo to a local directory before running the "bat" files http://2dengine.com/bin/alpha/2008_07_04.zip (994 Kb)

Share this post


Link to post
Share on other sites
Well, any of the four demos just crashes after initializing the window.

Running XP Pro x64 SP2.

The error emerges from AGenDI8.dll according to WinXP (offset 2861, should you be interested), so a quick and dirty guess would be that your input initialization is the source of the error.
I have also tried running in compatibility mode for XP, but not luck there either.

Here is the log file.

Loaded plugin Microsoft DirectX 8.1 Graphics v1.0 Agenoria
Loaded plugin Microsoft DirectX 8.1 Input v1.0 Agenoria
Loaded plugin Microsoft DirectX 8.1 Audio v1.0 Agenoria
Loaded plugin Lua 5.1 Binder v1.0 Agenoria
Initializing video
Video device detected NVIDIA GeForce 8400 GS
Video initialized
Initializing input
Input device detected Mouse
Input device detected Keyboard
Input device detected USB Gaming Mouse
Input device detected USB Gaming Mouse
Input device detected Gaming Keyboard
Input device detected Gaming Keyboard
Input device detected G11 Keyboard
Input initialized
Initializing audio
Audio initialized
Executing script file 'Scripts\bench.lua'
Display mode set to 32 bit, 800x600 pixels (windowed)
Audio format set to 16 bit, 44100 Hz (1 channel)



Share this post


Link to post
Share on other sites
Same here, just crashes. The log:

Loaded plugin Microsoft DirectX 8.1 Graphics v1.0 Agenoria
Loaded plugin Microsoft DirectX 8.1 Input v1.0 Agenoria
Loaded plugin Microsoft DirectX 8.1 Audio v1.0 Agenoria
Loaded plugin Lua 5.1 Binder v1.0 Agenoria
Initializing video
Video device detected NVIDIA GeForce 6600 GT
Video initialized
Initializing input
Input device detected Mus
Input device detected Tangentbord
Input initialized
Initializing audio
Audio initialized
Executing script file 'Scripts\lion.lua'
Display mode set to 32 bit, 800x600 pixels (windowed)
Audio format set to 16 bit, 44100 Hz (1 channel)

Share this post


Link to post
Share on other sites
Thanks for pointing that out.
You're right nife87, it was a silly input bug in the "init.lua" script.
The line "joystick:set_mode" assumes that you have a joystick plugged in.
I've reuploaded a fixed version: http://2dengine.com/bin/alpha/2008_07_04.zip - could you please run that one and tell me if it works

Share this post


Link to post
Share on other sites
Now it also works for me.

I noticed in the log that you (presumably) load the Lua plugin last and also unload it last. This may not be an issue for you right now or ever, but if the Lua plugin creates dependencies (allocated objects of whatnot) amongst itself and the other plugins, then it could lead to bugs or leaks (most likely the latter). Of course, this might not become an issue at all unless the Lua plugin creates those dependencies, but I just thought you should now :)

Share this post


Link to post
Share on other sites
Yeah, good point. :) I have to look into it, but I think when it says that the plugin has been "loaded" it just means that its DLL was loaded. That is, the actual initialization/release of Lua is done independently from when the plugin is loaded/unloaded.
Now that I think about it, it might be safer if Lua was not a plugin at all, but is linked statically from the executable. This way Lua would always be loaded which is good since there's no point in running the engine without any scripting. Another option would be to load the other plugins in Lua.

Share this post


Link to post
Share on other sites
Sign in to follow this