Post by succat on Aug 18, 2009 22:09:19 GMT -5
For those of us working on our own RavenBlack-like games, are there any coding ideas, problems, concerns, etc that you would like to share on here?
I'm not so much talking about gestures and spells as I am talking about the code you are writing to make all of these things work.
For myself, I was able to get a game environment in place that I coded basically by scratch. That part was not too terribly hard - I also made kind of a simple, but glorified Rock-Paper-Scissors-like game that people can play against each other or against the server while they are waiting on me to finish the coding for the real game. This is similar to RB in that you can challenge other players, chat within the battles, and see a table that ranks the top players.
I don't know, I'm building my RB clone in PHP and MySQL. I'm starting to get into the thick of it now with all of the different spell interactions. I'm finding myself getting pretty bogged down with the tediousness of writing the code for all of the possible scenarios that can happen on each and every turn.
For instance, in a single turn, you are looking at and comparing all of these items: (and this is just a single scenario out of MANY)
Turn 10
Player 1
LH: F (must also take into account previous turn gestures, so if this is the 3rd or more F then it's para)
RH: P (same as above, is this a shield, or an ending P on PDWP or SPFP..?)
RH SPELL DROPDOWN: (Hmmm, are we gonna select a SHIELD from the list..?)
LH TARGET: (Who are we targeting here..? Self, Opponent, Nobody, a monster..?)
RH TARGET: (Should I anti-spell opponent or shield myself here..?)
Direct Black Ogre: (Need to direct this ogre to attack... Opponent, other monster..?)
OK, now I still have to take into account Player 2...
This is just one sliver into the chaotic madness. I'm not even sure yet how I'm gonna write the code for things like: monsters that don't yet exist, but need to pop up as a possible selection on the player's form box, invisibility... Haste and Timestop I don't think will be quite as hard as I originally thought, but we'll see when I get to those.
I am thinking that I need to keep many of the game objects separate as much as possible. So that, for example, an ogre attacking an opponent means that the ogre code is not taking into account what other things are happening that turn, but only the things that might affect the ogre... and same idea for some of the other objects. It's total madness otherwise to take every event from each turn and analyze it as a whole; it's gonna be easier, I think, to try to get things to work independently from each other as much as possible. I don't know, does this make sense? Anyone else run up against this or anything else yet?
p.s. - by the way, when I say RB clone, I'm not saying my clone is gonna be exactly like RavenBlack's Warlocks, but it will have many similar features. Obviously, I am planning to change a few things in my clone... like Para, for example.
I'm not so much talking about gestures and spells as I am talking about the code you are writing to make all of these things work.
For myself, I was able to get a game environment in place that I coded basically by scratch. That part was not too terribly hard - I also made kind of a simple, but glorified Rock-Paper-Scissors-like game that people can play against each other or against the server while they are waiting on me to finish the coding for the real game. This is similar to RB in that you can challenge other players, chat within the battles, and see a table that ranks the top players.
I don't know, I'm building my RB clone in PHP and MySQL. I'm starting to get into the thick of it now with all of the different spell interactions. I'm finding myself getting pretty bogged down with the tediousness of writing the code for all of the possible scenarios that can happen on each and every turn.
For instance, in a single turn, you are looking at and comparing all of these items: (and this is just a single scenario out of MANY)
Turn 10
Player 1
LH: F (must also take into account previous turn gestures, so if this is the 3rd or more F then it's para)
RH: P (same as above, is this a shield, or an ending P on PDWP or SPFP..?)
RH SPELL DROPDOWN: (Hmmm, are we gonna select a SHIELD from the list..?)
LH TARGET: (Who are we targeting here..? Self, Opponent, Nobody, a monster..?)
RH TARGET: (Should I anti-spell opponent or shield myself here..?)
Direct Black Ogre: (Need to direct this ogre to attack... Opponent, other monster..?)
OK, now I still have to take into account Player 2...
This is just one sliver into the chaotic madness. I'm not even sure yet how I'm gonna write the code for things like: monsters that don't yet exist, but need to pop up as a possible selection on the player's form box, invisibility... Haste and Timestop I don't think will be quite as hard as I originally thought, but we'll see when I get to those.
I am thinking that I need to keep many of the game objects separate as much as possible. So that, for example, an ogre attacking an opponent means that the ogre code is not taking into account what other things are happening that turn, but only the things that might affect the ogre... and same idea for some of the other objects. It's total madness otherwise to take every event from each turn and analyze it as a whole; it's gonna be easier, I think, to try to get things to work independently from each other as much as possible. I don't know, does this make sense? Anyone else run up against this or anything else yet?
p.s. - by the way, when I say RB clone, I'm not saying my clone is gonna be exactly like RavenBlack's Warlocks, but it will have many similar features. Obviously, I am planning to change a few things in my clone... like Para, for example.