Gammon Forum
Entire forum
MUSHclient
Miniwindows
Mapper(Fiendish): drawing rooms in batches
Mapper(Fiendish): drawing rooms in batches
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Asmodeusbrooding
(22 posts) bio
|
Date
| Tue 05 Nov 2019 05:26 AM (UTC) Amended on Tue 05 Nov 2019 05:46 AM (UTC) by Asmodeusbrooding
|
Message
| I found this code from fiendish, here:
function draw_next_batch_of_rooms()
https://raw.githubusercontent.com/fiendish/aardwolfclientpackage/905df5b79046be9351d8f2a300d7ba1c8a7b1d52/MUSHclient/lua/aardmapper.lua
I have put it into my mapper.lua, featured here:
https://www.dropbox.com/s/cy3kdccxbyeagpk/cleftmapper.lua?dl=0
How exactly shall I implement this code? I've pasted it into my mapper, and trying to figure out the next step.
I need to add a timer to prevent the rooms from drawing hotspots while I'm in a speedwalk, right?
Wondering what you originally had in mind, fiendish.
I'm drawing quite a bit of images in the map, so not drawing every single room as a hotspot during speedwalk would probably help with speed quite a bit.
Looking for guidance, since this is your code.
I obviously don't have the metrics part in my game, continent wise, but as far as I saw that shouldn't matter much?
Let me know.
All help is appreciated. | top |
|
Posted by
| Fiendish
USA (2,514 posts) bio
Global Moderator |
Date
| Reply #1 on Tue 05 Nov 2019 01:26 PM (UTC) Amended on Tue 05 Nov 2019 01:28 PM (UTC) by Fiendish
|
Message
|
Quote: I need to add a timer to prevent the rooms from drawing hotspots while I'm in a speedwalk, right?
Not a timer. mapper.running is a variable that gets set true/false in my plugin when I detect that the player is running or not.
Quote: Wondering what you originally had in mind, fiendish.
That code delays doing work that isn't important. If you're in the middle of a speedwalk, you don't need to see as far and none of the hotspots matter because your surroundings are going to change immediately anyway.
So it does a few things:
1. Limits how much it draws at any one time to what can be done in 0.08 seconds because Aardwolf speedwalks go quite fast.
2. Keeps a record of which hotspots should get drawn but then only draws them at the very end (#rooms_to_draw_next == 0). |
https://github.com/fiendish/aardwolfclientpackage | 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.
8,136 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.