Battle Engine - Alpha 6 release, downloads in first post

Ideas and games that are not yet publicly in production. This forum also contains the pre-2012 archives of the Works in Progress forum.
Message
Author
User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Battle Engine - Alpha 2 release, downloads in first post

#166 Post by Jake » Mon Aug 16, 2010 11:39 am

Abeiramar: You're welcome, I hope you find it useful!
LordShiranai wrote: I suspect that you will have more in the "I just want the basic armor/weapon/accessory slots" camp than you will in the "I want you to implement the D20 system" camp.
I suspect - and hope! - that you're right. I'd guess most VN people think of stuff like Final Fantasy or Disgaea when they think of a battle system, rather than pen-and-paper RPGs.

I'm trying to structure everything such that it should be possible to write a fairly complex system, all the same. I suspect the no-real-time-component aspect would rule out a lot of pen-and-paper stuff, since there'd be no particularly clean way to do player-instigated interrupting actions (for example), but it should be possible to get close, at least. Although I've always been more of a fan of Silhouette, myself. ;-)
Server error: user 'Jake' not found

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

Re: Battle Engine - Alpha 2 release, downloads in first post

#167 Post by DaFool » Mon Aug 16, 2010 1:28 pm

Dual hand equips and interrupting counter were used by Resonance of Fate and that was a jrpg. Of course the skills and damage resolution were affected.

User avatar
LordShiranai
Regular
Posts: 188
Joined: Wed Jul 07, 2010 5:49 pm
Completed: Mobile Food Madness, Super Otome Quest
Location: Pacific Northwest
Contact:

Re: Battle Engine - Alpha 2 release, downloads in first post

#168 Post by LordShiranai » Mon Aug 16, 2010 2:14 pm

DaFool wrote:Dual hand equips and interrupting counter were used by Resonance of Fate and that was a jrpg. Of course the skills and damage resolution were affected.
Yes, but this is a system designed to work on top of an engine that was intended for visual novels. It isn't designed for "real time" action, and to implement it would probably be a fairly difficult undertaking. You would probably be better off making your game in an entirely different engine.

Dual wielding itself would probably be fairly easy to implement, but there are a lot of factors to take into account to keep it balanced. Keep in mind that this is a generic engine.

- Who gets to dual wield? Does everyone get to dual wield, or just certain characters? How do I define who gets to dual wield in the code?

- What are the exact effects of dual wielding? Does it simply increase a character's attack power? Do I attack with both weapons at once? Are there potential downsides to dual wielding? (There should be to keep the game balanced, in most cases.)

- What types of weapons should I be able to dual wield? Daggers makes sense, but should I be able to use two Cloud-sized paddleswords? Should I be able to dual wield shields?
Don't Blame Me. I Voted for Vermin Supreme.

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Battle Engine - Alpha 2 release, downloads in first post

#169 Post by Jake » Mon Aug 16, 2010 4:16 pm

LordShiranai wrote: Yes, but this is a system designed to work on top of an engine that was intended for visual novels. It isn't designed for "real time" action, and to implement it would probably be a fairly difficult undertaking. You would probably be better off making your game in an entirely different engine.
Exactly. I believe it's possible to implement real-time stuff in pure Ren'Py if you really absolutely have to, I have a pretty good idea how I'd go about doing it, but it'd be pretty hard and I have no intention of doing it for the engine. Nothing that can't be done in a turn-based, discrete manner will make it in, to avoid complicating the code to the point that it would become difficult to maintain and modify.

That said, hopefully it'll be possible to have automatic interruptions - for example, UFO's reaction fire, or counter-attacks, or whatever. Just not something that's performed by the player at exactly the right moment.


As to dual-wielding - again, yes: it would be easy enough to write game code to allow dual-wielding, and it wouldn't require modification of any engine code... it's just not in my priority list right now, 'cause I don't see it as an important feature compared to some of the other stuff that I still have to get done.
Server error: user 'Jake' not found

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

Re: Battle Engine - Alpha 2 release, downloads in first post

#170 Post by DaFool » Tue Aug 17, 2010 10:10 am

Jake wrote: That said, hopefully it'll be possible to have automatic interruptions - for example, UFO's reaction fire, or counter-attacks, or whatever. Just not something that's performed by the player at exactly the right moment.

As to dual-wielding - again, yes: it would be easy enough to write game code to allow dual-wielding, and it wouldn't require modification of any engine code... it's just not in my priority list right now, 'cause I don't see it as an important feature compared to some of the other stuff that I still have to get done.
Yes, "now it's our turn to counter-attack" is much more doable than Eternal Sonata-style "Guard!" chances.

