The Dink Network

cannot run any version after 1.07

Cursed Blades Part 1: Charlie's Legacy

August 11th 2022, 05:45 AM
dinkdead.gif
millimeter
Peasant He/Him Canada
Millimeter is Wee-Lamm, Recording Artist. :-) 
Though this looks like an amazing offering, the only version I can get to load at all is 1.07, and only in a browser.

Firefox 99.0 MS Edge V:104.0.1293.47 (Official build) (64-bit), yield the same results where 1.07 will allow me to wander on the island but attacking any pillbug simply clears that layer from the screen and freezes the instance.

If there is a newer version of HD, I don't know where to get it, when I start up, it suggests there are no updates.
However, your version 1.14 suggests it needs 1.97.

Loading Version 2.00 in Dink HD V1.95 build 1, Script version 1.10 fails before Dink's initial location is set in start1.c as &player_map = 737;
By resaving all images in 8bpp format I seemed to get closer to starting, it does play 'title.mid' from 'onlau_m.c'.

BY commenting out the 2 'wait(0);' lines in start1.c and adding debug commands to point these out, it fails with,
Stopped cd
First wait 0 skipped
Second wait 0 skipped
Forcing surface unloads via DinkOnForeground
Initting Surface after video change
Processing playmidi command. //this is likely title.mid, which is playing when the crash dialog appears.

I don't currently have a linux instance I can use for non-work things but will take any other thoughts you may have on how to get this to run.
mm
August 11th 2022, 05:57 AM
pq_knight.gif
ExDeathevn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
Hey there!
If you check this forum there's a DinkHD Beta thread posted by Seth with the latest version of it, Or click here.

EDIT: Additionally it also works on FreeDink, which we originally designed the Dmod for, if you still have issues for some reason. There's an install tutorial for that in the Tutorials sticky thread.
August 11th 2022, 08:45 AM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
millimiter, the DinkHD download available on The Dink Network is out of date.

Use this link:

Dink Smallwood HD

Also, I'm surprised when you loaded up the old version, it didn't prompt you to update - it should have.

Please re-download the latest version of Charlie (to get rid of your fix-attempt modifications that may cause issues), and run it on the above, latest verison of Dink Smallwood HD.

I think Seth needs to upload his latest DinkHD on the Dink Network, since the download link points to that old 1.93 version.

EDIT: IF you want, you can now re-download from the Dink Network DinkHD file page, I have added Seth's public 1.97 release on the DN, and posted news to make it obvious to everyone, just in case.
August 11th 2022, 02:22 PM
dinkdead.gif
millimeter
Peasant He/Him Canada
Millimeter is Wee-Lamm, Recording Artist. :-) 
Thank you for the HD update link, Robj ... this has gotten me back on the boat. =D

As for my fix attempts, I had duplicated cleg to cleg-2 so cleanup is simply deleting my changes then renaming cleg-2 back to cleg.

So far, it looks amazing and there seems to be a lot more under the hood than I had expected.

Somewhat off topic but I am working on a tool that would allow us to use a single global &value to function as 31 bools or optionally for multiple small collections. An example would be, if the story line requires finding 8 keys, tracking which have been found, and which have been used, we could track these in 1 &value rather than 24, and still have 7 bits for some other use.

So far the math is very simple, I'm working on building a demo of sorts to let people see if they can break it.
My roadblock so far is working with return, so I don't need a global and purge mechanics for that. Perhaps this HD update will solve that for me as well.
August 11th 2022, 02:49 PM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
"Somewhat off topic but I am working on a tool that would allow us to use a single global &value to function as 31 bools or optionally for multiple small collections"

I think slipdink does something like this in Checkbit.

Also, a little different maybe to what you're creating, but I used an external function in Charlie that lets you jam multiple values in one variable(you can store, and extract), and you can pass info to tell it what base and position to store the numbers in, but it can also store 31 bools
Example using a base-2 value(boolean):

//store a bool(base-2 value) in position 1 in global variable &booleans. Store the value '1'.
external("dc-f", "svar_store", &boolean, 1, 2, 1);


//extract the value in position 1 of &booleans, and save it in &getvalue.
external("dc-f", "svar_extract", &boolean, 1, 2);
int &getvalue = &return;


Here's the store and extract procedures:
//dc-f.c

void svar_store(void)
{
  //&arg1: entire variable
  //&arg2: place (1 = far right)
  //&arg3: base (eg. 10, 100, 1000, etc)
  //&arg4: new number
  
  external("dc-f", "svar_extract", &arg1, &arg2, &arg3);
  &save_x = &return;
  
  int &total = &arg1;
  int &new = &arg4;
  &new -= &save_x;
  int &tms = &arg2;
  
svar_storeloop:
  if (&tms != 1)
  {
    &new *= &arg3;
    &tms -= 1;
    goto svar_storeloop;
  }
  
  &total += &new;
  return(&total);
}

void svar_extract(void)
{
  //&arg1: entire variable
  //&arg2: place (1=far right)
  //&arg3: base (eg. 10, 100, 1000, etc)
  
  int &tms = &arg2;
  int &rest = &arg1;
  int &value;
  
svar_extractloop:
  &value = math_mod(&rest, &arg3);
  &rest /= &arg3;
  &tms -= 1;
  
  if (&tms != 0)
  {
    goto svar_extractloop;
  }
  
  return(&value);
}


Something like this was first demonstrated by user 'Someone' I think.
I took his example and expanded on/fixed it.

