attempting two player dink
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 )
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 )
Let the Attack button will be T.About attempting two player Dink it's very interesting.
This is great! You're doing exactly what I was planning on doing.
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.
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.
Perhaps we'll get lucky someday and someone will make a patch that will allow for 2 players at the same time.
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.
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.
What if the two Dink's are trying to enter 2 different tiles at once?
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.
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.
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.
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.
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.
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.
Rabidwolf9 could you please send me what you have so far? I would love to see it and to get it working if possible.
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.
Edit:
I just sent it to the address on your profile.
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
BTW: Killing Dink is fun
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.
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.
I had the player/npc thing in mind too. Is there any work left for me?
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.
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.
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
-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
Using sp_nodraw(), he goes from visible to invisible quickly.
I picked it up from the check for scripts thing in the ultimate cheat.
I picked it up from the check for scripts thing in the ultimate cheat.
-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.
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.
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.
I am trying to keep it somewhat simple, so only 2 playable characters and limited commands for now.
Rabid, does the NPC fight alongside of you as in your Summon Spell? Or is it more advanced?
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.
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.
Sure I would love to see if I can make improvements.
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.
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.