The reason I insist on dual-wielding (or triple-wielding for that matter) is that it will be easier to make games with battleships, mecha, or fighter planes that have equipment pylons where you can put stat-changing equipment such as more cannons, more fuel (extended range), more armor more powerful engines, etc. You can trade an armor slot for more cannons for maximum damage, for example. Right now I'm assuming that the equipment system is tailored for human units where the items are already segregated and have only one slot allocation for each type.

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Battle Engine - Alpha 2 release, downloads in first post

#171 Post by Jake » Tue Aug 17, 2010 10:53 am

DaFool wrote: The reason I insist on dual-wielding (or triple-wielding for that matter) is that it will be easier to make games with battleships, mecha, or fighter planes that have equipment pylons where you can put stat-changing equipment such as more cannons, more fuel (extended range), more armor more powerful engines, etc. You can trade an armor slot for more cannons for maximum damage, for example.
Well, firstly: as the code stands today, there's no reason you couldn't write a skill/set of skills or a damage resolver which counted how many weapons you had, or how many weapons with the same (arbitrary) attributes, and use that to alter the way the attacks worked or the resolution of the damage.
So maybe you have an "Autocannon attack" skill, and each AC on your mecha can shoot three times:
- It would be possible to write a custom Fighter which scanned its equipment and performed the same action four times for a mecha with four ACs, for a total of twelve shots.
- It would be possible to alter the attack resolver to do four-times the damage when you have 4 ACs, or make the to-damage checks four times, or whatever.
- It would be possible to alter the skill to count your ACs and send four times the number of attacks to the attack resolver.
- Each of these can discriminate between ACs on your mecha and lasers via an 'autocannon' attribute that you can selectively apply to just the various different AC weapons when you're setting up the equipment lists in the first place.

All I'm saying is that right now, I'm not going to include any special dual-wielding code in the engine, because it's the kind of thing that can be done in custom code outside of the engine and is game-specific enough to need to be done in custom code outside of the engine. One game might want two ACs to perform two separate attacks for the same Action-Point cost, another game might want two swords to just multiply the attack score by x1.5, etc..

