Page 1 of 1
How to design balanced combat mechanics?
Posted: Wed Aug 24, 2011 4:32 am
by Verahta
How do you design a good battle system or combat engine for a browser game based in php/mysql? Is there any kind of tutorial for battle mechanics design? I want to have a combat system that can be both simple for newbs or lazy people, or more complex and strategic for players who like tactics and strategy. Thank you for any advice or tips.
Re: How to design balanced combat mechanics?
Posted: Wed Aug 24, 2011 5:01 am
by SpiritWebb
Moved to correct area.
Try looking at Halls tutorials on the php based game. He has a battle section...
Re: How to design balanced combat mechanics?
Posted: Wed Aug 24, 2011 5:22 am
by Jackolantern
This question in the game dev equivalent of "How can I live a perfectly fulfilling life?" There are a million different answers, like more than 1 for every game, and the same one likely won't apply to more than 1 game. A question like this is at the core for your design, and may likely fuel the entire design process for a combat-based PBBG.
Now if you are looking for tips about balancing combat, there are actually well-defined ways to do that. First, work out the mechanics on paper. Then get some dice (preferably a wide array of pen'n'paper RPG dice, so you have plenty of options), and make mock battles that you follow along on paper, and see if the combat mechanics are fair, or even work at all (oftentimes my first mechanic design is completely flawed, and I did not see it until I see it in action, such as the defense mechanics being far too strong for player's offense). Then, when you think you have a good system and want a larger test, make a script in PHP that will run back-and-forth simulations for several different combat scenarios over-and-over again in a big PHP loop, and then print out a report card of all the stats on all of the combat scenarios you want to know. Percentages will work out well in these reports, since you are ideally running every combat scenario 100+ times, so you can see how often combatant A won, how many B won, how often it was close (and therefore, likely more exciting and/or challenging), etc. Really only after doing all of this should you actually sit down and start coding your combat mechanics into the game.
Re: How to design balanced combat mechanics?
Posted: Wed Aug 24, 2011 6:44 am
by Verahta
Yeah I watched the first couple videos, I will watch more tomorrow. My game idea will be pretty open ended, so I want people to be able to play for combat or economics, or maybe even a few other options, and have a choice but also be a little dependent on one another. But the main draw for me will be PvP combat. I'm not sure what you mean about the dice? I want to design combat mechanics that are dynamic, but not luck based as personally I have always been annoyed by "dice" game mechanics. Maybe I misunderstood you, but I'm hoping for combat to not be founded on luck but rather known quantities and skill (at least at higher 'level' combat, newbies should be able to hack'n'slash in the beginning without much thought). Maybe a tiered combat system so it's uncomplicated for new players but complex and strategic for vets.
Anyways, I will watch the tutorial videos and lookup the combat balance/theory you mentioned.
Re: How to design balanced combat mechanics?
Posted: Wed Aug 24, 2011 9:14 am
by Callan S.
I'd suggest buying the card game 'lunch money'. It'll give you alot of ideas and is great fun to play with other people even if your not looking for ideas!
Re: How to design balanced combat mechanics?
Posted: Wed Aug 24, 2011 4:49 pm
by Baseball435
i learned all of my knowledge of web browser games off of halls' tutorials and I would highly recommend to look through them.
Re: How to design balanced combat mechanics?
Posted: Wed Aug 24, 2011 7:26 pm
by Verahta
I'm going through the first one now. On a slightly different topic, is JavaScript recommended for browser games? Doesn't server side cause less lag or is client side the only way to interact with objects on the page?
Re: How to design balanced combat mechanics?
Posted: Wed Aug 24, 2011 7:49 pm
by Xaleph
Please elaborate.
In browser based development you have to deal with "pages." What I mean by that is, every time you click a link or press a button, you send a request to the server. The server handles the logic, creates a page to return and flushes it to you, the client. So you received a new page, correct?
To handle "objects" on your page, you NEED javascript. There`s no alternative. Well, unless you want to go trough the whole > request -> server -> response -> page cycle.
Javascript runs on the client, the browser, the user`s computer. So there`s no communication with the server, no new pages. Javascript can animate, do logic as well and offers AJAX. And AJAX Is the way to go. AJAX is a technique you can use to retrieve data from the server, without reloading or requesting a new page. In a way, you can make it interact as it is with normal programs. I`m not that good at explaining, but that`s what it comes down to.
Great helpers for this stuff ( AJAX that is.. ) is jQuery. It`s a complete Javascript library that offers a lot of functionality. Look in to that and you`ll see what I mean.
Re: How to design balanced combat mechanics?
Posted: Wed Aug 24, 2011 7:58 pm
by Verahta
Oh cool, I thought AJAX was for ASP.NET and I'm going the PHP/MySQL route so I ignored it. So JQUERY is a library for AJAX? I'll google it.
Re: How to design balanced combat mechanics?
Posted: Wed Aug 24, 2011 8:08 pm
by Xaleph
AJAX Is a technology, not a language. It can be used by ASP.NET as well as any other web language, like PHP. Be sure to check it out.