The Dink Network

attempting two player dink

September 15th 2007, 02:20 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I've attempted to make a movable sprite by using key scripts (aka player 2). I've been somewhat successful but...

First of all, the way it moves is jumpy and slow. Secondly, I can't think of a way to make it be stopped by the blue flying hardness. Thirdly, if you press the different directions fast, you will get some delayed movements. Lastly, it sometimes freezes and won't move anymore

There are also some normal Dink features I haven't made him do yet such as walking in diagonals (you'd have to use 8 keys), talking/examining (perhaps a special "hitting sequence" that would trigger the talk procedure [that obviously wouldn't work on things that cannot be hit though]), and pushing.

The only things I've been successful in are making him move (even though its crappy), getting him to use an idle sequence (it looks really natural), stopping him from walking offscreen, and being remade on switching screens.

I'm planning to make it so he doesn't walk through hardness, making him killable, and giving him an attack and stats and so on.

Edit:
I'm using W,A,S,D to move, what should the attack button be? Or, would using the numpad be better? But then again, using numpad could cause some problems because if numlock is off then Dink is controlled by numpad.

--------------------------------------------
Progress:
--------------------------------------------

-added stats to player 2

--added life to player 2

-player 2 can survive without player 1

--player 2 can switch screen (when player 1 dies)[coordinates bugged]

-gameover initiated when both players are dead

--two key scripts added for testing (kill P1/P2)

-healthbar added to player 2

--player 2 can punch (I'm getting giddy killing Dink )
September 15th 2007, 02:47 PM
pq_cthunik.gif
GOKUSSJ6
Peasant He/Him Poland
Everyone should get a pizza for free in each week. 
Let the Attack button will be T.About attempting two player Dink it's very interesting.
September 15th 2007, 05:21 PM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
This is great! You're doing exactly what I was planning on doing.
September 15th 2007, 08:55 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I read your thread and that got me started on it. No coincidence here If you want I could send you what I've got so far.
September 15th 2007, 10:08 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I fear the bug with player 2 freezing is an engine problem. None of the key scripts work when this happen (except for the weird ones [ space,shift,arrows,etc..]) I think I'm messing things up by inputting so many key commands at such a fast pace. Maybe making two players outside of editing the engine is impossible

Perhaps we'll get lucky someday and someone will make a patch that will allow for 2 players at the same time.
September 15th 2007, 11:08 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Yeah Way, way back in the day (around 1998 or 1999), I tried to create 'Dink Kombat', a two-player D-Mod. It didn't work very well for the reasons you've discovered.
September 16th 2007, 05:39 AM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
I would love to see what you did so far. I think the moving problems could be solved but not if you want player 2 to move just like Dink. I'll just have to take a look at what's possible.
September 16th 2007, 06:26 AM
fairy.gif
Glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
What if the two Dink's are trying to enter 2 different tiles at once?
September 16th 2007, 03:51 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
It might work if you change the gameplay though. What about making the player constantly move to the left when A is hit once, and making him stop by hitting another key? Or go to another direction with another key, ofcourse.
September 16th 2007, 05:35 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
That reminds me, I tried to make a Pac-Dink D-MOD for the 1 screen D-MOD comp, but it didn't work for two reasons.

1.) I didn't know how to make him continue moving after hitting one key.

2.) Half of Dink would be on top of the blocks, while the other half would not. I think this is because Dink's depth dot is in the exact middle of Dink's feet.
September 16th 2007, 07:31 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
DD95, you could use make Dink a missile brain and use wait_for_button() that makes him "fly" in the direction you press. Then give him a script that tells him to stop if he hits a wall (using the damage procedure.)

Christiaan, while that is a good idea and could work, I was going for P2 to play exactly like Dink does. Because I can't do it that way, I've lost interest. This whole two player thing does give me some ideas for a new kind of gameplay that I simply just have to experiment.

So here's the idea that's going through my mind. Instead of making a two player game, the next best thing is giving the player two different characters to control. So, say we have Dink and his friend Bob the knight. Bob would act as a friendly fighter npc, but there could be a key to switch the control. So now, Dink is the npc and we can control Bob. To make it more complex, we could use keys to tell the npc what to do (such as who to attack or what spell to use.) I think I'll start on this tomorrow.
September 18th 2007, 05:31 AM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
That's the same idea that I had in mind Christiaan. I'll see if I can get it working today.

Rabidwolf9 could you please send me what you have so far? I would love to see it and to get it working if possible.
September 18th 2007, 07:23 AM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I'll send it to you when I get home from school (about 7 hours from now.)

Edit:
I just sent it to the address on your profile.
September 18th 2007, 05:17 PM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
Thanks a lot I'm amazed by what you got already. I can't believe I've been so stupid to test some stuff with button6 instead of using key-## because (Why do I notice that just now? ) they act a bit different. Anyway I think there are many ways of getting this working (either the way Christiaan explained or by bug fixing your way) and I'll try to get something done.

BTW: Killing Dink is fun
September 20th 2007, 09:26 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I've come a long way with my player/npc switching method. All I need to do is take care of the dying script and that should be all for the basics. Maybe I'll release it at that and add onto it later on.
September 20th 2007, 11:30 PM
sob_scorpb.gif
Hades
Peasant He/Him Australia
Remember you're unique, just like everyone else. 
that's a really cool idea, I think the idea of having a two player dink has crossed my mind but I hadn't thought anyone would be able to do it, maybe you could use it when dink gets knocked on the head and you have to kill the assailants with dink's buddy so you could have a D-mod with a way to have a new character to play but still have dink there.
September 21st 2007, 10:25 AM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
I had the player/npc thing in mind too. Is there any work left for me?
September 21st 2007, 10:41 AM
duckdie.gif
So, say we have Dink and his friend Bob the knight. Bob would act as a friendly fighter npc, but there could be a key to switch the control. So now, Dink is the npc and we can control Bob. To make it more complex, we could use keys to tell the npc what to do (such as who to attack or what spell to use.) I think I'll start on this tomorrow.

A bit of advice here - switching main characters in the middle of a fight may result in utterly hellish problems, especially on slower computers.

Otherwise, it's fully possible to do this. TMOD has a player-switching feature (though not while fighting) and an AI feature.
An example for the AI feature : let's say you've got three characters at the start of the fight. You pick a character, and then choose a behavior for the other two (focus on healing, retreat if HP less than [variable], attack spellcasters, and so on). You can also switch the character's behavior while fighting and make he/she/E perform certain actions.
September 21st 2007, 09:16 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
This is what happens when you switch characters. Would this really cause problems?

-check to see what character Dink is by using his sp_gold
-check if other char is alive
-switch coordinates with other char
-give dink new stats, base walk, and items
-give other char new script
-spawn script that makes Dink (the player) blink 5 times
September 21st 2007, 09:44 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Blink?
September 21st 2007, 09:51 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Using sp_nodraw(), he goes from visible to invisible quickly.

I picked it up from the check for scripts thing in the ultimate cheat.
September 22nd 2007, 04:54 AM
duckdie.gif
-check to see what character Dink is by using his sp_gold

I had problems with sp_gold behaving weirdly at times. Remember, should you have a problem, that you could also use sp_brain_parm and sp_brain_parm2.
...Although personally, I prefer to use good ol' fashioned variables.

-switch coordinates with other char
-give dink new stats, base walk, and items


This is what can cause a lot of trouble, but if you've got a simplistic battle with not too many characters/scripts, it'll work.
On the other hand, if you want to do an *interesting* epic battle with attackers/casters/summons/more than two player characters/new graphics/external timing scripts, I wish you luck.
September 22nd 2007, 10:19 AM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Sp_gold seems to work fine for me. I'm already using 8 globals (if i wasnt trying to conserve i'd have like 14 by now), so I'm trying to conserve a few because of limitations. You have to think, if someone uses this system, it's probably gonna be for a quest or epic, so there will already be a lot of variables. At first I was gonna use his base walk to check but I tested and that doesn't work

I am trying to keep it somewhat simple, so only 2 playable characters and limited commands for now.
September 23rd 2007, 07:57 AM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
What about sp_custom?
September 24th 2007, 08:14 AM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
Rabid, does the NPC fight alongside of you as in your Summon Spell? Or is it more advanced?
September 24th 2007, 10:19 AM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Well, right now it's basically the summon spell, 'cept you can switch inbetween
I'll look into doing more later as I've been kinda busy lately.

Erwin: If you want, I can send it to you so you could work on it, because I won't be able to do anything on it for at least a few days.
September 25th 2007, 10:53 AM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
Sure I would love to see if I can make improvements.
October 1st 2007, 07:55 AM
wizardb.gif
Endy
Peasant He/Him United States
 
The NPC could have a vision radius aswell, so he could realisticly respond to closer attackers or the player. The bonca enemy scripts in the Weather Demo have a version of this, if anyone's interested.

Shouldn't be too hard to check the distance between the NPC and all the enemies, then you could have them decide wether to use a distance attack or close range from there.

Might be easiest to seperate the attacks into different scripts, then swap between them.