Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Jul 2005
Offline Last Active May 12 2015 04:41 PM

Posts I've Made

In Topic: Embedded Python Debugger

18 June 2012 - 09:11 PM

I hadn't thought about extending. But at the moment, to get either it extended or writing a debugger would probably take just as much effort, so I'm leaning towards writing a debugger (also, it sounds interesting as I haven't done anything like that before). But before I dive in, I want to just make sure I am not reinventing the wheel!

Judging from the fact that nobody has already mentioned an alternative, I'm guessing that there isn't must out there to use?

In Topic: Getting and Passing python class instance to C

06 November 2010 - 06:26 PM

Alright, I managed to figure out what I was doing wrong, kind of.

I’m using Boost.Python and I was trying to pass a python class instance from python to C and then back to python using a PyObject.

Boost.Python wraps PyObjects in its own boost::python::object class. By changing where I was using PyObjects* to boost::python::object everything works

Good to get it working but really wish I could have figured out how to do this using PyObjects

void Update(float deltaTime, boost::python::object gameObjects)
call_method<void>(self, "update", deltaTime, gameObjects);

In Topic: Getting and Passing python class instance to C

02 November 2010 - 10:15 AM

This was the only way I could get this code to compile. I was assuming that dereferencing it wouldn't make a copy however since all of python's code is set up using ref counting.

In Topic: Game Engine - Scenes

30 July 2008 - 01:32 PM

Awwwwwwww. That makes sense. Just have to figure out how to write it now :)

Thanks for your timely replies

In Topic: Game Engine - Scenes

30 July 2008 - 10:58 AM

Thanks for the reply ToohrVyk.
The reason I was thinking of having several list was basically for height calculations. If we want to get the height on the terrain for the placement of another object and it is mixed in a tree/vector/list structure with other object that do not return height values, you will need to find the type of object that you are looking at when iterating, and if it is the terrain object (Used loosely to describe the whole terrain), then get the height of the terrain at the point you are looking at.
If we put them into a separate list, then when adding other objects, you can call ‘terrain->getheight()’ and not have to worry about the type of the object or casting.