The Dink Network

Before...

August 13th, 06:14 PM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
The dmod I started that I thought I might finish in time for the recent "Plot Twist" dmod contest, is still being worked on.

I mention this to encourage others in the DN, so that they know that there is still something coming, and so they will not fall prey to despair over this apparent "August Slump" of reduced interest in the DN.

The story is one of Dink's childhood, and his first adventure. It involves pigs and ducks, strange avian avatars of an evil presence, a quest that he is supposed to finish before dinner time, and a surprise that sends him off ( through oblivion ) to another quest altogether. It has about 175 scripts and is growing. There remains much in the way of challenges, screen designs and surprises to work on.

There are odd new magic items, unique challenges to Dink's very survival and interesting items that will need to be kept in his back pack.

At this time, I hesitate to predict when it will be ready to play, but insist that I am making progress every week. So take heart fellow Dinkers!
August 13th, 07:15 PM
dinkdead.gif
Skurn
Peasant Male Equatorial Guinea xbox steam duck bloop
can't flim flam the glim glam 
im doin a dmod with a plot twist too, so the contest should come back so i can defeat you
August 13th, 09:03 PM
duck.gif
toof
Peasant Male
I disagree. 
im doin a dmod with a plot twist too

If you're talking about the "Dink goes dating", and if the plot twist is that Dink actually manages to get a date, but fails to obtain the viagra... so he rents out some Talporn and... uhm... nevermind
August 14th, 12:39 PM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
@Skurn:
> im doin a dmod with a plot twist too, so the contest should come back so i can defeat you

Okay then! Go to it and impress us all! You could perhaps start with one of the Triple Trouble Triumverate. Let me know if you need any scripting help.

But, perhaps you were "only joking"?
August 20th, 12:26 PM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
Progress continues, though release is likely to be many months away, hopefully before this year ends. About every other day I do more work on it. As always, I strive to make some aspects of play and story line unique. While the base story line is not one that is completely unheard of compared to a handful of other dmods, I can certainly promise that there will be some challenges in game play that are altogether new and some story elements that will be different.

There will be (optional) in-game-assistance with some of the situations Dink is confronted with, plus the usual walkthru.txt file that I generate.

There will be a few new graphics (including a few made by me) and a generous use of existing contributions from other members of the DN. Oh, and also there will be a bit of humor.

Is anyone else working on a dmod? IF so, please start (or update) a section of the forum dedicated to that dmod's progress.

August 20th, 04:37 PM
dinkdead.gif
Skurn
Peasant Male Equatorial Guinea xbox steam duck bloop
can't flim flam the glim glam 
ok
October 14th, 05:20 PM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
I'm up to 225 scripts and I expect there will be more. I've added some fun graphical effects. I've continued to make progress each week and have added to the various trials and tests that Dink must go through to reach his goal. I think that I have even (sort of) "discovered/invented" (*) a way to store a surprising amount of data (up to 31 true/false flags) in one integer in DinkC. I may make some kind entry into the development section of the Dink Network to demonstrate the technique later, if other Dinkers think that would be worthwhile. Perhaps others will improve upon the technique.

In upcoming weeks (not months I hope) I'll take some screenshots and make them available if anyone is interested.

Other aspects of the game:
1) There are (almost) no side quests!
2) Dink is just a boy.
3) Dink gains a unique friend who can help him on his quest.

(*) I know of no one else who has done this, but feel free to correct me if I'm wrong.
October 14th, 05:56 PM
duck.gif
toof
Peasant Male
I disagree. 
to store a surprising amount of data (up to 31 true/false flags) in one integer in DinkC

If one integer has 32 bits... I might have a clue how to access that information in other languages, but DinkC can't divide. I'm curious about this. Still, I have to admit, only 31 true/false flags out of possible 32? Meh...
October 14th, 06:22 PM
custom_king.png
redink1
King Male United States xbox steam bloop
A mother ducking wizard 
DinkC has always supported division and multiplication, I think.

It sounds like SlipDink may have 'rediscovered' SuperVars. I thought I discovered this too, but if I recall correctly, Paul and someone had used it before.
October 15th, 02:12 AM
duck.gif
Toof
Peasant Male
I disagree. 
Multiplication, yes. But if an engine only stores integers... I've never actually bothered to check out the effects of diving. Plus, Im also not sure if it is possible.
October 15th, 06:15 AM
custom_king.png
redink1
King Male United States xbox steam bloop
A mother ducking wizard 
Integer division drops the remainder, just like in other languages (like real C). I think I added a modulo function in v1.08 so you can also get the remainder separately if you want.
October 15th, 12:57 PM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
@Toof:
If one integer has 32 bits... I might have a clue how to access that information in other languages, but DinkC can't divide. I'm curious about this. Still, I have to admit, only 31 true/false flags out of possible 32? Meh...

