Tuesday, January 03, 2006

A four armed lover.

I've been cleaning the code and killing off bugs this morning.
It's painfully slow work but I feel like my pace has improved.

The first bug meant sometimes people could be rendered twice all over the place. I hadn't even noticed this potential problem until I started routing through the code. I was looking to solve a problem where changing maps caused the image to flicker. This was a real basic problem that should never have been.

All games with intelligent actors should generally have two loops per game frame.

1. Process All the Actors (movement, death ..)
2. Render

For some reason that I don't understand, I had at some point decided these where best together

1. Process+Render

So I had two maps.
The first I processed and rendered.
Then I processed the second map - here a character moved a went into the first map.
Result - character wasn't rendered for a frame.

Very simple very stupid.

So that's fix. The second problem I'm working on now is the camera that messes up after crossing too many map boundaries. Once this use to work. I've love to trap it down with unit tests but currently the codes too muddled and requires too many extra classes - it's something I'll work on uncoupling.


Tags:
| |

2 comments:

Anonymous said...

Love your blog. I'm looking to integrate lua with pocket pc/compact framework. Do you know of anyone who has ported the lua.net to compact framework?

balaam said...

I don't know but searching the lua mailing lists brings up this:

Martin Kendall wrote:
> I wondered if anyone had investigated the possibility of building LuaINterface
> so that it can run on Windows Mobile/Pocket PC. This would enable people to
> write PDA/Phone applications without having to purchase Microsofts Visual
> Studio.
> I know this would not have been possible using Compact Framework 1 (Only c#
> and VB apps could call the Compact Framework), but with Compact Framework 2
> (using Visual Studio 2005), it ispossible for C++ to call the Compact
> Framework on a Windows Mobile.
>
> I wondered if anyone had the Visual Studio 2005 tools, so that this could be
> investigated?
>
> Regards,
>
> Martin Kendall
>
>
If the compact framework can permit PInvoke calls and Reflection,
then LuaInterface will be usable. If it doesn't allow for
Reflect.Emit, then you will not be able to register Events,
Delegates, or Subclasses (creating a lua table that acts as a
subclass to a .Net class) IIRR.

C++ calling the Compact Framework is relatively irrelevant...
well... unless you want to create an application entirely in Lua and
don't want to write a .Net wrapper around LuaInterface (this would
be relatively simple, in the startup of the app, just have it load
up a Lua state and execute the file you want it to).

I haven't had any experience with mobile devices, however, but
whenever I get my hand on one, I'd definitely work on getting Lua
and .Net working.


I couldn't find anything else sorry :(