Starting screen of the other design

We spent all of Sunday arguing about how exactly we were going to implement the flight of the dandelion seed, and only today did we really have the idea fully fleshed out (at least to the point where I feel that if we implement it all, we will have a coherent game).

I don't want to give away all of what we're doing yet, but as a bit of a teaser, this is the title screen, the starting point of the journey:




(Procedural vector graphics ftw. >400fps full-screen, animated; dealing with GLSL versions and driver/ctypes/OpenGL-wrapper issues is a bit of a pain, though...)

(log in to comment)

Comments

Sweeeet.
Very nice aesthetic!
Very, very good. I know it is a lot of work, but don't forget about subtle grass animation.
petraszd: That's what Alex used GLSL for!

I've probably squandered much of that 400 FPS today on drawing curves as inefficiently as possible. Looks nice though and there is still at least 60 left.
intriguing...and sweet ! Gimme more
A clip of what we have so far: http://youtu.be/Ewt47V_b-f8
Linky link: http://youtu.be/Ewt47V_b-f8
Man, this is so awesome!
Why libraries do you need installed and what version?
PyGame and PyOpenGL. We only tested with Python 2.7. We'll try to fix it up for Python 3 tomorrow.
Traceback (most recent call last):
  File "C:\Users\Hugh\Downloads\dandelion-1.0.1\dandelion\run_game.py", line 45, in <module>
    main()
  File "C:\Users\Hugh\Downloads\dandelion-1.0.1\dandelion\run_game.py", line 42, in main
    game.Run()
  File "C:\Users\Hugh\Downloads\dandelion-1.0.1\dandelion\game_loop.py", line 92, in Run
    drawable.Draw()
  File "C:\Users\Hugh\Downloads\dandelion-1.0.1\dandelion\grass.py", line 111, in Draw
    super(Grass, self).Draw()
  File "C:\Users\Hugh\Downloads\dandelion-1.0.1\dandelion\chunked_drawable.py", line 69, in Draw
    self.DrawChunk()
  File "C:\Users\Hugh\Downloads\dandelion-1.0.1\dandelion\grass.py", line 120, in DrawChunk
    glDrawElements(GL_TRIANGLE_STRIP, self.num_idx, GL_UNSIGNED_INT, None)
  File "C:\Python27\lib\site-packages\OpenGL\latebind.py", line 41, in __call__
    return self._finalCall( *args, **named )
  File "C:\Python27\lib\site-packages\OpenGL\wrapper.py", line 764, in wrapperCall
    result = self.wrappedOperation( *cArguments )
WindowsError: exception: access violation reading 0x1C6A3940

:(

Windows 7 python2.7
I had to run it on my other GPU - the nVidia one, using Bumblebee/optirun. When I tried with the Intel GPU I got an error like Cannot get GLX visual.
Any output before the stack trace?

Does it work if you replace None in the glDrawElements call on line 120 of grass.py with "ctypes.cast(0, ctypes.c_void_p)"?

If that doesn't work, something of a long shot, but try replacing the entire line with:

"""
    fixed_glDrawElements = platform.createBaseFunction(
      'glDrawElements', dll=platform.GL, resultType=None,
      argTypes=[GLenum,GLsizei,GLenum,GLsizei],
      argNames=('mode', 'count', 'type', 'indices'),
      )
    fixed_glDrawElements(GL_TRIANGLE_STRIP, self.num_idx, GL_UNSIGNED_INT, 0)
"""

There are more places that would need to be fixed, but if either one works for getting past this call, I can patch the rest of them.

(pyopengl trying to be helpful with array handling in these calls is a pain...)
I think I've managed to reproduce this (Intel card, Windows 7) and Alex has found a workaround. In the UseWindColorMix() function in shaders.py use texture 1 instead of texture 0, like this:

    glUseProgram(self.wind_color_mix_program)
    glActiveTexture(GL_TEXTURE1)
    glBindTexture(GL_TEXTURE_1D, self.wind_tex)
    glUniform1i(glGetUniformLocation(self.wind_color_mix_program, 'wind'), 1)
Your fix didnt work but forcing it to use my dedicated gpu (im on a laptop with optimus) worked fine