Progress

1 view
Skip to first unread message

Jonathan Hollocombe

unread,
Jun 24, 2010, 5:02:38 PM6/24/10
to gumms-r...@googlegroups.com
Hey Gumm,

After a (not so) brief respite I've picked up where I left off and
made some progress.

I've gone back to the drawing board in terms of project layout, it was
getting to be too much code to handle with some kind of structure.
I've even implemented a few tests, though not as many as should be
there.

I've managed to fix my speed issue! I can now load a level with
40,000+ tiles and get about 60 fps.

I managed this in two phases:
1. I found the smallest Rect that surrounds the iso_screen, where
iso_screen is the screen rectangle transformed into "model"
coordinates. This allows me to use colliderect to decide which tiles
to update which sped things up alot. There was still some slow done
with large number of tiles though, as each tile needed to be tested.
2. I fixed this problem by implementing a 2D linked grid collection.
This allows me to start at any tile and iterate outwards in all
directions, stopping in a direction when a tile fails the test.
Effectively, this mean that a constant number of tiles is tested no
matter how many tiles are loaded in the grid. A downside of this is
that it can take a while for the level to load (the grid is expensive
to create, fast to use). I tried to load a level with 1,000,000+ tiles
but gave up waiting :-)

I've also made update to the physics which I think work quite well and
implemented a level loader with some walls that I made in Blender.

Let me know what you think, I'm wondering what to concentrate on next
and I'd appreciate any ideas.

p.s. The controls are:
Click: Move
x: Fire
Space: Jump
p: Switch panning on/off
ESC: Quit

IsoGame.zip

stabbin...@gmail.com

unread,
Jun 29, 2010, 9:13:04 PM6/29/10
to Gumm's RPG Cloud
Nice work. I always enjoy seeing new solutions. I still don't
understand matrix operations. =)

I was tearing through the OpenGL red book, then I got sick and
literally felt like doing nothing for two weeks. By the time I came
out of it I'd lost my momentum and have seriously been lacking in the
inspiration department. But I do have quite a few OpenGL demos
converted from C to Python. You might find these much easier to follow
than the NeHe and other more advanced ones. The files are named in
numeric order of the red book chapters, building on previous lessons.
I got interrupted right before the most interesting topics, texture
mapping and selection/feedback.

Files will follow in the next email.

Gumm

B W

unread,
Jun 29, 2010, 9:16:11 PM6/29/10
to Gumm's RPG Cloud
Here are the red book examples I converted. Hope you enjoy them.

Gumm
pyopengl.zip
Reply all
Reply to author
Forward
0 new messages