|
|
WoWminis PC Game Development ( Project cancelled )
Last post 12-27-2009, 5:59 PM by gogodr. 104 replies.
-
11-20-2009, 12:29 PM |
-
gogodr
-
-
-
Joined on 11-16-2009
-
-
Posts 51
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
right now I'm planning to do it this way I find it the best atm :
actions as strings so I will make 1 subprogram for each action example:
void claw (PlayerBase player, Character character) {player.ticks = player.ticks + 3; //Fattack(range,dmg) Fattack(3,5); // I'm still thinking about how to make the crit recognition }
and I'll trigger the sub programs with a conditional comparing the string
after initializing the player taking the info from the card RubyGemsparkle
if (Player.attack == true){ // rect collision detect system and click detection system jhere if (cursorrect.intersects(Action1arearect){ if ( click == true){ if (Player.Action1 = "Claw"){ Claw(); } else if (Player.Action1 = "Arcane Blase"){ ArcaneBlast(); } // ... and so for all the actions so I have a reusable subprogram for the attacks. } click = false; }
|
|
-
11-20-2009, 1:39 PM |
-
BlackBloc
-
-
-
Joined on 08-08-2008
-
Montreal, QC
-
Posts 2,015
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
That doesn't make much sense. Whenever you are tempted to do these infinite numbers of if(X == "A") {callA();}, if(X == "B") {callB();}, you should really be using polymorphism.
class Attack { unsigned short cost; unsigned short range; unsigned short strength; Crit * crit; DamageType type; (...) public: ResolveAttack(Character& target); (...) };
class PhysicalAttack : public Attack{ (...) };
class MagicAttack : public Attack{ (...) };
Then since all attacks pretty much always resolve the same way (except for the crit) you'll just need to define your attacks this way:
Attack ArcaneBlast(4, 3, 8, Teleport(2)); Attack FlameShock(2, 2, 4, PlusDamage(1)); Attack HarukaMain1(3, 1, 6, TriggerAttack(FlameShock)); // I may be making mistakes in this one
and then later:
attacker.attack.ResolveAttack(target);
Internally the Attack object will call the Crit object's ResolveCrit function, or something, at the right moment (there should probably be a ResolvePreDefense and ResolvePostAttack for crits, which will have different effects based on whether it's a Crit damage +X or some other crit type).
Anyway it just doesn't make sense to treat every attack as a separate piece of code. It makes later expansion of the game much much harder.
"The beatings will continue until morale has improved." - Standard corporate management technique
|
|
-
11-20-2009, 1:55 PM |
-
BlackBloc
-
-
-
Joined on 08-08-2008
-
Montreal, QC
-
Posts 2,015
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
Seriously though, you need any help I'm pretty willing. I'd have worked on making my own a lot earlier if I had any clue how I'd do the graphic representation, and since it seems you've done a good chunk of THAT part of the problem... I really was more interested in coding the internals, really.
"The beatings will continue until morale has improved." - Standard corporate management technique
|
|
-
11-20-2009, 3:07 PM |
-
gogodr
-
-
-
Joined on 11-16-2009
-
-
Posts 51
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
thanks, I would really appreciate some help, since I;m on my last practices in University and in 2 weeks I start my finals I have been a bit busy and can't really work as much as I want, Right now I left the movement restrictions in a 80% if you want to help with the internal systems I would appreciate if you could finish it for me. I want to finish first this things before entering to coding the attacks. I'll look into your method I'm not that experienced with coding yet so maybe I'll need to do some research to understand it. its almost all done I'll explain you what is left to do. ____________________ I need this piece of code: if (RayIntersectsModel(cursorRay, CellSpace[BASE.posX, BASE.posZ + 1])) { resetcells(); click = false; BaseBottom.position = Cell[BASE.posX, BASE.posZ + 1].position + new Vector3(0.0f, 1.0f, 0.0f); BaseTop.position = Cell[BASE.posX, BASE.posZ + 1].position + new Vector3(0.0f, 1.0f, 0.0f); BASE.posZ = BASE.posZ + 1; showcells = false; if (Cell[BASE.posX, BASE.posZ].isMountain == true | Cell[BASE.posX, BASE.posZ].isForest == true) { BASE.MovementPoints = BASE.MovementPoints - 2; } if (Cell[BASE.posX, BASE.posZ].isMountain == false & Cell[BASE.posX, BASE.posZ].isForest == false) { BASE.MovementPoints = BASE.MovementPoints - 1; }be copied one more time and add the following restrictions if (Cell[BASE.posX, BASE.posZ + 1].isMountain == true | Cell[BASE.posX, BASE.posZ + 1].isForest == true) { if (BASE.MovementPoints >= 2) { if (RayIntersectsModel(cursorRay, CellSpace[BASE.posX, BASE.posZ + 1])) { resetcells(); click = false; BaseBottom.position = Cell[BASE.posX, BASE.posZ + 1].position + new Vector3(0.0f, 1.0f, 0.0f); BaseTop.position = Cell[BASE.posX, BASE.posZ + 1].position + new Vector3(0.0f, 1.0f, 0.0f); BASE.posZ = BASE.posZ + 1; showcells = false; if (Cell[BASE.posX, BASE.posZ].isMountain == true | Cell[BASE.posX, BASE.posZ].isForest == true) { BASE.MovementPoints = BASE.MovementPoints - 2; } if (Cell[BASE.posX, BASE.posZ].isMountain == false & Cell[BASE.posX, BASE.posZ].isForest == false) { BASE.MovementPoints = BASE.MovementPoints - 1; }
} }
if (Cell[BASE.posX, BASE.posZ + 1].isMountain == false & Cell[BASE.posX, BASE.posZ + 1].isForest == false) { if (BASE.MovementPoints >= 1) { if (RayIntersectsModel(cursorRay, CellSpace[BASE.posX, BASE.posZ + 1])) { resetcells(); click = false; BaseBottom.position = Cell[BASE.posX, BASE.posZ + 1].position + new Vector3(0.0f, 1.0f, 0.0f); BaseTop.position = Cell[BASE.posX, BASE.posZ + 1].position + new Vector3(0.0f, 1.0f, 0.0f); BASE.posZ = BASE.posZ + 1; showcells = false; if (Cell[BASE.posX, BASE.posZ].isMountain == true | Cell[BASE.posX, BASE.posZ].isForest == true) { BASE.MovementPoints = BASE.MovementPoints - 2; } if (Cell[BASE.posX, BASE.posZ].isMountain == false & Cell[BASE.posX, BASE.posZ].isForest == false) { BASE.MovementPoints = BASE.MovementPoints - 1; }
} }
I need it done on this code
http://pastebin.com/m774096be
basically what you are doing is add the movement restriction for the terrain recognition
its very important to do it manually because of the Cells sorting
you need to match the cell called in this line:
BaseBottom.position = Cell[BASE.posX, BASE.posZ + 1].position + new Vector3(0.0f, 1.0f, 0.0f);
This is the cell you need:
Cell[Base.posX, BASE.posZ + 1]
on the conditional
if (Cell[BASE.posX, BASE.posZ + 1].isMountain == true | Cell[BASE.posX, BASE.posZ + 1].isForest == true) { if (BASE.MovementPoints >= 2) {
} }and if (Cell[BASE.posX, BASE.posZ + 1].isMountain == false & Cell[BASE.posX, BASE.posZ + 1].isForest == false) { if (BASE.MovementPoints >= 1) { } }
_____________
I would really appreciate if you do it and on the way doing it you can understand how the board was sorted in this Cell spaces bidimentional array. after doing this movement restrictions I still need to think on how to make the attack range and block of vision.
//// the current BASE object represents the only Ubase being shown in game atm becaus eI needed it for debbuging, I'll change the name of BASE to Minis and the function will run like this MoveAction(Ubase minis){ }
and when its called it will will be like this MoveAction(Red1); being the minis Red1 Red2 Red3 Blue1 Blue2 Blue3 this class will hold the health, turns, and all the attributes of the player
_____________________ also if someone else is interested in helping with this I need this to be done for each character Character RubyGemsparkle = new Character(); RubyGemsparkle.CharacterClasses.Gnome = true; RubyGemsparkle.CharacterClasses.Mage = true; RubyGemsparkle.CharacterClasses.Arcane = true; RubyGemsparkle.Armor = 1; RubyGemsparkle.Marmor = 3; RubyGemsparkle.Life = 5; RubyGemsparkle.Honor = 5; RubyGemsparkle.Name = "Ruby Gemsparkle"; RubyGemsparkle.action1 = "Arcane Blast";
|
|
-
11-20-2009, 11:37 PM |
-
Programmer
-
-
-
Joined on 03-03-2008
-
-
Posts 156
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
3090463:I need this to be done for each character
Character RubyGemsparkle = new Character(); RubyGemsparkle.CharacterClasses.Gnome = true; RubyGemsparkle.CharacterClasses.Mage = true; RubyGemsparkle.CharacterClasses.Arcane = true; RubyGemsparkle.Armor = 1; RubyGemsparkle.Marmor = 3; RubyGemsparkle.Life = 5; RubyGemsparkle.Honor = 5; RubyGemsparkle.Name = "Ruby Gemsparkle"; RubyGemsparkle.action1 = "Arcane Blast";
As I said before, I think this part is a bit troublesome. It means that you will have to create new code whenever a new set is released. And since this is pretty generic, I still would suggest taking it from a database or XML File.... Furthermore, if you request help, it would be best to provide us with the actual code and project files. It makes a lot easier coding if you can actually debug... If you have no way of sending the files, I can give you access to a private FTP. You could also (depending on the size) distribute it by email.
WoWMinisDB.NETTournament Organizer - Level 1 Rules Knowledge World of Warcraft - Level 2 Rules Knowledge World of Warcraft Miniatures - Level 1 Player Management - Level 1
|
|
-
11-21-2009, 5:35 AM |
-
gogodr
-
-
-
Joined on 11-16-2009
-
-
Posts 51
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
well implementing it to rea it from a database or an XML is not a problem but I think its unnecessary because if a new set is released I have to release a new program anyways to add all the game assets from that set since I believe if I put the game assets on the database it will make the game a bit slow...
about sharing all the code. I can make a pastebin of all the project if you want but about sharing the game assets is other history because the project is something about 250MB
|
|
-
11-21-2009, 8:29 AM |
-
TehHuntre
-
-
-
Joined on 04-29-2008
-
-
Posts 1,943
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
I know just enough about programming to know I can't do it. I really wish I knew more, I would totally help on this. Good luck with all this, I hope it turns out well (and finished =P).
Side note, any coders in the DC area feel like tutoring me?
Master Tactician and Rexxar...
|
|
-
11-21-2009, 8:41 AM |
-
NosFurOught2
-
-
-
Joined on 06-04-2008
-
-
Posts 225
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
Wish I lived close enough to help. You could try Visual C# it's an easy thing to pick up if you have some talent it's not the greatest to develop a game but you could start with say a collector program. List the Characters and Cards get a team picker if I had more time I would have gotten one out. Try this link http://www.microsoft.com/express/vcsharp/ maybe it's for you maybe not.
Character ListsCMG WIKI
|
|
-
11-21-2009, 9:13 AM |
-
gogodr
-
-
-
Joined on 11-16-2009
-
-
Posts 51
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
worst thing you can do is say " I can't do it" myself I'm not really an expert coding. and I'm making this game in self study to learn C# also make the game adaptation since I loved the game the day I bough my starter pack and started playing. C# haves this magic libraries and system called XNA which simplifies things a lot to the point that you can really don't know C# but know how to make structures and then just do a little of research and apply your design in the code. ------------------------- more than knowledge on complex coding, what is needed is time and patience for most of the code I'm doing right now.
|
|
-
11-21-2009, 9:14 AM |
-
Programmer
-
-
-
Joined on 03-03-2008
-
-
Posts 156
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
2211159:Wish I lived close enough to help. You could try Visual C# it's an easy thing to pick up if you have some talent it's not the greatest to develop a game but you could start with say a collector program. List the Characters and Cards get a team picker if I had more time I would have gotten one out. Try this link http://www.microsoft.com/express/vcsharp/ maybe it's for you maybe not.
Not entirely true though... Microsoft offers XNA a managed environment around DirectX to program games in. The only (official) supported language for XNA is C# :) So actually it is quite an easy language to build a game in, the downside is that it is (currently) windows only. And as a last node: this game is actually being build in XNA/C#.
WoWMinisDB.NETTournament Organizer - Level 1 Rules Knowledge World of Warcraft - Level 2 Rules Knowledge World of Warcraft Miniatures - Level 1 Player Management - Level 1
|
|
-
11-21-2009, 10:15 AM |
-
gogodr
-
-
-
Joined on 11-16-2009
-
-
Posts 51
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
sorting all the files in arrays was quite a pain but here it is edit::(( I just noticed something I must fix )) edit:: ok fixed
static string Cardspath = Directory.GetCurrentDirectory() + "\\Content\\Cards";
string[] ActionBar = Directory.GetFiles(Cardspath + "\\ActionBar\\"); string[] Equips = Directory.GetFiles(Cardspath + "\\ActionBar\\Equips"); string[] CharactersAlliance = Directory.GetFiles(Cardspath + "\\Characters\\Alliance\\"); string[] CharactersHorde = Directory.GetFiles(Cardspath + "\\Characters\\Horde\\"); string[] CharactersMonster = Directory.GetFiles(Cardspath + "\\Characters\\Monster\\");
void FixNames() { int x, y, z, a, h, m; y = Equips.Length; z = ActionBar.Length; a = CharactersAlliance.Length; h = CharactersHorde.Length; m = CharactersMonster.Length; char[] xnb = { 'b', 'n', 'x', '.' };
for (x = 1; x < y; x++) { Equips[x] = Path.GetFileName(Equips[x]); Equips[x] = Equips[x].TrimEnd(xnb); } for (x = 1; x < z; x++) { ActionBar[x] = Path.GetFileName(ActionBar[x]); ActionBar[x] = ActionBar[x].TrimEnd(xnb); } for (x = 1; x < a; x++) { CharactersAlliance[x] = Path.GetFileName(CharactersAlliance[x]); CharactersAlliance[x] = CharactersAlliance[x].TrimEnd(xnb); } for (x = 1; x < h; x++) { CharactersHorde[x] = Path.GetFileName(CharactersHorde[x]); CharactersHorde[x] = CharactersHorde[x].TrimEnd(xnb); } for (x = 1; x < m; x++) { CharactersMonster[x] = Path.GetFileName(CharactersMonster[x]); CharactersMonster[x] = CharactersMonster[x].TrimEnd(xnb); } }
|
|
-
11-21-2009, 10:16 PM |
-
gogodr
-
-
-
Joined on 11-16-2009
-
-
Posts 51
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
I'm having problems with NullReference.. I got it when trying to initialize my array of sprites (( the only one trowing me null is the sprite2D[] AllianceCharacters
declaration: sprite2D[] AllianceCharacters; static string Cardspath = Directory.GetCurrentDirectory() + "\\Content\\Cards"; string[] ActionBar = Directory.GetFiles(Cardspath + "\\ActionBar\\"); string[] Equips = Directory.GetFiles(Cardspath + "\\ActionBar\\Equips"); string[] CharactersAlliance = Directory.GetFiles(Cardspath + "\\Characters\\Alliance\\"); string[] CharactersHorde = Directory.GetFiles(Cardspath + "\\Characters\\Horde\\"); string[] CharactersMonster = Directory.GetFiles(Cardspath + "\\Characters\\Monster\\");
initialization: for (int i = 0; i < CharactersAlliance.Length; i++) {
AllianceCharacters[i] = new sprite2D(Content.Load<Texture2D>(Cardspath + "\\Characters\\Alliance\\" + CharactersAlliance[i])); AllianceCharacters[i].name = CharactersAlliance[i];
}
//This is called at the beginning:: void FixNames() { int x, y, z, a, h, m; y = Equips.Length; z = ActionBar.Length; a = CharactersAlliance.Length; h = CharactersHorde.Length; m = CharactersMonster.Length; char[] xnb = { 'b', 'n', 'x', '.' };
for (x = 0; x < y; x++) { Equips[x] = Path.GetFileName(Equips[x]); Equips[x] = Equips[x].TrimEnd(xnb); } for (x = 0; x < z; x++) { ActionBar[x] = Path.GetFileName(ActionBar[x]); ActionBar[x] = ActionBar[x].TrimEnd(xnb); } for (x = 0; x < a; x++) { CharactersAlliance[x] = Path.GetFileName(CharactersAlliance[x]); CharactersAlliance[x] = CharactersAlliance[x].TrimEnd(xnb); } for (x = 0; x < h; x++) { CharactersHorde[x] = Path.GetFileName(CharactersHorde[x]); CharactersHorde[x] = CharactersHorde[x].TrimEnd(xnb); } for (x = 0; x < m; x++) { CharactersMonster[x] = Path.GetFileName(CharactersMonster[x]); CharactersMonster[x] = CharactersMonster[x].TrimEnd(xnb); } }
any idea on what could be making it fail ?
|
|
-
11-22-2009, 4:55 AM |
-
Programmer
-
-
-
Joined on 03-03-2008
-
-
Posts 156
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
You didn't initialize the AllianceCharacters Array. Try this: string[] CharactersAlliance = Directory.GetFiles(Cardspath + "\\Characters\\Alliancesprite2D[] AllianceCharacters = new sprite2D[CharactersAlliance.Length]();
WoWMinisDB.NETTournament Organizer - Level 1 Rules Knowledge World of Warcraft - Level 2 Rules Knowledge World of Warcraft Miniatures - Level 1 Player Management - Level 1
|
|
-
11-22-2009, 7:16 AM |
-
Steelwing
-
-
-
Joined on 09-02-2006
-
-
Posts 458
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
I like Option 1. If I can help you at all with graphics, just let me know, I do a ton of photoshop stuff on the side and will be happy to lend a hand.
email me at steelwing73@gmail.com
Great work!
WOW Minis - RK2 WOW TCG - RK1 UDE PM - Level 1 2009 Durotar Realms Minis Top 8 I ROLL AT:
|
|
-
11-22-2009, 9:36 AM |
-
gogodr
-
-
-
Joined on 11-16-2009
-
-
Posts 51
-
-
|
Re: Character Representation for the WoWminis PC game (Vote please)
Programmer> Yeah, I noticed .. I didn't go to sleep until I finished the Cards Menu system for the Alliance faction, I'll post a video maybe tomorrow.
|
|
Page 3 of 7 (105 items)
3 ...
|
|