[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Re: Interaction on the map

From: Kai Sterker
Subject: [Adonthell-devel] Re: Interaction on the map
Date: Sun, 3 May 2009 19:28:56 +0200

On Sun, Apr 26, 2009 at 9:38 PM, Kai Sterker <address@hidden> wrote:

> Anyway, what remains now is to integrate the dialogue widget, so that
> this gets opened instead of just printing the note above.

Done. Sort of. The visuals could use a little polish (to look more
like the interface we had in v0.3), but lets not be too picky right
now :-). That aside, it's still broken on ppc. An of course, I still
have to finish the dialogue.

To get it working as desired, I did have to make some modifications to
the GUI code:

First of, we cannot have void arguments to callbacks if we want to use
them from Python. Without type information the object cannot be
converted from C++ to Python. So I did remove the argument to the
dialogue end callback. We'll lose a bit of flexibility that way, but
nothing we couldn't work around somehow.

Second, I've added a window manager that takes care of decoupling
widgets from the place where they are created and the main loop where
they are drawn. It also takes care of input. It's fairly basic right
now and especially lacks knowledge about a widgets position on the
screen. I was unsure whether to add this to the widget itself, or
whether there should be some container class to store that
information. Since there's only one window right now, it's not a big
issue though.

> One fairly large issue has come up again, however: there's no way to
> get at the map instance from anywhere outside map views or things
> placed on the map. I think we need to decide how we want to handle
> maps. Have a global map manager that can return a map by its id? Have
> only one global map? Have references to the map for more objects?
> Proposals welcome.

This has again been biting me. The problem is, I have a character id
from rpg side and need to get the matching representation on the map.
But I don't have the map.

For now I resorted to setting the map instance in the rpg character
script from within worldtest. But that can only work while part of the
game data is still hardcoded there. Later we'll need to come up with
something better. I just can't think of anything right now, as I am
not sure what we will really need in the end. Perhaps it's better to
code some more map interaction first (with characters and items!) to
find out what the requirements are.


P.S.: As far as the v0.4 alpha 3 release is concerned, I am pretty
confident to get it out this week :-).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]