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

Re: [pygame] Introducing Pyzzle



Hmm could be a possibility.
One I noticed in Myst/Riven is that many of the images share common hotspot 
maps. So i was thinking about writing a hotspot class, if the image in 
question used a std map only a link to the next image is needed for each 
hotspot. For example:

hotspot.left(goto image21)
hotspot.right(goto image30)
hotspot.forward(goto image19)

if a custom map was needed then it could be:
hotspot.custom(get custom rect(), do action, load cursor)
etc.
I need to read up on python classes and decide how best to do it.
But it seems the way to go.
Thanks 
Andy

 

On Thursday 28 June 2001 04:56 am, you wrote:
> > Since I'm new to pygame and game developing I thought id ask you how to
> > go about coding Myst style interface. Which really just is lots (100s) of
> > pics with there own hot spots and some simple logic for the puzzles.
> > That's a vast over simplification, you have all played Myst so you know
> > what's involved. Any ideas?
>
> creating the images is gonna be the grunt of the work. it will be
> best if you have your story/maps/game all preplanned ahead of time,
> so you are only creating the images you need (and only doing them once) :]
>
> as for creating the screens, it should be very easy. a (potentially)
> clever idea might be to use a simple HTML image map editor. it lets you
> load an image and place clickable areas on the image. i'd just stick
> with rectangular areas, that'll make things easiest. you could do
> something sneaky like make the URL for a clickable area the name of
> a function to call in your python code.
>
> the html would be simple to parse and there are some decent html map
> editors out there. the html code could looks like this...
>
> <img src=cave_entrance.png usemap=#cave_entrance>
> <MAP NAME="cave_entrance">
> <AREA SHAPE=rect COORDS="3,5,109,44" HREF=unlock_door>
> <AREA SHAPE=rect COORDS="200,50,250,100" HREF=talk_to_guard>
> </MAP>
>
>
> you could create your whole game data on a single html page like that.
> of course, you may want to add some sort of 'condition check' to make
> sure the "hotspot" is available. perhaps put more data into the ALT tag...
>
> <AREA SHAPE=rect COORDS="200,50,250,100" HREF=talk_to_guard
> ALT=is_guard_alive>
>
>
> anyways, there's lots of options, this may not be the best, but
> at least worth looking into.
>
>
> ____________________________________
> pygame mailing list
> pygame-users@seul.org
> http://pygame.seul.org
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org