(And of course, if you want to do it fairly simply without writing any extra code, just have each of your autocannons give a +5 to the attack stat. I've written some utility base classes for "piece of equipment which gives a straight bonus to some stats" and "piece of equipment which applies a multiplier to some stats", so it should be pretty easy to do without writing custom classes.)
DaFool wrote: Right now I'm assuming that the equipment system is tailored for human units where the items are already segregated and have only one slot allocation for each type.
The demos assume a human unit, and the default limits assume a human unit, just because that's convenient. But there's nothing implicit in the equipment system that means it couldn't be used for something like you describe, and of course it's possible to write an extra Equipment-managing class (descending from the existing FighterEquipment) which provides extra functionality if you want to.

Basically, each piece of equipment has attributes - a list of strings. You can have as many as you like and they can be whatever you like. The FighterEquipment class which is responsible for holding a fighter's equipped items is set up with a set of limits - attribute names mapped to numbers, which are the maximum number of items with that attribute that the fighter can carry.

So the defaults are something like {'weapon': 1, 'armour': 1, 'shield': 1}, meaning that the fighter can only equip one thing with the 'weapon' attribute at any one time, one thing with the 'armour' attribute, and so on. Hands are dealt with in a similar way: there's a HandedFighterEquipment class, which adds on a check for the number of 'hand' attributes an item has. So the default sword has an attribute list of ['weapon', 'hand']; a poleaxe might have ['weapon', 'hand', 'hand'], while Cyclops' laser-eye-thing might just have ['weapon'].

If you want to do a mecha game with slots, you can just adapt this, and give your items attributes that describe how many slots they take up. So a small AC might have ['weapon', 'slot', 'autocannon'] while a large one has ['weapon', 'slot', 'slot', 'autocannon'] and an armour slab has ['armour', 'slot'].




Obviously there's going to be some things which don't fit into this paradigm, and for those things you'll need to subclass the FighterEquipment class and write your own implementation. The first example that comes to mind is something like the Diablo/UFO/Deus Ex inventory, where each piece of equipment takes up a number of squares in a particular pattern and you have to shuffle stuff around in order to fit it on your mecha.
Server error: user 'Jake' not found

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Battle Engine - Alpha 3 release, downloads in first post

#172 Post by Jake » Sun Aug 22, 2010 7:41 pm

Here's the Alpha 3 release, sorry it's later than I'd originally suggested.

New things:
  • Altered fighter lists to include dead people, so things like 'loot' or 'raise dead' can function... not to mention drawing corpses.
  • Added 'dead people' and 'live people' flags to targetting; defaults to 'live'.
  • Added Items and an ItemSkill to pick and use them, a PickItem UI call, etc.
  • Added Inventories of items to fighters
  • Added stat-modification, so fighters' stats can be modified by equipment or effects or whatever.
  • Added stat-modifying equipment
  • Added limit-checking equipment lists for fighters.
  • Added equipment demo with simple equipment selector/deselector
Fixed-up things:
  • Re-jigged eventing so everything descending from BattleAware has all events and subscribes in the same way.
  • Skill lists sorted alphabetically. Probably ought to do more with this later.
  • Renamed 'SimpleEnemyFighter' and 'MovingEnemyFighter' to 'SimpleAIFighter' and 'MovingAIFighter' respectively.
As you can see, the big things are Items and Equipment. I'm not entirely sure I don't want to change Equipment a little bit still, but it's mostly there. I still have a to-do list as long as my arm, but more and more it's mostly comprised of little changes to existing functionality rather than entirely new stuff.

(I'm away from home (and my usual FTP client) right now, so it's attached to the forum post and it's just a zip of the game directory.)
battle-engine-alpha3.zip
Battle Engine alpha 3
(15.28 MiB) Downloaded 294 times
Server error: user 'Jake' not found

User avatar
usul
Veteran
Posts: 413
Joined: Mon Oct 29, 2007 12:35 pm
Projects: Teachings of the Buddha, System-Addict, Generation XxX
Location: Quebec
Contact:

Re: Battle Engine - Alpha 3 release, downloads in first post

#173 Post by usul » Sun Aug 22, 2010 10:11 pm

Let me be the first to publicly thank you for this update. I'm going to get my teeth into it and have a blast going through the new features.

Oh and the change from enemy to AI prompts me to ask the question, is it possible to declare a friendly AI team who will fight alongside the player controlled team VS. an enemy AI team?

Also, I love that you can raise corpses from the dead, is it also possible now to add fighters mid-combat?
"The universe is non-simultaneously apprehended"
— Buckminster Fuller

User avatar
Midnighticequeen
Veteran
Posts: 292
Joined: Fri Apr 04, 2008 4:04 pm
Completed: Bunni and Kitty, Sweethearts, Tiesa's Tales
Projects: Wish
Organization: Ice Queen Games
Tumblr: icequeenstudios
Contact:

Re: Battle Engine - Alpha 3 release, downloads in first post

#174 Post by Midnighticequeen » Mon Aug 23, 2010 1:21 am

Guess I'll be the second one to thank you for the update. Finally beat the bandit boss. He was hard, I only got him when I played the special custom skills demo. BTW, the charm skill is wonderful! I love it. :D

What future plans do you have for your final version of your battle engine

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Battle Engine - Alpha 3 release, downloads in first post

#175 Post by Jake » Mon Aug 23, 2010 5:20 am

You're welcome, both of you - I hope it's useful! ;-)
usul wrote: Oh and the change from enemy to AI prompts me to ask the question, is it possible to declare a friendly AI team who will fight alongside the player controlled team VS. an enemy AI team?
Presently no; you'd have to add all the friendly-AI fighters to the same faction as the player-controlled fighters.

I'll add an item to my to-do list to add faction alliances so one faction will treat an allied fighter as a member of the same faction.
usul wrote: Also, I love that you can raise corpses from the dead, is it also possible now to add fighters mid-combat?
It's been possible since the first version, but it's true it's got a little cleaner in this release. You'd basically want to do something like this in your skill's PerformAction method:

Code: Select all

            # Presuming that you're targetting a Position with this skill, otherwise
            # you'll need to get a Position from somewhere else...
            pos = target[0]
            
            # Set the 'currently being added to' faction to the faction you want the
            # new fighter to be in:
            fighter._battle.SetFaction(fighter.Faction)

            # Then just set up the new fighter just like you would in battle setup.
            golemSprite = BattleSprite('golem', anchor=(0.5, 0.75), placeMark=(0,-80))
       
            golem = PlayerFighter("Golem", Move=4, Speed=10, Attack=20, Defence=20, sprite=golemSprite)
            golem.RegisterSkill(Library.Skills.Smash)
            golem.RegisterSkill(Library.Skills.Move)
            battle.AddFighter(golem, x=pos.X, y=pos.Y)

            # Lastly, call Show() to make sure it appears immediately. You may want to 
            # show sparkly special effects (use pos.GetTransform to get a Ren'Py 
            # Transform to show your sparkles at) or something here as well.
            golem.Show()
Midnighticequeen wrote: What future plans do you have for your final version of your battle engine
My most-important extra features are listed in the first post under 'Planned Features' - this is more or less what I'm working towards to call the engine feature-complete: hex grid battlefields, variable-cost movement over different terrain, and a few more UIs, skills, items and equipment and so on to make it a bit easier for people to put together the configuration they want without writing custom classes of their own. Oh, and proper documentation!

On top of that, the next release should include panning around a larger battlefield than can fit on the screen, now 6.11 is released properly with the engine support I needed for this, and I'd also like to do some more battlefield types at some point - including the facing-the-enemy RPGMaker-style battles and Wizardry-style first-person dungeon view.

After that I'll probably spend some time writing a couple of demo games using the engine, expanding the examples people have available when looking at how to use it.
Server error: user 'Jake' not found

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4028
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: Battle Engine - Alpha 3 release, downloads in first post

#176 Post by jack_norton » Mon Aug 23, 2010 5:46 am

Neat, keep up the good work. Once is finished (with my beloved hexmaps) I can finally start making my Fantasy General clone :D I've all the art ready sitting on my HD since 3 years...
follow me on Image Image Image Image
computer games

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

Re: Battle Engine - Alpha 3 release, downloads in first post

#177 Post by DaFool » Tue Aug 24, 2010 1:03 pm

Thanks again. How do you use 'resurrection'? Doesn't the unit disappear when dead? I only just figured out that you have to be perpendicularly in front of someone to charm him. I'm eagerly awaiting panning.

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Battle Engine - Alpha 3 release, downloads in first post

#178 Post by Jake » Tue Aug 24, 2010 1:16 pm

DaFool wrote:Thanks again. How do you use 'resurrection'? Doesn't the unit disappear when dead?
Yes and no... the Fighter still has the same position, they just have their Active property set to False and they're no longer drawn.

I still need to fiddle a bit to fit in corpse-drawing code (most importantly setting up a decent default when units don't get a corpse sprite declared for them), so presently you just have to remember where they were standing and target that square... It shouldn't be too hard, since you'll get a little hand over any squares with a candidate currently-invisible corpse in them!

(There's a potential problem with it currently, in that you could have another Fighter standing in the square with the corpse in it when you cast the spell... it would be difficult to pick a target once you have two live Fighters in the same square, and ultimately I'll need to do something to disallow that. I have a long-term plan of target-filtering methods, so that when you say (in this case) "this spell targets dead fighters within 4 squares" you can modify it to say "this spell targets dead fighters within 4 squares who also return true when this arbitrary method over here is called against them", so the skill can contain code to prevent it being a valid target when there's someone standing in the same square.)
DaFool wrote:I only just figured out that you have to be perpendicularly in front of someone to charm him. I'm eagerly awaiting panning.
The charm simply has a range of 1... so in the no-diagonals battlefield of the demo, yes; you have to be in one of the four squares which shares an edge with the square your target is in!

I left some of the non-Ren'Py related support parts for panning in from when I played around in 6.10, so I'm hopefully most of the way there already. Once it's done I'll put up another release fairly quickly, since it's a big-ticket item. ;-)
Server error: user 'Jake' not found

User avatar
blakjak
Veteran
Posts: 224
Joined: Fri Dec 21, 2007 2:36 pm
Location: France
Contact:

Re: Battle Engine - Alpha 3 release, downloads in first post

#179 Post by blakjak » Tue Aug 24, 2010 6:15 pm

Great ! I come back from vacation and there's a new update already ! Thank you for your continued efforts, the list of this version's features is so exciting ( raising the dead, so awesome, equipement ! ).

User avatar
emihaumut
Regular
Posts: 158
Joined: Fri Jun 27, 2008 12:19 pm
Projects: Rynspyr.
Tumblr: emihaumut
Github: yeewai
Contact:

Re: Battle Engine - Alpha 3 release, downloads in first post

#180 Post by emihaumut » Wed Aug 25, 2010 1:13 pm

Alpha 3 is awesome. :D

I have a quick question (probably something I overlooked in my excitement):
Say I have animations for the fighters when they attack, where do I put that in/what do I change so that the fighter no longer bobs up and down but instead, y'know, attacks.

Post Reply

Who is online

Users browsing this forum: No registered users