Lazarus![]() Member Posts: 1668 From: USA Registered: 06-06-2006 |
Hello. I'm working on an Irrlicht - Lua based program, and seem to have run into a stumbling block - detecting keypresses. I cut out function MyEventReceiver:OnEvent(Event) function MyEventReceiver:OnKeyEvent(Key, PressedDown, Shift, Control) if not PressedDown then if Key == irr.KEY_KEY_W then if Key == irr.KEY_KEY_S then end return false that from one of the example programs to use - but imp_y doesn't seem to be changed when I press W or S. Ahh - never mind. I figured it out - wasn't setting the event receiver. (When the forum update comes, I hope we'll be able to delete a topic in situations like this - that's not possible currently) [This message has been edited by Lazarus (edited April 02, 2007).] |
Calin![]() Member Posts: 358 From: Moldova Registered: 12-04-2006 |
quote: I'll resurrect the forum thread see if they have any updates for us. ------------------ |
steveth45![]() Member Posts: 536 From: Eugene, OR, USA Registered: 08-10-2005 |
It's cool that you are using Irrlicht + Lua. Let us know how things go. I'm using Irrlicht + Python for pyweek right now, but I have to make my own lightweight Python-Irrlicht binding using Boost::Python. I'm calling it "Irrthon" right now, but I'll probably change the name later. ------------------ |
Lazarus![]() Member Posts: 1668 From: USA Registered: 06-06-2006 |
Well, I hope you release it to the world ![]() |
steveth45![]() Member Posts: 536 From: Eugene, OR, USA Registered: 08-10-2005 |
Well, it will be released as part of my Pyweek entry, but I will probably clean it up a bit and make a more formal release on my webpage and/or sourceforge. There was an older Python-Irrlicht binding called Venom, but it hasn't been updated in ages. My binding takes a different philosophical approach than most bindings. Instead of just binding every single call, I'd like to make mine a little "higher" level and take care of more things for you, so you don't have to produce the same Irrlicht engine code, but in a different language. The binding will also include an audio engine, probably Audiere, so, in a sense, it will be a more general Python game engine, not just an Irrlicht binding. I'll try to keep it up do date with the latest Irrlicht version, too. ------------------ |
Lazarus![]() Member Posts: 1668 From: USA Registered: 06-06-2006 |
I will look forward to that. ![]() |
Lazarus![]() Member Posts: 1668 From: USA Registered: 06-06-2006 |
I was somewhat disgusted upon commenting out three parts of the drawing loop(that printed two lines of text and a little rectangle, respectively) - and going from fifteen frames per second to forty-five! ...crazy, it's just crazy. |
steveth45![]() Member Posts: 536 From: Eugene, OR, USA Registered: 08-10-2005 |
That doesn't sound good. When you say "printing text", are you printing it in the console or rendering it on the main windows? I could see printing to the console every frame slowing things down, though that seems a little extreme. With my Python binding, I've got an animated model ~1600 poly's, plus several hundred poly's for the level. The whole thing runs at 60 frames per second. It would probably be faster if I turned off vsync. I think Irrlua was built with Swig, which is apparently not too great of a way to make bindings regarding performance, so maybe that is the problem. Also, make sure that you are using the OpenGL device, the software device can slow everything down. ------------------ |
Lazarus![]() Member Posts: 1668 From: USA Registered: 06-06-2006 |
Well, I checked, and I'm getting around 400FPS with Irrlicht 1.3 and the sixth example program(C++ - the 2D example) - and 19FPS with Irrlicht 1.1, IrrLua, and the same example program.(Using DX9.0C for both, btw) I think I see where the problem is. |