In SVO, we'd like to replicate the Earthbound Turn based Battle System, example: http://www.youtube.com/watch?v=nAmBIljqgR8
We've compiled some things we'd like to tackle, but we don't really know how to handle this correctly.
Here's some information:
Outside battle view possibilities:
Lowered opacity (team: pulsating) - Several icons (outsiders, team members, ...) - SMAAAAAASH icon when a smaaaaash happened inbattle
Option of spectating the battle - not full screen - semi transparant - vulerable to ambushes
Single Player
Timing - Timed battle
Multiple players (No NPC Allies)
Things of single player apply
Group Leader
Start of each turn: 1minute time to select your move, no move selected => auto turn
Misc
If you've got any idea on how to properly start coding on this (what design patterns to use for example, ...) that'd be awesome.
Some suggestions by other people:
Create a class for holding battle instance information (who the user is, who the NPCs are, and anything else you might want)
Add a reference to this class to User so you know what battle they are in (if any)
When they are in battle (when the reference is not null), do not allow certain events (movement, using items, etc) and allow battle-only events (this step is just a tedious game-logic one where you have to break down every action and determine if its allowed at the given time)
When a user enters a battle, send all relevant information to the client to start the battle display. Of course, also tell the client when a battle is over.
That should be about all it takes. The server still sees the user as just standing there, while the client is displaying this completely different screen. But things remain mostly the same.
We would like some pointers to get on the right track. You don't have to have played Earthbound to understand the foundation of this kind of battle system, any turn based RPG would do.
Basically what I'm asking (and what DF told me he'd like) is some pointers on where to start, for example what do the server and the client have to do regarding checks, "entering" the battle, finishing/cleaning up a battle when it's over, ...
I loved Earthbound, Mother 3 was pretty impressive too. OFF-Topic sorry.
Umm... Factories are static methods that construct objects. Not a huge game changer. (really up to personnel preference, I only use them for certain objects like if they have a very complicated initialization procedure or if naming the constructors would provide more clarity in the code)
The Observer pattern (to my knowledge) is kind of stupid to use in .NET, just use delegates. The only point to using them is if you need a tad more cohesion then just a call back.
Let me just see if I can understand what the hell your saying:
1. (Battle Swirls): So these swirls happen right on the map for other players to see while the engaged players are actually fighting.
I need some rest, just got off a 10 hour flight.
I think you should definitely use interfaces. Yeah, that's not a design pattern, but use interfaces and properties. I wish I was more familiar with netgore, I could definitely give you some more pointers. Definitely consider what interface you need and how you need to use objects. I find it helpful to figure out how an object is going to be used/accessed/disposed/constructed/shared before slapping some fields in a class definition. Also think about how your going to define the data. What parts are in the data and what is hard coded in.
@JunJun:
It's kind of short sided to have a collision method run for both the player and mobs to determine who was really attacking who. Just have the player do the collision check and compare velocities. If the player was moving away and the mob was running after him (can be determined from velocity vector), the player got attacked in the back. If they were moving toward each other, they were probably going head to head. Yeah, sometimes people might get lucky by running straight into a mob without realizing it. Main point: Velocity comparison is you main tool when it comes to figuring out who was attacking who.
Go with what Spodi said. A battle instance class sounds good. You could use some attributes + enumerations to do some cool reflection based definitions for whether an action can take place at the current time (in the current state the player is in). Just a thought.
Basically, all I want to know is what to use for it serverside - It needs to handle multiple users AND multiple enemies, and how to handle all this at the client end, in netgore. What to use, and what else there is in netgore I can look at for an example of this being used. Wasn't too sure where to start with that, so some help would be nice ![]()
Most of the rest of the stuff, I have a decent idea on.
Just going to defend myself a bit ![]()
To be fair i've only briefly read up on design patterns i can't find a decent book anywhere, and i'd just been messing around with the concepts and could see uses for them in the design i drew up but for the life of me can't find that design in my documents. I think i might have lost it when i backed up and deleted rubbish.
I'll look on my backup and if i can't find it i'll have another go after i've completed my assignment. D:
I'll get back to helping you guys out too btw i have every intention to. im just really busy.
Ok its new years day and im really drunk but seriously design patterns are not meant to be used that way. Its not like you have a problem and suddenly you use erich gamma's "design patterns" and it all works and becomes really clean code, sorry aphro
I haven't played earth bound, but before I give any advice I would like to know what you guys are really asking. For example do you want code examples, a code design or what. Like skye said "but we don't really know how to handle this correctly.", I don't really know what you mean. I'm happy to assist for code design and give some examples and what not. I don't know much about netgore so if its specific to that I can't really help, but otherwise I should be able to give some pointers. Cheers