Blooddrunk game engine+editor {Looking for potential users!}

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

Today i've overcome a major hurdle. Python docs dont say how to allocate and returna new custom object i.e. IXMLReader.... The functions are caled but they dont quite work because of the beyond repair python unicode. However i am implementing the utf-8 reader tomorrow in whole and then getting back onto this.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

devsh wrote:Today i've overcome a major hurdle. Python docs dont say how to allocate and returna new custom object i.e. IXMLReader.... The functions are caled but they dont quite work because of the beyond repair python unicode. However i am implementing the utf-8 reader tomorrow in whole and then getting back onto this.
Try to have a look on how pyBindGen does it. Its entirely written in python so it is very easy to install and use. It can create wrappers for functions, classes, structures, moreover the code that pyBindGen creates is clean and clear :)

http://code.google.com/p/pybindgen/
Theres also online documentation.

I had successfully wrapped a few classes using it, so I think you should give it a try.
Working on game: Marrbles (Currently stopped).
macron12388
Posts: 126
Joined: Wed Sep 29, 2010 8:23 pm

Post by macron12388 »

Note to devsh: I was having some issues with the Python unicode when building your engine on the Windows platform, I got it to compile, but it was a bit of a dirty fix. I'll try and see what I can do to clean that up today.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

Yeh gently caress the python Unicode... gotta convert it anyways
macron12388
Posts: 126
Joined: Wed Sep 29, 2010 8:23 pm

Post by macron12388 »

Alright, cool, not to sound like I'm pressuring you or something,just curious but when will that be done?
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

umm done... right now comitting the SVN... why are you not on msn?
roelor
Posts: 240
Joined: Wed Aug 13, 2008 8:06 am

Post by roelor »

devsh wrote:Right looking for someone relatively new who might want to get more familiar with irrlicht and developing frameworks.
If I'd only had the time :cry:

A thing I can do is to cheer you on!
Good luck on your (not so) little project :)
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

yeah we met our outline of 10 revisions a day from both of us joined. WE fixed all issues (except windows binary of the first demo - hehe), the lib compiles in windows, the XMLReader works in python with (now) correct enums. I implemented the rest of the functions and the XMLReader type is complete both UTF32 and UTF8 types!

This is what we can execute so far

Code: Select all

import irrlicht
import io
import irrFileSystem
import irrVideoDriver
import video
import irrSceneManager
import irrGUIEnvironment


print "This is a python script initializing the editor.\n"

Caption = u"Blooddrunk Game Editor"
irrlicht.setWindowCaption(Caption)
irrFileSystem.addFolderFileArchive("../editorData/")

irrVideoDriver.setTextureCreationFlag(video.ETCF_ALWAYS_32_BIT, 1)

irrSceneManager.setAmbientLight(0.3,0.3,0.3);

xml = irrFileSystem.createXMLReader("config.xml")
MessageText = Caption
StartUpModelFile = u""

a = 0
while xml.read():
	nodeType = xml.getNodeType()
	if nodeType==io.EXN_TEXT:
		print xml.getNodeData()
		print nodeType
		MessageText = xml.getNodeData()
	elif nodeType==io.EXN_ELEMENT:
		nodeName = xml.getNodeName()
		if "startUpModel"==nodeName:
			StartUpModelFile = xml.getAttributeValue(u"file")
		elif "messageText"==nodeName:
			Caption = xml.getAttributeValue(u"caption")

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

irrGUIEnvironment.addMessageBox(Caption,MessageText)

skin = irrGUIEnvironment.getSkin();
font = irrGUIEnvironment.getFont("fonthaettenschweiler.bmp");
skin.setFont(font);

print "End of Initialization. \n"
We will be rewriting all irrlicht's examples to help us with the direction of python interpreter's development, of course all blooddrunk functions will be exposed by the end of this week :)

This is a draft for Irrlicht PoC 01.Hello World

Code: Select all

import BSettingsManager
import core
import BEngine
import irrlicht
import irrGUIEnvironment
import irrSceneManager
import irrVideoDriver
import BPythonInterpreter
import bdrunk
import BRenderer

def renderFN():
	BRenderer.render()

settings = BSettingsManager.getSettings()
if (settings.resolution.X!=640)||(settings.resolution.Y!=480):
	print "Bad Resolution Restarting..."
	settings.resolution = core.dimension2d(640,480)
	BSettingsManager.setSettings(settings)
	BSettingsManager.save()
	BEngine.restart()

irrlicht.setWindowCaption(u"Hello World! - Irrlicht Engine Demo")


irrGUIEnvironment.addStaticText(u"Hello World! This is the Irrlicht Software renderer!",rect(10,10,260,22), 1)



mesh = irrSceneManager.getMesh("../../media/sydney.md2")

if mesh.isNull():

	BEngine.Quit()

node = irrSceneManager.addAnimatedMeshSceneNode( mesh );



if !node.isNull():

	node.setMaterialFlag(EMF_LIGHTING, 0)

	node.setMD2Animation(EMAT_STAND)

	node.setMaterialTexture( 0, irrVideoDriver.getTexture("../../media/sydney.bmp") )





irrSceneManager.addCameraSceneNode(0, core.vector3df(0,30,-40), core.vector3df(0,5,0))



BPythonInterpreter.registerFunction(bdrunk.EPIRF_START_OF_FRAME,renderFN)
#BPythonInterpreter.registerModuleFunction(bdrunk.EPIRF_START_OF_FRAME,"renderFN","./path/to/module.py")

#Got to kickstart the engine into the first frame (then it calls the "renderFN" function repeateadly)
BRenderer.render()
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

if i understand that snippet correctly. You are calling a registered script function from c++ to call a c++ function every frame? that sounds like a big slow down. try to avoid calling scripts over and over it is not really needed.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

Yeh I just want to proove its doable in python, the engine demos will keep python in the game loop to a minimum

EDIT: Implemented 40% of all irr::gui enumerations

EDIT2: Implemented a stub of the IGUISkin interface... cannot implement all because it depends on classes&&structs like SColor
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

We figured out how to do inheritance :)
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

Finishing the first demo, starting the 2nd one which will demonstrate hardware skinning and billboards.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

@Macron: Any chance of you resurfacing?

EDIT: Implemented SettingsManager as a python object (I now need to implement dimension2du and getSettings), I implemented the entire core:: namespace except for typedefs and most classes. Implementing the 2d vectors has a knockon effect(I only need to add operator support) which enables me to easily implement 3d vectors, core::recti, and some more IAttribute functions and review IAttributeWriteFlags and the IAttributeExchangingObject inheritance. I am to finish implmenting ALL classes in the core:: namespace before the end of the month.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

nearing the release of the first demo (just more monotonous python coding)... also I am doing Irrlicht PoCs (to proove every example is doable in pure python) but...

I am doing XEffects PoCs in Blooddrunk, demonstrating that it can render the exact same scenes in deferred faster than XEffects. Obviously I will make a second set of demos that show what Blooddrunk can do with the spare fps... (instead of 1 point light, 2) or (3 spotlights with shadows + 29 no shadow lights)/(GI instead of SSAO)
Luben
Posts: 568
Joined: Sun Oct 09, 2005 10:12 am
Location: #irrlicht @freenode

Post by Luben »

devsh wrote:GI instead of SSAO
SSAO is a global illumination technique.
Post Reply