The Daily Click ::. Forums ::. Klik Coding Help ::. Map screen issues
 

Post Reply  Post Oekaki 
 

Posted By Message

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
3rd September, 2005 at 21:02:51 -

Im making a game with a screen scrolling system

I want to make a map screen that will alow you to view only the screens you have visited, Theres alot of screens and the way im doing it takes 1000's of active objects and a stupid amount of code.

Is there an easy way of doing this, ive searched for anything similar but found nothing, some advice or a link to somthing youve seen would be great!


 
n/a

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
4th September, 2005 at 02:29:19 -

http://bellsouthpwp.net/r/e/realnoyb/map.zip (MMF, requires Array extension)
Basically, what I did was setup an array, with its indices corrolating to the different rooms. When you enter a room, the value of its corrolating index is set to 1 instead of the default 0. At the map screen frame, put all of the different room icon objects into a group, and set their alterable value A (in the frame editor, b/c they all should be different objects) to the room's unique value as stated earlier. Start a loop for the number of group objects there are onscreen.
On loop "display"
+Alterable Value A of Group 0 is equal to LoopIndex("Display") (To set focus. Note: Use the group 0 event, not compare 2 values)
+ ValueAtX("Array",LoopIndex("Display")) = 0
:Make group 0 invisible

I did a little extra in the example file (involving showing current room), but that's the gist of it.

 
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames

Fifth

Quadruped

Registered
  07/05/2003
Points
  5815

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
4th September, 2005 at 05:37:35 -

You could use the Text Blitter to display the map. It's very effective for displaying arrays of tiles while using very few objects.

...And it might also be easier to store the data into an INI instead of an array. That way you could read the map data as a series of strings (which could feed right into the Text Blitter), and you could easily expand it to suit any size of map.

...I know it's all possible, but I haven't got an open-source example just now...

 
Go Moon!

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
4th September, 2005 at 06:22:33 -

Thx for the fantastic exmple noyb, thats exaclty what i was trying to do, i will be crediting you for the help.


 
n/a
   

Post Reply



 



Advertisement

Worth A Click