Yes, I did not see how division would work for this method of data storage. I don't divide. I use subtraction mostly. I'll upload my checkbit.c code for review by those interested in the near future. Perhaps the modulo math redink1 made available would help, but I did not know about that being available in DinkC at the time I came up with my technique.

@redink1 & all others:
The technique (for 31 bits of info in a DinkC integer) I used is rather crude and computationally intensive, but it does work. (Well, it seemed to work reliably until I tried to test it again today.) In fact, it probably should not be used unless you really need a lot of binary (true/false) information so that you can make the use of this technique worthwhile compared to the overhead of the local variables needed to get my [external("checkbit", "main", &arg1, &arg2, &arg3);] logic to work.

Anyway, I had fun doing coming up with this approach (or at least deluding myself into thinking that I had come up with it), and I must admit, that was mostly the reason I did it. I looked at the "SuperVar Source" a while back (and again just this morning) and even used similar logic (dividing/multiplying by 10's) for a different part of some other code I used for "Before...", which I (of course) noted in my "credits.txt" file. You could certainly say that my binary data storage technique was inspired by that method, though (as you my guess) I wanted to take it further.

I'd be delighted if someone (who was much more mathematically inclined than I) could make the method I use more efficient within the constraints of DinkC, replacing some of the internal code within my checkbit.c module. Since there seemed to be some interest in what I did and how I did it, I'll clean up, throughly comment and release the code to the DN shortly (after I hunt down and smash a bug I just discovered in the checkbit.c module!).
October 15th, 01:52 PM
duck.gif
Toof
Peasant Male
I disagree. 
@SlipDink
You can easly google the algorithm for turning ints to bits. Its a simple do-while loop, and if DinkC supports checking whether the remainder is 0 or above, than it should be possible. I never tried to make and pass an argument to some dinkc function. But that should do it. Declare an integer of 4 billion something (max value of int), and pass how many times you're gonna divide it by two. Every step gives you a bit. Id have to sit down, and check that though. I forgot the algorithm myself.
October 15th, 02:25 PM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
@Toof:
You can easly google the algorithm for turning ints to bits. Its a simple do-while loop, and if DinkC supports checking whether the remainder is 0 or above, than it should be possible. I never tried to make and pass an argument to some dinkc function. But that should do it. Declare an integer of 4 billion something (max value of int), and pass how many times you're gonna divide it by two. Every step gives you a bit. Id have to sit down, and check that though. I forgot the algorithm myself.

Please feel free to upload some DinkC file that demonstrates how this would work within the limits of DinkC! I had trouble using division successfully and so switched to another technique. But, I'm not proud! If your technique works better I'll use it.
October 15th, 03:12 PM
duck.gif
Toof
Peasant Male
I disagree. 
Will do. Some things I might have overlooked, plus I have to test division myself. Im thinking about this while driving in the bus...
October 17th, 05:37 PM
duck.gif
toof
Peasant Male
I disagree. 
@redink1
After examining SimonK's super-var file, all I can conclude is that he hasn't made a dmod for quite some time, because he's busy optimizing fuel injection control software for long-range rocket engines...

@SlipDink
After examining the idea about turning numbers into binary representation, well, that has some shortcomings. Since the largest 32 bit int value is 2.147.483.647, or written alphabetically twobillionandonehundredthousendandfortysevenmillionsfourhundredandeightythreethousandssixhundredandfortyseven (fun fact, we use long scale number naming system in my country, so the translation would be different)... Ugh, where was I...?

Oh, right!

Since that number holds 10 digits, our binary representation would also hold the maximum of 10 digits, because it's technically (not to mention literally) still an integer.

The only reasonable thing to do, is to make an algorithm that will count up to certain point, and extract that exact point. Say we have a number 12 (1100 in binary), and some function in DinkC, dinknary(), where if you plug in... say... 3, it'll get what's on position 3 (duh)...[1101].

However, I don't see the point bothering with this, since changing the number will dramatically change its binary form... unless you need just static boolean values stored in one number...

That being said (and written, mind ya), I'm still curious about what you've come up with.
October 18th, 10:49 AM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
@toof:
I just spent a day or so working on the last few bugs (they were boundary related errors) in the DinkC code for this "way to store a surprising amount of data (up to 31 true/false flags) in one integer in DinkC", which I call checkbit.c. I'll keep testing it a bit more to make certain I've coded to trap all the errors that snuck in; but for now it certainly seems to be working.

Once I'm a bit more confident that it works 100% reliably in DinkC, I'll upload it, a readme.txt about how to use it and a key-67.c module (press [C] to test checkbit.c) as checkbit.zip for others to criticize and/or enhance.



So, how are you coming with your DinkC "simple do-while loop" passing in an argument that tells us "how many times you're gonna divide it by two", etc.? I'd certainly be willing to use anything that works better than my code which I know is rather crude and computationally intensive.

October 19th, 01:44 PM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
@redink1:
I've uploaded checkbit_1.0.zip. Please make it available to all at your convenience.
October 19th, 01:53 PM
duck.gif
toof
Peasant Male
I disagree. 
DinkC "simple do-while loop"
The only programming tool I have is Code-Blocks (it's actually a full IDE), and I'm not familiar with the debugger for it. Plus an awfully slow connection doesn't help. I didn't have the time to test these things. I've written a single script in C (which I'm also not familiar with), and so far the output is rotten. Will continue to work on it.

Edit
I don't know where modulo function is. Basic idea is this:

Again I'll use 12 (1100)
x / 2 = some_number + remainder
12 / 2 = 6 + 0
6 / 2 = 3 + 0
3 / 2 = 1 + 1
1 / 2 = 0 + 1
As you can see, the remainder list is a reverse binary form. I don't think we need to reverse it back. It'll function in pretty much the same way, but without complications. Sooo:
void hit(void)
{
	int &number = 12;
	int &count = 3;
	int &crap = &number;
	loop:
	if(&count > 0)
	{
		&crap % 2; // this is where modulo function should be
                &crap / 2;
		&count -= 1;
		say("&crap", 1);
		wait(200);
		goto loop;
	}
	else
	{
		say(&crap);
	}
}

And a pseudo DinkC:
void binary(&counter)
{
        int &crap = &global_var
        // &global_var is your global variable, so it shouldn't be
        // passed as parameter since it is accessible everywhere... right?
loop:
	if(&counter > 0)
	{
                &crap / 2;
		&count -= 1;
		say("&crap", 1);
		wait(200);
		goto loop;
	}
	else
	{
                // another helping global var to catch the output
		&another_global = modulo(&crap);
	}
}
October 20th, 05:27 PM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
Okay, so toof.c (see this below variant of your DinkC code), now runs in DinkC; but how do we set, reset and test various bits within a DinkC integer using your code? I must be missing something here.

// This is a variant of toof's DinkC "simple do-while loop" DinkC code:
void binary()
{
	int &counter = &arg1;
	debug("toof: counter=&counter; status_bd=&status_bd");
	int &crap = &status_bd;
	// For my tests, I used &status_bd as the global variable.
	// Since it is accessible everywhere, it is not passed in.
loop:
	if(&counter > 0)
	{
		&crap / 2;
		// I assumed you meant to use the passed in value &counter
		// here, not the (apparently undeclared) value &count.
		&counter -= 1;
		debug("toof: counter=&counter; crap=&crap");
		wait(200);
		goto loop;
	}
	else
	{
		// I found the DinkC modulo math function in
		// the "DinkC Reference v4.0" help file! I also
		// changed the code to return a value via normal 
		// DinkC methods instead of the slightly more
		// efficient method (but *somewhat* less safe (?)
		// if more than one script is calling this code at
		// about the same time?) of using a global to
		// return the value.
		&crap = math_mod(&crap);
		return(&crap);
	}
}

For example, if we set &status_bd to 12 and pass in the value 8 as the &counter parameter, it would be nice if we got back some indication that the "bit 3 (value 8)" is set in &status_bd. We invoked "external("toof", "binary", 8);". Below are the results we find in DEBUG.TXT.

Dink:toof: counter=8; status_bd=12
Dink:toof: counter=7; crap=6
Dink:toof: counter=6; crap=3
Dink:toof: counter=5; crap=1
Dink:toof: counter=4; crap=0
Dink:toof: counter=3; crap=0
Dink:toof: counter=2; crap=0
Dink:toof: counter=1; crap=0
Dink:toof: counter=0; crap=0


If we do the same thing for &status_bd (setting it to 12) and invoke "" and then check "bit 3 (value 8)", we get results like those show below which tells us that bit 8 is set, as we would expect.

Dink:CHKBIT: do operation(-1) on bd=12(2: status_bd) using which=8)
Dink:CHKBIT: do operation(-1) using which=8; wrkbit=1073741824)
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=536870912
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=268435456
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=134217728
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=67108864
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=33554432
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=16777216
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=8388608
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=4194304
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=2097152
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=1048576
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=524288
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=262144
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=131072
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=65536
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=32768
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=16384
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=8192
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=4096
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=2048
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=1024
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=512
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=256
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=128
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=64
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=32
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=16
Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=8
Dink:CHKBIT: op:query --> bit 8 was found set in 12.
Dink:CHKBIT: done