EDIT:
Also you can scrap global variables altogether, if you want, when storing/retrieving values. Just use editor_seq instead. There's 99 editor sprite number slots per screen (whether the screen exists or a sprite is attached to a number does not matter, you can still store and access the editor_info, AND you can access editor info remotely, and pull info from any screen, I did that in Charlie to save globals).
Editor_seq has a MAX valid value of 65535, so you could store 16 bools in there, or even 4 base-10 values, using the above store and extract procedures.
If you dedicate one blank unused screen to editor_seq values using this method you could store/retrieve over 1400 bools, or nearly 400 base-10 values in one screen, without ever touching a global variable.
August 11th 2022, 08:20 PM
seth.gif
Seth
Peasant He/Him Japan
 
Thanks for updating Dink on the site. BTW, as far as I know I don't actually have access to update Dink HD's entry with a newer version here - at least I didn't see any way to do it, I could just be dumb.
August 11th 2022, 09:45 PM
peasantmp.gif
Skurn
Peasant He/Him Equatorial Guinea duck bloop
can't flim flam the glim glam 
ya gotta upload it through the contribute page
August 12th 2022, 07:38 AM
dinkdead.gif
millimeter
Peasant He/Him Canada
Millimeter is Wee-Lamm, Recording Artist. :-) 
Replying to your edit,
I haven't tried yet with the newest version of HD, I don't have freedink installed yet, but I've had mixed results storing values in unused sprite params. I admit I am inexperienced with this so I will give it a solid look. I will also attempt measure the performance hit of accessing a remote variable housed by a sprite param, especially if it relies on another external procedure that may access another remote variable.

It is an intriguing thought, the true hurdle may be in the parsing engine itself in that we would love to write oop procedures, but script parsing is linear.

My efforts so far avoid using base10 values, noting in binary math we can abuse the remainder after a Division operation to determine which bits are set.

Snippet for your opinion, I will make something more durable over the weekend after work.

bitmanip.c
void main (void)
{
//lets make a multi-bool
make_global_int("&mm_flags", 0);

//Give it a value for testing purposes, these 2 lines can go away after testing.
//&mm_flags = 1048575; The number below has bit 4 unset, so bits 1-9 are of interest here.
&mm_flags = 503;
kill_this_task();
}

void bit_value ()
{
// &caller = bit_value([int]);
// The int value is received in &arg1 in the called function
int &i = 0;
int &j = 1;
int &bit_value = 0;
iptr:
&bit_value = &j;
&bit_value /2;
&i += 1;
&j * 2;
if (&i < &arg1) goto iptr;
return (&bit_value);
kill_this_task();
}

void bit_check ()
{
//external("bitmanip", "bit_check",[your variable], [your bit]);
//This will return 1 if the bit is ON or set, 0 if the bit is OFF or not set
//This function is still a little messy, I'll clean it up a bit.
int &i = &arg2;
int &crap1 = &arg1;
notyet:
&crap1 / 2;
&i -= 1;
if (&i > 1) goto notyet;
int &crap2 = &crap1;
&crap1 / 2;
&crap1 * 2;
say_stop("&crap1 and &crap2", 1);
&crap2 -= &crap1;
//if &crap2 = 1, bit is set ... if ), is not set.
say_stop("&crap1 and &crap2", 1);
}

void test_bit_values ()
//You can call this function to confirm that all bits will return the correct bit value.
//Not much use, other than for testing the other functions but...
//You can write these down to know what to [/ or *] by to effect a specific bit, if you like base10 math =D.
{
int &caller = 0;
int &i = 1;
loop:
&caller = bit_value(&i);
wait(1);
say_stop("Count &i Bit is worth &caller", 1);
&i += 1;
if (&i < 32) goto loop;
kill_this_task;
}

August 12th 2022, 04:01 PM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
" haven't tried yet with the newest version of HD, I don't have freedink installed yet"
If you are using an old version of DinkHD or vanilla 1.08, then yes, you will be experiencing performance issues when using a lot of external calls. But there is no problem when using FreeDink or the newest version of DinkHD - works reliably everytime.

"I've had mixed results storing values in unused sprite params."
"I will also attempt measure the performance hit of accessing a remote variable housed by a sprite param, especially if it relies on another external procedure that may access another remote variable."
I do it a lot in Charlie's Legacy. You can literally do it every 5 seconds if you want, even while the player is mid-battle and they won't notice a difference at all(again - use the latest DinkHD or FreeDink)
Example:
dc-f.c
void remoteseq(void)
{
 //check or set editor_seq value remotely on any screen.
 //&arg1 = map#, &arg2 = editor-sprite#, &arg3 = value(-1 to retrieve).
 int &oldmap;
 int &savevalue;
 &oldmap = &player_map;
 &player_map = &arg1;
 &savevalue = editor_seq(&arg2, &arg3);
 &player_map = &oldmap;
 return(&savevalue);
}


So using the above, to set a value of '1' on editor_seq 5, screen 20:
external("dc-f", "remoteseq", 20, 5, 1);


And to get the value:
external("dc-f", "remoteseq", 20, 5, -1);
int &getvalue = &return;


As I said, you can do this as much as you want, it won't affect the players current screen, this is because all that's required to access editor_info is to change &player_map, but no change actually happens on the play-able screen without doing load_screen, draw_screen, draw_hard_map.

Replying to your snippet
Nice. I think SlipDink's Checkbit probably does a similar thing, in a different way, useful stuff. I've always used the svar_store and svar_extract stuff tho for my Dmods, but I'll check it out again when it's done.