Page 2 of 4

Posted: Sat Jan 08, 2011 11:33 pm
by devsh
Orry for 2 posts, iphone.

I am almost finished with the first demo, before i release it must implement python event receivers. Also have compile flags for the different versions. I will release executable only because its a small demo.

After that i'll be back onto rewriting the mesh viewer. This means implementing python Ixmlreader

Posted: Sun Jan 09, 2011 1:59 am
by Luben
Have you considered using another language than python for your scripting, if so which and why did you decide on using python?

Posted: Sun Jan 09, 2011 9:29 am
by devsh
A) its powerfull
B) blender and gimp use it
C) i know it

Posted: Sun Jan 09, 2011 2:00 pm
by Luben
Given your answer i take it that you haven't really thought about other languages. You might want to check out Lua for your next project.

Posted: Sun Jan 09, 2011 2:22 pm
by serengeor
Luben wrote:Given your answer i take it that you haven't really thought about other languages. You might want to check out Lua for your next project.
Why is that everyone empowers Lua for scripting?
How is it better than Python, or GameMonkey ?

Posted: Sun Jan 09, 2011 2:57 pm
by Luben
serengeor wrote: Why is that everyone empowers Lua for scripting?
How is it better than Python, or GameMonkey ?
For general purpose scripting, i prefer Lua because i dont like the whitespace-indentation-thingy from python, i can't say anything about GM and because i've a fair codebase of Lua-scripts and modules.
For game scripting, i think it boils down to performance and simplicity. Take a look at this graph and make note of where LuaJIT is located. [1]

I wouldn't say that any language is better than any other language, and this thread is the wrong place to conduct language discussions(which are bound to detoriate into flamewars).

[1] http://shootout.alioth.debian.org/u32/c ... shapes.php

Edit: forgot the link

Posted: Sun Jan 09, 2011 2:59 pm
by serengeor
Take a look at this graph and make note of where LuaJIT is located.
Erm, what graph ? :shock:

Posted: Sun Jan 09, 2011 3:07 pm
by Luben
Forgot the link, edited the post so it's there now.

Posted: Sun Jan 09, 2011 6:20 pm
by devsh
CPython is just as fast as LUA, but not LuaJIT.

Also LUA's documentation lacks tutorials - pain in the ass.

Posted: Sun Jan 09, 2011 8:11 pm
by devsh
introduced soft-errors, this will not terminate the script (making an IXMLReader out of thin air)

Code: Select all

#xml = irrFileSystem.createXMLReader("config.xml");
xml = io.IXMLReader()

#while xml.read():
#	switch(xml->getNodeType())
#	{
#	case io::EXN_TEXT:
#		in this xml file, the only text which occurs is the
#		messageText
#		MessageText = xml->getNodeData();
#		break;
#	case io::EXN_ELEMENT:
#		{
#			if (core::stringw("startUpModel") == xml->getNodeName())
#				StartUpModelFile = xml->getAttributeValue(L"file");
#			else
#			if (core::stringw("messageText") == xml->getNodeName())
#				Caption = xml->getAttributeValue(L"caption");
#		}
#		break;
#	default:
#		break;
#	}

xml.drop() # don't forget to delete the xml reader

Posted: Sun Jan 09, 2011 11:07 pm
by devsh
Rght looking for someone relatively new who might want to get more familiar with irrlicht and developing frameworks. Basically I have a tedious task of implementing irrlicht in python. I have managed to expose functions in some classes as modules and other classes (where multiple instances of thesame object can occur) as python objects with appropriate methods (not onto members yet). If someone is interested in developing the python bindings whether to use the entire engine in their project or just to use the engine to invoke irrlicht and use it just as a python binding/extension to their app. If such person turns up I will set up SVN. The tasks at hand gradually increase in difficulty, from implementing namespace enums through exposing engine functions, to defining clases as python objects. Then obviously the time that is finished, help develop demos (come up with demo ideas==do the pythoning).

Posted: Mon Jan 10, 2011 12:32 am
by macron12388
EEagh... I would LOVE to help, I do enjoy having a massive workload, it keeps my mind busy, and I have just begun learning c++ a few months ago. I already had what I would say is decent enough experience in programming general.

I don't know if I should, I already have a full time project I'm working on that I *really* want to get done and out by this late Spring.

If I were to try and help out what kind of dedication would you be looking for? I can dedicate maybe 1 hour - 1 and a half hours a day, maybe 4/5 weekdays, but not 100% consistent.

EDIT: Okay, after thinking this over for a whole two minutes I decided I will help as much as I can, I need the experience I will gain, and indulge in steep learning curves.

Posted: Mon Jan 10, 2011 6:35 am
by serengeor
@ devsh: where did you learn to wrap classes? I couldn't seem to find anything useful about this.

Posted: Mon Jan 10, 2011 9:17 am
by Luben
devsh wrote:CPython is just as fast as LUA, but not LuaJIT.
Also LUA's documentation lacks tutorials - pain in the ass.
As most Lua folks i feel the need to rage over writing Lua with all caps. It's not an acronym. We dont write PYTHON either. :wink:

Regarding speed, LuaJIT is an order of magnitude faster than both Lua and CPython. See [1].

And regarding lack of tutorials in the documentation, you must've missed PiL[2]. The reference manual is just that, and is probably what you've skimmed trough. =]

[1] http://shootout.alioth.debian.org/u32/w ... calc=chart
[2] http://www.lua.org/pil/1.html

Posted: Mon Jan 10, 2011 9:58 am
by devsh
right macron12388, the kinda thing I am looking for is implementing namespace enumerations in Python as modules... i.e.

irr::video::ETS_WORLD becomes
video.ETS_WORLD

I will show you an example of how to do it and how to add Int constants to python modules, because that what enums really are. So I will set up SVN and contact you when I get home