Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Explored rooms list

Explored rooms list

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Lerkista   (57 posts)  Bio
Date Sat 20 Sep 2014 06:39 PM (UTC)
Message
Hi

Any idea how i can implement this?

I want my map only display explored rooms, something like aardwolf

In LPC i can do it easily with "mappings", you can do things like:

mapping explored;

explored = ([]);

explored[21000] = 1;
explored[21001] = 1;
explored[21002] = 1;

and can search values as simple as:

a = 21000;
if( list[a] )
return "room explored."

Anything like that??

Or any idea to do this??

I don't know if using an array to store the vnums and check the entire list with every room everytime i show the map can make the mud slower
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 20 Sep 2014 08:40 PM (UTC)
Message
On the client side or the server side? On the server side you would need to remember, per player.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Lerkista   (57 posts)  Bio
Date Reply #2 on Sat 20 Sep 2014 09:11 PM (UTC)
Message
Hi

In the server side, so i need to add a variable to the player to store all the explored vnums, buy i don't know how to make it with less resources
Top

Posted by Meerclar   USA  (733 posts)  Bio
Date Reply #3 on Sun 21 Sep 2014 04:26 AM (UTC)
Message
There's not a less resources option. Every option is at least a linear growth per player per room in memory utilization as your (ideally) database of explored rooms expands with player base growth and exploration of the realm.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


15,433 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.