Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: CorCAD on Tue 20/01/2004 19:40:06

Title: World Map?
Post by: CorCAD on Tue 20/01/2004 19:40:06
I've just joined the Forums after lurking for a month or so. I've finally found a topic that wasn't dealt with in too much depth. I'm thinking of creating a world map which has various town and points of interest, similar to an RPG. I was then thinking of having the towns and such regular size.I've started my game with a 640X480 resolution, but I was thinking of making the world map bigger by 4 to 6 times so it will scroll . Will this work? If not I may just trash the idea. Any comments will be greatly appreciated.

Thanks,
CorCAD
Title: Re:World Map?
Post by: Ishmael on Tue 20/01/2004 19:55:57
Ofcource it would. If you draw your background that big and import it to a room, the room scrolls when the main character moves.

If you want to make the map without the main character in it, and so that it scrolls when you move the mouse to the screen edge, just do something like:

in room repeadetly_execute:



if ((mouse.x > 630) && (character[GetPlayerCharacter()].x < game.room_width - 160)) {
character[GetPlayerCharcter()].x++;
}
if ((mouse.y > 470) && (character[GetPlayerCharacter()]. < game.room_height - 120)) {
character[GetPlayerCharcter()].y++;
}
if ((mouse.x < 10) && (character[GetPlayerCharacter()].x > 10)) {
character[GetPlayerCharcter()].x--;
}
if ((mouse.y < 10) && (character[GetPlayerCharacter()].y > 120)) {
character[GetPlayerCharcter()].y--;
}



I think...
Title: Re:World Map?
Post by: CorCAD on Tue 20/01/2004 20:00:36
Right on! I figured it was do-able. Just making sure, as I'm drawing the BG at work then taking them home where AGS is. Will post back if I got any more questions. Thanks for your help.

CorCAD