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 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 AgenoriaLoaded plugin Microsoft DirectX 8.1 Input v1.0 AgenoriaLoaded plugin Microsoft DirectX 8.1 Audio v1.0 AgenoriaLoaded plugin Lua 5.1 Binder v1.0 AgenoriaInitializing videoVideo device detected NVIDIA GeForce 8400 GS Video initializedInitializing inputInput device detected MouseInput device detected KeyboardInput device detected USB Gaming MouseInput device detected USB Gaming MouseInput device detected Gaming KeyboardInput device detected Gaming KeyboardInput device detected G11 KeyboardInput initializedInitializing audioAudio initializedExecuting 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 on other sites
Same here, just crashes. The log:
Loaded plugin Microsoft DirectX 8.1 Graphics v1.0 AgenoriaLoaded plugin Microsoft DirectX 8.1 Input v1.0 AgenoriaLoaded plugin Microsoft DirectX 8.1 Audio v1.0 AgenoriaLoaded plugin Lua 5.1 Binder v1.0 AgenoriaInitializing videoVideo device detected NVIDIA GeForce 6600 GTVideo initializedInitializing inputInput device detected MusInput device detected TangentbordInput initializedInitializing audioAudio initializedExecuting 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 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 on other sites
It works, nice work!

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 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.

• Forum Statistics

• Total Topics
628316
• Total Posts
2982032

• 9
• 9
• 13
• 11
• 14