[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] Introducing Pyzzle
> 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>
<AREA SHAPE=rect COORDS="3,5,109,44" HREF=unlock_door>
<AREA SHAPE=rect COORDS="200,50,250,100" HREF=talk_to_guard>
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