The Dink Network

Reply to show_bmp and player_map

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
November 22nd 2013, 08:35 AM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
For those interested, I'm reporting on a small test I did with show_bmp.

While talking to Magicman some time ago, we thought it should be possible to put the marker in an arbitrary position by changing player_map before calling show_bmp. Things are slightly more complicated, and then quite a bit more.

Firstly, the marker is set depending on the last non-indoor map screen that was loaded. This means that it will work, as long as you don't make any map screens "indoor", and call load_screen before show_bmp. You will want to call load_screen again after resetting the player map, or you have the wrong sprites loaded. Also, this really does reload all your sprites, so they will be in the positions as if you just entered the screen again. That may or may not be a problem. You may worry that all sorts of scripts are being called, but this doesn't seem to be the case; that happens at the draw_screen call (which you therefore may want to do when returning to the screen where Dink really is).

However, there is a much bigger problem. When trying load_screen while player_map is pointing to a nonexistent screen, the engine can crash. So to make this work, all map screens that may be (ab)used this way must exist. This is easily solved, of course, but it isn't nice at all. It also hugely inflates the size of the dmod (unless your map is using almost all map screens anyway), because map screens are stored in an extremely wasteful way.

Because of this, I'm not sure if I'll be using the feature in my dmod. But I might, just because it's cool.