ID:268070
 
Hey guys, ehm could someone please help me to convert dan's turn based demo into an duelling system of yugioh if possible??

-Mist
Mist Form wrote:
Hey guys, ehm could someone please help me to convert dan's turn based demo into an duelling system of yugioh if possible??

Stop asking the wrong question. Most developers here (especially ones worth their salt) don't know a thing about Yu-gi-oh, and so telling them you want a "dueling system" is useless. There isn't a magic hat from which programmers can draw any given block of code you want.

Instead, you need to start asking the right questions, and start by asking them to yourself. What do you mean by a dueling system? (Don't respond with a vague or general answer; details are crucial.) What sequence of events should occur to begin and end it, and what happens in the middle? What commands or interface elements will players use to control their part in the duel?

If you start thinking about the sequence of events you want, you have in fact taken the very first steps toward programming this yourself. It doesn't matter if the steps are still a little broadly defined; you can break those down further later. But until you do even that, nobody can help you.

The best place to start organizing your thoughts is with pseudocode.
if(!BeginDuel(P1, P2))     // do all the setup work
return // oops, had to bail out; no duel today
var/player/WhoseTurn = ChooseFirstPlayer(P1, P2)
var/player/other
while(P1 && P2)
other = (WhoseTurn == P1) ? (P2) : P1
WhoseTurn.PromptForAction(other)
if(WhoseTurn && other && WhoseTurn.action)
WhoseTurn.PerformAction(other)
if(WhoseTurn && other)
if(WhoseTurn.CheckForDuelEnd(other)) break
WhoseTurn = other
DeclareWinner(P1, P2) // find winner and reward points
EndDuel(P1, P2) // do the cleanup work
As you see, there's a sequence of events in there. Each step is a proc that encompasses a lot of different things, but those things are the details you still need to work out.

Lummox JR