Archive for the Twisted Pair Category

Compiling Python on Ubuntu / Linux

Posted in Twisted Pair with tags , , , , on 2012/09/25 by Adam Griffiths

I’ve been having problems installing Python on my Ubuntu machine because of errors with setup tools.

During installation you get the following error:

Installing distribute into /home/ting/.pythonbrew/pythons/Python-2.7.3
ERROR: Failed to install setuptools. See /home/ting/.pythonbrew/build.log to see why.
Skip installation of setuptools.

And if you try and use pip / easy_install, you get this:

ImportError: No module named setuptools

It turns out the answer is simple, we’re missing some libraries required to compile it.

sudo apt-get build-dep python2.7

BAM! Pythonbrew works!

PyGLy steps into the future

Posted in Development, PyGLy, Twisted Pair with tags , , , , , on 2012/09/21 by Adam Griffiths

I’ve been working quite heavily on PyGLy for the last few weeks and I’m incredibly pleased to announce that PyGLy is now OpenGL 3 clean!

It took more work than I hoped. Not because of PyGLy (it was already pretty good), but Pyglet’s OpenGL Core (3+) support on OS-X, is well… broken.
I had to integrate a patch written by someone else and patch out 2 of the window event handlers.
The main reason for this is that OpenGL Core on OS-X is limited to 3.2, and is Core only (no legacy compatibility).
These changes can be found in my Github repository.

Pyglet isn’t without it’s problems. It is quite heavy weight in places. There is no support for float or 1D textures.
Other problems are it’s usage of legacy calls. These are scattered throughout the code base and prevent me from using even the Label or VertexList classes.
I would LOVE to help with the development of Pyglet… but I find the code… very confusing.
It’s got a fair amount of abstraction. Tracing even a vertex buffer blows my mind.

Regardless, I hope these issues will be fixed soon.

OpenGL and GLSL support in OS-X

Posted in Twisted Pair with tags , , , , on 2012/08/13 by Adam Griffiths

I had difficulty finding the supported OpenGL and GLSL versions in OS-X.
Using Pyglet, I get errors trying to use versions GLSL 1.30 and above. Printing out the version returns 1.20.

from ctypes import *
from import *

print "OpenGL version", gl_info.get_version()

plain = string_at(glGetString(GL_SHADING_LANGUAGE_VERSION)).split(' ')[0]
major, minor = map(int, plain.split('.'))
version = major*100 + minor
print "GLSL Version",version

Looking around I found this information.
Mac OS-X OpenGL Support

Legacy would infer the “Fixed Function Pipeline” and Core would be modern OpenGL.
So it seems that legacy OpenGL (normal Pyglet) is stuck with GLSL 1.20 and Core has 1.50.

This code can be found on the Pyglet source repository that enables OpenGL 3 (Core).
Enable OpenGL 3 in Pyglet

But the ouput I get is not correct.

OpenGL version 2.1 ATI-1.0.25
GLSL Version 120

According to this conversation, it appears that Pyglet ignores the OpenGL version on OS-X currently.

PyGLy Progress

Posted in Development, Twisted Pair with tags , , , on 2012/07/06 by Adam Griffiths

Work on PyGLy is progressing well. The code is better designed and cleaner than I’d hoped, so I’m very pleased.

I’m wanting to keep PyGLy thin, so not much more new functionality will be added. New features will go into higher level projects that sit on top.

I tried some NumPy optimisations with BLAS and other libs, but haven’t seen much improvement. Biggest change was running Python with ‘-O’, which got me another 10 FPS.

Dev continues!

Initial release of PyGLy

Posted in Development, Programming, Twisted Pair with tags , , , , on 2012/03/07 by Adam Griffiths

It’s a pretty big day for us, as I’m pushing my labor of love, PyGLy, to GitHub.

PyGLy is a 3D framework developed in pure python.

I’ve been dismayed at the state of game frameworks on Python.

There are a large number of quality 3D engines and frameworks out there. However, there are serious problems with the ‘engines’ out there that have Python bindings.

  • Not truly cross-platform (this is Python FFS!).
  • Not free.
  • Not maintained.
  • No documentation (the worst culprit).
  • Bindings are 2nd class citizens and you still need to code C/C++/Whatever.
  • Don’t work with latest versions of code.

Most engines have bindings created by the community. The problem is these are quickly dumped when the person moves on.

Python only 3D engines seem… well… stagnant.

  • PySoya and PySoy seem to be seething at each other but not really producing much.
  • PyGame is just SDL in disguise.
  • The rest… well they all 404 now.

For the most part, 3D game development on Python is dead.

So, behind the scenes, I’ve been writing my own 3D framework for Python, PyGLy.

“Framework” is an important word there. PyGLy does not force any one methodology on you. PyGLy simply provides functionality to wrap common functionality. Windows, Viewports, Scene Graph Nodes, Cameras. It’s up to you to put them together how you want.

Obviously some things are going to be coupled together. But for the most part, PyGLy just gets out of the way.

At the moment PyGLy is quite small, but it is in active development and already has features that may interest some.

I think the best case for it at the moment is for people wanting to rapidly prototype in 3D but not be abstracted from the rendering process. PyGLy lets you forget about the scene graph and just concentrate on rendering your objects. Rendering is performed via callbacks. You can make any OpenGL call you want in these callbacks.

