protomor, we'd like it to be done as soon as possible, of course. Hopefully it will be somewhat functional some time before we do the next VDrift release.
rookie1, the screenshot looks fantastic, thanks for your work on this! Also, I can't see why the changes you propose to make to trunk will have any adverse effects. Do you know of any problems these changes will trigger? If not, I think you can go ahead and commit.
--------------
The following is not really related to VDrift, but more about my problems trying to get pygtkglext working on Ubuntu Feisty 64. The reason I'm posting the info is for others who might be having the same problem and maybe this will help someone find a solution. If you wish to save time and skip it, just start reading again after the next dashed line....
I finally got around to trying this out tonight, since I'm finally done with exams.
Unfortunately I couldn't get it to work on my development machine. It's running Ubuntu Feisty for AMD64, and there was no package for it available. I tried the amd64 .deb from Debian unstable, but it wouldn't work (complained that I didn't have python package version 2.4).
So of course I headed over to the
GtkGlExt home page and picked up the latest
source package for pygtkglext. Running setup.py didn't work for me, even with python2.4:
Code:
thelusiv@deuxeau:~/code/pygtkglext-1.1.0$ python2.4 setup.py install --prefix=/usr
Traceback (most recent call last):
File "setup.py", line 89, in ?
if not pkgc_version_check('pygtk-2.0', 'PyGTK', PYGTK_REQUIRED_VERSION):
TypeError: pkgc_version_check() takes exactly 2 arguments (3 given)
Since the middle argument on line 89 looked the most useless, I deleted it and tried again:
Code:
thelusiv@deuxeau:~/code/pygtkglext-1.1.0$ python2.4 setup.py install --prefix=/usr
Traceback (most recent call last):
File "setup.py", line 118, in ?
override='gtk/gdkgl/gdkglext.override')
File "/var/lib/python-support/python2.4/gtk-2.0/dsextras.py", line 418, in __init__
py_ssize_t_clean))
File "/var/lib/python-support/python2.4/gtk-2.0/dsextras.py", line 328, in __new__
raise NameError("'%s' is not defined\n" % cls.__name__
NameError: 'Template' is not defined
***************************************************************************
Codegen could not be found on your system and is required by the
dsextras.Template and dsextras.TemplateExtension classes. codegen is part
of PyGTK. To use either Template or TemplateExtension, you should also
install PyGTK.
***************************************************************************
OK, so that's not going to work. Giving up on setup.py I see there is an autotools setup too, so I run ./configure --prefix=/usr and it works, as does make and sudo make install. This installed files that looked like the ones I needed to /usr/lib/python2.5/site-packages/gtk-2.0/gtk/gtkgl . Now I'm getting somewhere...but sadly it still doesn't work. Trying to import the library by all different names, I finally moved the gtkgl directory down to /usr/lib/python2.5/site-packages/ and tried:
Code:
thelusiv@deuxeau:~/code/vdrift-trackeditor/branches/pygtk-trackeditor$ python
Python 2.5.1 (r251:54863, May 2 2007, 16:27:44)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtkgl
Segmentation fault (core dumped)
Ouch! :o
Giving up on python 2.5, I move the directory to /usr/lib/python2.4/site-packages and try:
Code:
thelusiv@deuxeau:~/code/vdrift-trackeditor/branches/pygtk-trackeditor$ python2.4
Python 2.4.4 (#2, Apr 12 2007, 21:22:23)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gtkgl.apputils import *
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/gtk-2.0/gtkgl/__init__.py", line 21, in ?
from _gtkgl import *
ImportError: /usr/lib/python2.4/site-packages/gtk-2.0/gtkgl/_gtkgl.so: undefined symbol: Py_InitModule4_64
So, in short, it seems that pygtkglext has some issues on the latest Ubuntu release, at the very least it needs to be packaged properly, at most it could need updates to run correctly. It seems that at least part of the problem could be related to 64 bit systems.
-----------------
So, back to my old 32-bit development machine running Ubuntu Edgy which has a package for pygtkglext, it runs fine. I am trying to stop using that computer, but damn it, it's so useful.
Now that I actually got it running I have started playing around with the code and made a few changes. I didn't find it very easy to move around the way the camera controls were set up. The changes I made are detailed in the commit log message. rookie1, let me know if you don't like any of the changes I made.
An issue introduced by my changes is that now the user can't control camera up/down movement. I think the best way to address this would be to make the camera always float a certain distance above the track and other objects beneath it. I think I can get this information from the track objects that have been loaded, but haven't tried this yet. Joe, or anyone else who might know how to do this, feel free to chime in. I'll probably work on this a little more tomorrow and over the weekend.
Another thing that is pretty important is the ability to select objects by clicking on them. I'd like to get this working as well. We'll also need to set up a similar way to select objects' vertices so that the track surface can be defined. Left mouse click would probably work great for both of these, with a menu/toolbar toggle to switch between vertex/object selection mode.
There's a lot more stuff I have in mind but this post is already long and I'm tired, so more later. Anyway, great work rookie1, this track editor is now officially off to a good start.
:mrgreen: