[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Miniwindows
. . -> [Subject]  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] Refresh page


Posted by Asmodeusbrooding   (22 posts)  [Biography] 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.
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] 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
[Go to top] 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] Refresh page

Go to topic:           Search the forum


[Go to top] 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.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]