Welcome to the Builder Academy

Question idea for combat ranges

More
26 Mar 2013 21:53 #1721 by Nerian
I'm not a very great coder, but I had an idea I wish I could code. I would like to have my players have to actually enter combat and go through different ranges like missile, pole then finally get to melee range. .. of course only the certain types of weapons can be used to attack at those ranges. ...


Does anybody know if a snippet or something that does this?

Please Log in or Create an account to join the conversation.

More
27 Mar 2013 12:06 #1731 by zusuk
Replied by zusuk on topic idea for combat ranges
I remember seeing ranged-combat snippet on the old circlemud ftp.. But I think its more for out-of-room ranged combat as opposed to 'stages' of ranged combat same-room like you are suggesting.

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
18 Apr 2013 19:46 #1957 by Kewlb
Replied by Kewlb on topic idea for combat ranges
I am going to be implementing this into my MUD.

I have already implemented a full events based combat system in a previous MUD I coded. I will be tweaking this system for use in my new project. The way it worked is that various weapons had speeds and ranges and there were no more set "combat rounds" as you attacked as needed based on the speed of the weapon. I implemented multi-room combat, but that became a bit cumbersome. I will still use some multi-room combat features here (grenades, sniper rifles, launchers, bows/crossbows), but whereas before range was defined by rooms away from target, I will base it off a virtual distance in each room.

This way as a battle ensues in a room certain mobs/players can move away from melee to ranged distance or move into melee distance, or spear distance, etc... it will flow a lot better than trying to deal with multi-room ranged combat and will add some new depth and strategy to what is otherwise mundane spamming of skills/spells to kill. Add this with my FF7 materia-like skill system with skill/spell cooldowns and delayed effects you will have a pretty unique and rewarding mud combat system.

Nothing like seeing that player/mob start to reload their weapon and you rush into melee range, kick the weapon out of their hand, get behind them, stab them in the back, kick them over, put a steak into them so they are held down while while they bleed out and you move on to the next mob/player.

Please Log in or Create an account to join the conversation.

More
29 Apr 2013 17:36 #2020 by Kewlb
Replied by Kewlb on topic idea for combat ranges
I started putting the basics together for this system, today. At first I was just going to use a single integer to represent depth. I have since decided that a better way is to use a grid. Based on the sector type, rooms will have a certain depth and height. I will let 0,0 be the center of the room. A room with a depth of 50 will be x: -25,25 y: -25,25. I will include height as well, but not for every cell of the room grid. It will just be a height cap based on sector type with objects, skills, etc.. that can modify each individuals own height. It wouldn't be too hard to code randomized inclines / hills, etc.. as well. I will also code in direction characters/objects can be facing.

I will change code so that visibility/interaction with objects/mobiles/players takes their position and range into consideration. There will be many ways to move around in the room and the goal is to make them as player friendly as possible. There will also be passive and hostile ways of coming into range of mobiles.

Obviously doing such a thing is really changing the entire nature of how the mud works/plays. Given this and how customized my code already is, I will not be releasing any type of patch for this system. I will, however, help any proficient coder implement such a system into their game.

Please Log in or Create an account to join the conversation.

More
30 Apr 2013 21:27 - 30 Apr 2013 21:28 #2034 by Nerian
Replied by Nerian on topic idea for combat ranges
heh unfortunately I'm not a proficient coder by any stress of the imagination


but what I was hoping for

in the room the only distance that actually would matter would be the distance between the PC and the mobs

this would mean that you could be at different ranges with different mobs

so if you engage a mob it would then put you at missle range with that particular mob, but still out of combat with other mobs unless something happens

if you advanced on your engaged mob you would move up to pole range then melee range, being able to stop advancing at any distance

casting a spell or shooting a bow at a mob automatically puts you at missile

some mobs would be able to charge straight to melee





honestly I don't even know how to begin implementing that system.
Last edit: 30 Apr 2013 21:28 by Nerian.

Please Log in or Create an account to join the conversation.

More
30 Apr 2013 22:27 #2035 by Kewlb
Replied by Kewlb on topic idea for combat ranges
There is a circleMUD snippet for linear distance, I would just advise against it. I thought about it and it is not much more work to just go ahead and add a full grid based system. Since this isn't graphical you shouldn't have to write any A* algorithm, but I guess you still could and I might still do that. I have one I wrote in C# that I might port to C.

I am not going to fully organize it, but i'll post up what I am writing when I am done.

For linear distance its pretty straight forward. Add a new variable to the room structs for int depth. Add one to objects and one to char_data. When a mob loads put them at a random distance and change wander to allow them to also move around distances in a room and set the distance when they enter a new room, summon, goto, transfer, etc.. . The issue I have with linear is what happens if someone comes in from the east or west are you just going to have them land at the center between the two end points? If you do a grid system you can actually have them land where appropriate based on the direction they came from. (e.g. given 0,0 as center in a size 50 room traveling east puts you at -25,0 (far west side center of the next room). If you just go with a linear distance there is no real way to account for true depth and being able to move around inside a room.

Please Log in or Create an account to join the conversation.

Time to create page: 0.205 seconds