PyGLy is the foundation of our Python 3D work, so expect it to be actively developed going forward.

The following are some of the things that we’re wanting to add in the future:

  • Shadowing.
  • Scene management (Octree, etc).
  • Cocos2D integration (CCLayer).
  • Separate OpenGL 3+ path.

As we’ve said before, Twisted Pair are true believers of Open Source, so you can find PyGLy on our GitHub repository under a very liberal license.

The re-re-rising

Posted in Twisted Pair with tags on 2012/01/16 by Adam Griffiths

Twisted Pair are back at work full-time.

Shock goes Open Source

Posted in Development, Shock, Twisted Pair with tags , , , , , , on 2011/12/04 by Adam Griffiths

Today marks a historic day for Twisted Pair, as we release the full source code to the Shock C++ Cross-Platform library.

The project files and Socket module are currently missing.

When I get time, I’ll take a day to create the project files for MSVC, Eclipse and XCode.

Look out for PyGLy, our Python graphics library, on GitHub soon.

Steam Compatibility mode

Posted in Twisted Pair on 2011/02/19 by Adam Griffiths

If your steam install suddenly claims to be in compatibility mode, try this. Just happened to me =P

  1. Hit start->run->regedit
  2. Go to key: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
  3. Look for a entry with your path to steam.exe
  4. Delete that entry
  5. If you dont find it there try HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

Twisted Pair steps into the future of the past!

Posted in Twisted Pair on 2011/02/14 by Adam Griffiths

Follow us on twitter!

And so it begins…

Posted in Development, Shock, Twisted Pair with tags , , , , on 2011/01/23 by Adam Griffiths

Well, I resigned from my job last friday to focus full time on Twisted Pair.

The way I see it, if I fail at getting this off the ground, I can just consider the time spent as a big holiday with my family. So either way, everyone wins… apart from my bank account =P.

I’m taking some time to relax but will pick up development after my last day (three weeks from now). I’ve been thinking a lot about Shock and I’ve solved a number of things in my head so it will be full steam ahead once development starts. I’m really looking forward to seeing some milestones.

Sometimes you spend forever designing your house of cards to be rebust only to find the bricks were beside you all along

Posted in Development, Rant, Shock, Twisted Pair with tags , , , , on 2011/01/11 by Adam Griffiths

I’ve spent the last 5 years designing my C++ library Shock. It’s basically designed to let me create a number of games I’ve always wanted to make with a massive amount of code re-use and a number of other niceties thrown in.

I’ve been experimenting with Python and it’s opened my eyes to the flexibility of modern programming languages. I think it’s what I should be developing in.

I’ve coded C++ since uni. It’s what I do for a living. But the irony is, I hate C++. It’s not just that I work with it all the time and have had bad experiences, C++ is truly horrible. And the sad thing is, it’s so pervasive that we can’t shake it.

Continue reading

Progress, Decisions and Optimism

Posted in Development, Shock, Twisted Pair with tags , , , on 2010/12/27 by Adam Griffiths

Work on Shock has been slow but good. I’m developing the engine toward an actual game, rather than hammering out a perfect framework first. Just to be clear, I am writing good code that will be in the engine for a long time. What I’m not doing is writing code that I don’t need yet. A mistake I made with my last game framework (unreleased). I’m currently scavenging code and ideas from it for Shock, which is far superior.

It’s incredibly exciting to see all of these concepts, ideas and designs come to life. I’ve had the Shock engine in my head for over 5 years now and I’ve been constantly refining it as I learn more and more about better programming practice and new programming methodologies. Shock isn’t really anything new, it’s more that it is a single implementation of the best ideas I’ve come across in that time.

Continue reading

The “Game” Plan

Posted in Development, Rant, Twisted Pair with tags , , on 2010/11/24 by Adam Griffiths

I’ve been considering working full-time on our projects. It’s a scary prospect of having financial commitments, a family, but zero income. At the same time, it’s incredibly liberating. I’m already so over the corporate lifestyle (of which there isn’t one). I’ve never enjoyed working for other people, corporations are so dysfunctional and in-efficient it just makes me want to scream.

I have enough good ideas of my own that I should be able to make it, but getting a start is hard when you don’t have a big parachute of money to keep you safe.

Continue reading

New…ish Logo

Posted in Twisted Pair with tags on 2010/10/26 by Adam Griffiths

We’ve got a new logo! ……ok.. it’s not a new logo, I just lost the font and had to pick a new one that was similar. I wanted to tweak the “Development” font colour, it looked very… programmer art-y… before.

Regardless, at least I know this font is in the public domain. The font is “MoanHand” from JoeBob.

From the ashes…

Posted in Development, Shock, Twisted Pair with tags , , on 2010/10/22 by Adam Griffiths

Twisted Pair is alive and well. Work has been continuing despite the lack of updates.

After much flip-flopping with game ideas, we have finally settled on our next game and are incredibly excited about the possibility this will bring (thats not corporate speak… I’m actually fricking excited!).

Continue reading

Est. 2009

Posted in Twisted Pair with tags on 2009/04/22 by Adam Griffiths

Twisted Pair Development officially has a web presence as of the 22nd of April, 2009!

Look forward to some information regarding our major project soon.

%d bloggers like this: