The Dink Network

A "high-score" based Dmod

June 5th 2020, 05:54 PM
slayer.gif
Exzcimus
Peasant He/Him Philippines
Change is constant, but Constants do not change. 
My posted shit about Dink RTS such as this andthat. I'm tellin ya, I GAVE UP ON IT!! like 1.65 million years ago

The reason is that the conditions I have planned are almost impossible to achieve.

I had some trouble with the editor type properties of such sprites that were meant to disappear after moving to another screen. They were multiplying.

Had lots of problems with enemy spawning patterns, and whenever a missile hits an enemy sprite, it then targets Dink. Had problems with structure building too. No good!

I thought it was going to be easy...

BTW, I started making an improved combat system, (started a few months ago), which is actually a thousand times more successful than my efforts in the RTS experiment, and I won't give up on it this time. I won't give much info about this, as it might ruin the surprise!

About the dmod

So much things learned in DinkC, I am starting to make this high-score based dmod. It's simple.

It's a running game, a ridiculously strong monster chases you. As you run for your life, you encounter random traps and obstacles spawned in the screen.

Scoring is based on how much time did you survive, and what screen you reached. I can't find a way how to score distance traveled.

That's it for now.

June 5th 2020, 06:23 PM
spike.gif
Sounds good. =) I'll say, your Dink RTS project did sound extremely ambitious. Not impossible, but very difficult, requiring lots of ad hoc scripting, stretching DinkC to its limits to accomplish things it was never designed for. This project still sounds like it will challenge your DinkC chops, but shouldn't be overwhelmingly difficult.

You can always return to Dink RTS after you become a Grade A+ script wizard.
June 7th 2020, 06:26 AM
duck.gif
toof
Peasant He/Him
I disagree. 
You can perhaps use sp_x(), sp_y() to get coords where Dink died (depending on the direction of escape), then sum 'em up in a global variable, and calculate how much you traveled
June 12th 2020, 12:20 AM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
This sounds interesting.

What did you have envisioned for your improved combat system?

I only ask because I've had one secretly (and now not secretly) in the works alongside all the other stuff I'm doing, for a while now.

The more the better tho, chances are they'll each turn out different with their own advantages.

Here's what mine might look like :

- Mouse controlled inventory
- customisable magic and weapon/item quick bar attached to number keys, for quick casting and swapping weapons without entering inventory
- health bar for enemies, two options, customisable in escape menu. Options are:
1. health bars above all enemies.
2. Health bar above last enemy hit by
player.
- randomised prefix and suffix system connected to script with database of the buffs attached to each prefix and suffix.
I.e: <prefix> long sword of <suffix>
- status conditions (poison, confuse, berserk, slow, etc).
- all buffs and buff times carried over successfully when saving and loading game (rather than in some dmods that say "you can't save at this time" when a timer is activated or whatever)

This is off top of my head im not home at the moment. There's more stuff.
Also, this system is in development, so all the stuff above is not fully functional yet.

I thought I'd put this here since its in relation to what you're doing.

Good luck with your dmod.
More dmods are always good
June 18th 2020, 08:12 AM
slayer.gif
Exzcimus
Peasant He/Him Philippines
Change is constant, but Constants do not change. 
@Robj

One of the noted success in my system is being able to knock back enemies to the direction of hit.

Try this code, attach it to a pillbug

en-pill.c

//pillbug brain

void main( void )
{
int &pb_life = 30;
int &save_x = sp_x(&current_sprite, -1);
int &save_y = sp_y(&current_sprite, -1);

sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 3);
sp_hitpoints(1, &pb_life);
sp_exp(&current_sprite, 30);
sp_base_walk(&current_sprite, 130);
sp_base_death(&current_sprite, 140);
sp_touch_damage(&current_sprite, 5);
sp_timing(&current_sprite, 15);
sp_distance(&current_sprite, 1);

preload_seq(131);
preload_seq(133);
preload_seq(141);
preload_seq(143);

}

void hit( void )
{
sp_target(&current_sprite, &enemy_sprite);
playsound(30, 21050, 4000, &current_sprite, 0);
say("`5&pb_life hp", &current_sprite)

int &k_dir = sp_dir(&enemy_sprite, -1);

if (&k_dir == 2)
{

external("e-damage", "knock2");

}

if (&k_dir == 4)
{

external("e-damage", "knock4");

}

if (&k_dir == 6)
{

external("e-damage", "knock6");

}

if (&k_dir == 8)
{

external("e-damage", "knock8");

}

}

void touch ( void )
{

if (random(2,1) == 1)
{
external("d-damage", "stun");
}

if (random(2,1) == 2)
{
int &rand = random(4, 2);
&pb_life += &rand;
say_xy("`4+ &rand hp", &save_x, &save_y);
playsound(65, 22050, 3000, &current_sprite, 0);

}

}

//End of script

e-damage.c

//called externally by enemy scripts when they are hit.
//enemies have a selective behavior when it comes to
//being stunned, knocked back, downed, or slowed down.

void stun ( void )
{

int &stop = random( 500, 1 );

freeze(&current_sprite);
wait(&stop);
unfreeze(&current_sprite);

}

//knock em' away! vertical direction

void knock2 ( void )
{
sp_my(&current_sprite, +16);
wait(50);
freeze(&current_sprite);
wait(300);
unfreeze(&current_sprite);
}

void knock8 ( void )
{
sp_my(&current_sprite, -16);
wait(50);
freeze(&current_sprite);
wait(300);
unfreeze(&current_sprite);
}

void knock4 ( void )
{

sp_mx(&current_sprite, -16);
wait(50);
freeze(&current_sprite);
wait(300);
unfreeze(&current_sprite);
}

void knock6 ( void )
{

sp_mx(&current_sprite, +16);
wait(50);
freeze(&current_sprite);
wait(300);
unfreeze(&current_sprite);
}

}

//diagonals don't really matter now

June 18th 2020, 08:28 AM
slayer.gif
Exzcimus
Peasant He/Him Philippines
Change is constant, but Constants do not change. 
Sorry to double-post...

Here's the progress with the said dmod.

I'm still altering the monster's sp_speed, and the sp_timing in relation to Dink's walking speed. The random traps spawn correctly, the monster can walk over hardness. Some traps can slow you down or damage you, and still working on a fireball shooting trap. Made a temporary speed boost spell, so you can dodge the monster when it gets too close

The objective is to survive the locked screen while looking for the switch you need to unlock the screen.

I tried playing it without the traps first... and man, it's so difficult!
June 28th 2020, 10:48 AM
slayer.gif
Exzcimus
Peasant He/Him Philippines
Change is constant, but Constants do not change. 
It will take a bit longer because I'm adding some other features like pick-ups that boost some stats, or add the ability to stun the monster, and free the player from traps.
July 10th 2020, 01:33 PM
slayer.gif
Exzcimus
Peasant He/Him Philippines
Change is constant, but Constants do not change. 
The objective in the game is to find the switch while being chased and dodging traps.

I'm trying to make the switch only activatable when Dink touches it or walks over it's hardbox.

This actually worked fine before I added some touch procedure, and before adding that &reach variable and condition to it. The switch will teleport randomly around the screen every time it's used.

But I realized that the switch can be flipped by talking to it, (space bar/examine), even if it's a meter away from Dink. I did not include a fist or any weapons at all, so the switch's function can't be called by a hit procedure. The only items you have is a magic speed boost, and a manual sprinting boots, (tap Ctrl repeatedly while moving to run a little faster).

But as of now, I don't understand how to check two conditions, or anything about complex if statements, or maybe I'm just doing it wrong.

Just remove the touch procedure and the &reach condition, then everything will work fine.

BTW, I include new graphics, it's like 678kb as of now, consisting of some few small sprites like pick-up items.

The damn script

switch-r.c

//random screen unlocking switch, 1 in 5 chances

void main ( void )
{

screenlock(1);
sp_touch_damage(&current_sprite, -1);
sp_hard(&current_sprite, 0);
draw_hard_sprite(&current_sprite);
}

void touch ( void )
{
int &reach;

&reach == 1;
say("I'm touching the switch", 1);

}

void talk ( void )
{
int &num = random(5,1);

int &rx = random(600, 0);
int &ry = random(400, 0);

if (&reach == 1)
{

if (&num == 1)
{


sp_pseq(&current_sprite, 844);
sp_pframe(&current_sprite, 2);
playsound(19, 32050,0,0,0);
playsound(19, 33000,0,0,0);
wait(500);
screenlock(0);
playsound(43, 22050,0,0,0);
say_xy("`3*SCREEN UNLOCKED!!*", 15, 75);
&switch += 1;
wait(1500);
kill_this_task();

}


if (&num != 1)
{

sp_pseq(&current_sprite, 844);
sp_pframe(&current_sprite, 2);
playsound(19, 32050,0,0,0);
playsound(19, 33000,0,0,0);
sp_hard(&current_sprite, 1);
draw_hard_sprite(&current_sprite);
wait(500);
&switch += 1;
sp_pseq(&current_sprite, 844);
sp_pframe(&current_sprite, 1);
sp_x(&current_sprite, &rx);
sp_y(&current_sprite, &ry);

sp_hard(&current_sprite, 0);
draw_hard_sprite(&current_sprite);

spawn("give-5g");

}



else
{

say("I can't reach the switch!", 1);

}

}

July 10th 2020, 07:56 PM
duck.gif
toof
Peasant He/Him
I disagree. 
At a quick glance:
void touch ( void )
{
  int &reach;

  &reach == 1; // this line (read below)
  say("I'm touching the switch", 1);

}

Was that supposed to be an if statement, or you want to assign &reach value to 1? Because you have one extra = sign
July 11th 2020, 07:39 AM
slayer.gif
Exzcimus
Peasant He/Him Philippines
Change is constant, but Constants do not change. 
@toof

It's not an if statement, I want to assign &reach to 1 so that the switch's function will work when talk procedure is called. If I don't get this to work soon, I'll just stick to the non-touch-condition switch. The player being able to flip that thing from a distance, I just hate seeing that.
July 11th 2020, 12:16 PM
duck.gif
toof
Peasant He/Him
I disagree. 
just remove that = sign then, and check if the rest works. Then give us results... And money... and blood... virgins...
&reach = 1; // correct, assign operator
&reach == 1; // wrong, comparison operator
July 11th 2020, 11:22 PM
spike.gif
An additional problem is that the touch procedure will constantly run. It's the same as how if you stand on a pillbug, it will constantly damage you. Here the touch procedure will run over and over, and probably interrupt the script when it reaches a wait command in the talk procedure. You could set sp_touch_damage to 0 in touch, but there is a more elegant solution...

BEHOLD! The almighty button brain:

void main ( void )
{

screenlock(1);
sp_hard(&current_sprite, 0);
draw_hard_sprite(&current_sprite);

sp_brain(&current_sprite,14)
int &reach
}

void buttonon
{
&reach = 1
say("I'm touching the switch", 1);
}

void buttonoff
{
&reach = 0
say("watashiwa stopped touching the switch desu",1)
}

void talk ( void )
{
int &num = random(5,1);

int &rx = random(600, 0);
int &ry = random(400, 0);

if (&reach == 1)
{

if (&num == 1)
{

sp_pseq(&current_sprite, 844);
sp_pframe(&current_sprite, 2);
playsound(19, 32050,0,0,0);
playsound(19, 33000,0,0,0);
wait(500);
screenlock(0);
playsound(43, 22050,0,0,0);
say_xy("`3*SCREEN UNLOCKED!!*", 15, 75);
&switch += 1;
wait(1500);
kill_this_task();

}

if (&num != 1)
{

sp_pseq(&current_sprite, 844);
sp_pframe(&current_sprite, 2);
playsound(19, 32050,0,0,0);
playsound(19, 33000,0,0,0);
sp_hard(&current_sprite, 1);
draw_hard_sprite(&current_sprite);
wait(500);
&switch += 1;
sp_pseq(&current_sprite, 844);
sp_pframe(&current_sprite, 1);
sp_x(&current_sprite, &rx);
sp_y(&current_sprite, &ry);

sp_hard(&current_sprite, 0);
draw_hard_sprite(&current_sprite);

spawn("give-5g");

}
}
else
{

say("I can't reach the switch!", 1);
}

}
July 15th 2020, 12:44 AM
slayer.gif
Exzcimus
Peasant He/Him Philippines
Change is constant, but Constants do not change. 
Thanks, guys!!
August 17th 2020, 10:59 AM
slayer.gif
Exzcimus
Peasant He/Him Philippines
Change is constant, but Constants do not change. 
Is there something wrong with my scripting? This script works fine on the 'freedink' version but it randomly crashes when certain scripts are used in HD and 1.08 versions. I know that freedink is the most stable version available but I still consider those who don't use it.

i-sprint.c

//manual sprint. disallowed by condition 2 and (zero stamina) allowed by condition 1, assigns condition 3

void arm ( void )
{

}

void use ( void )
{

if(&condition != 2)
{ 
  

  if(&strength < 1)
  {

    debug("event 'zs' with condition &condition");
    say("OUT OF STAMINA", 1);
    &condition = 2;
   
  
  }

  if(&strength > 0)
  {
    
    sp_kill_wait(1);
    &condition = 3;
    playsound(13, 16000, 0, 0, 0);
    sp_frame_delay(1, 5);
    set_dink_speed(2);
    wait(100);
    sp_frame_delay(1, 0);
    set_dink_speed(3);
    &strength -= 1;
    &condition = 1;
  
  } 

}

if(&condition == 1)
{

 

  if(&strength < 1)
  {

    debug("event 'zs' with condition &condition");
    say("OUT OF STAMINA", 1);

  }

  
  if(&strength > 0)
  {
  
   debug("event 'sb' with condition &condition");

   
  }

}

//if sprint is disallowed
if(&condition == 2)
{

  
  debug("sprinting disallowed");

} 

}

  
 
  
  
 







October 3rd 2020, 10:35 AM
slayer.gif
Exzcimus
Peasant He/Him Philippines
Change is constant, but Constants do not change. 
I'm planning to release a close beta version of this work these days.
Just gonna polish it a bit.
Some guys on the Discord server should have noticed a demo video about this.