Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Game Design Theory / first person mouse cotnrolled sword fighting.

Author
Message
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 18th Oct 2004 16:17 Edited at: 18th Oct 2004 16:18
Hey guys, just an idea that pooped into my head (yes i mean pooped), can an object thats locked on screen still move around by control of a mouse? as in mousey() etc? cause i was reminiscing about games like die by the sword, where everything looks like playstation graphics and you move the mouse and he swings his sword awkwardly. but i was thinking (and i might test it out later) that you might be able to make a fps with teh sword as your weapon, lock it to screen and have the mouse movements control the swing, instead of just clicking to swing. It could give more control over how you swing it. might even make a lil daggerfall style demo. ofcourse not with anything cool in it, just walk to a building, and talk to a guy and swing your sword around.

[edit] lol i just realized the typo in the header, man i'd like a cotton rolled sword.

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Oct 2004 17:24
Maybe a bit like Thief? - in that your sword is first person, and you sorta sword fight, it's quite effective.

I'd suggest an animated model locked onto the screen, maybe add an extra limb onto the point of the sword to help with collision detection.


Van-B


Muhahahahaha.
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 18th Oct 2004 21:43
well to test it out i'd go with just a plank of wood model, (a rectangle box thingy) and just check how it would rotate while stuck to the screen. i wouldnt really see how it'd need to be animated, except for an idle pose i guess. and yeah i'd have an arm attached, but how would that go with rotating, i suppose u'd have to set it to only rotate/move the sword limb and keep the arm locked, that way the arm doesnt rotate with the sword.

Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 18th Oct 2004 22:19 Edited at: 18th Oct 2004 22:27
hey just did a lil test bit with dbpro, man my frame rate on it is awesome, even when i spin the object at lightning speed!


is what i have so far. thing is with the code i got (supplied below) i can only spin the object, i wanna make it be able to move up and down and then swing forward btu also be angled. so im tryin to think of how that would work, my theory is with the mouse you click left mouse button then roll the mouse forward to swing forward (turn the object away from the screenand maybe just have the sword glued to where the mouse moves normally to move it across the screen to where you want to swing and then right click plus movement maybe to angle it. I'm no god at maths so im not to savvy at which mousemove$() goes where in that thing, but i could prolly experiment a little to get some code happening. and i'd have to stuff around to teh the if mousekey()=1 and mousemovex() then do what I damn well want sort of code to work how I want it. but at the moment a 1 cm move of the mouse makes the object fully rotate, how would I be able to cap the mouse movemetn to only tilt a certain amount?



feel free to check the code out , you will need a texture for the ground, an dthe backdrop is in there cause i tried texturing that too but it kept coming up with an error sayign line 9 was now redundant or something so i jsut deleted it and moved on.



zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 19th Oct 2004 01:22 Edited at: 19th Oct 2004 01:26
Too bad multiple mice are not easily supported. It would be fun to have a shield hand and a sword arm to play with. (Also good for boxing and two weapon fighting styles.)

Perhaps a mouse and joystick combo? Put movement and shield control in the off hand and weapon control in the primary. [All user configurable, of course.]
--
TAZ

"Do you think it is wise to provoke him?" "It's what I do." -- Stargate SG-1
Lord Aramus
20
Years of Service
User Offline
Joined: 8th Sep 2004
Location:
Posted: 19th Oct 2004 08:04
A game called "Hillsfar" many years ago based on Dungeons and dragons had you controlling the direction of your weapon attacks with the numerical pad arrow keys. you had to match block with attack to defend and swing toward an opening to attack.. It was very innovative for its day, perhaps something like that!

Ack Thpppppt!

High quality models and graphics, low prices. Graphics for the rest of us.
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 19th Oct 2004 11:19
yeah i got the daggerfall demo on my laptop, and that has fp sword control, basic dragging the mouse along the screen will swipe the sword across a certain path. but that used sprites and not a 3d object. theif also used the numpad for certain attacks and blocks.
and with a shield we could probably have some key configuration to run it. would have to be close to the movement keys though.

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 19th Oct 2004 23:21
If you had a sword moving with the screen, you could have a shield at the bottom left corner and just jig the camera to use it - like move the mouse so the shield is over the attacking beastie to hide behind it.

I think your best to use an animated model. For example.

If you have 2 arms, one with a shield like was suggested, and the other with the sword. You would animate each violent movement - so your list of animation might go like:

Lift shield to defend blows
Swing sword left
Swing sword right
Stab forwards
Slash down
Slash up (neck)

Now using the mouse movements, you could work out which move to make, like turning left and you press attack, then the sword would swing left. Imagine looking left and right at a horde of green monkeys advancing towards you, by simply holding the attack button you could be slicing them up. I think it'd be an awesome fighting system - and if you ever wanted to make a pirate game, that'd be a good system for sword fighting in that as well.


Van-B


Muhahahahaha.
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 20th Oct 2004 00:09
Arrh, it would work well for sword and dagger combinations and three musketeer style adventures to boot.

Drifting back to the 'combat simulator' idea. You could, for example, use the joystick in the left hand to move/turn, and position the shield when the trigger engaged. For the mouse in the right hand, mouse move to swing, left click to thrust, and perhaps right click for blocking or throwing. That will give you hands-on control and offer the simulation that to access your inventory (via the keyboard) you have to take your hand/attention off of the shield or weapon.

What would really be a hoot would be the inclusion of non-standard weapons such as flails which would required a circular motion to build up energy.

"Do you think it is wise to provoke him?" "It's what I do." -- Stargate SG-1
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 20th Oct 2004 00:20
Yeah, like if your movement affected the power of your hit - running forward at full pelt then sharply bringing a flail down should be enough to kill any creature, but standing still and weakly swooshing your sword about might not be very effective at all.


Van-B


Muhahahahaha.
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 20th Oct 2004 01:02
but would the mouse swirl be easier to code with movign the object in game or animating. cause I kinda like the idea of controlling the movement more than just pressing a button for a pre built move, being able to fully control the way the sword moves opens the door to some awesome combos worked by your own hand!

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 20th Oct 2004 01:34
Yeah, you have an idle animation loop - and all your other anims feed from that. Then you sorta tack your animations together with a bit of coding and manual frame setting and it's very smooth. I suppose it depends how complex the movements are - you only need the basics though, like up, down, left, and right - but you could link special moves into them. For example, if you defend a blow the quickly attack, it could parry the attack. Really you'll have the choice how you fight, slow and powerful moves or quick and dirty.

Imagine what you could do with a magic wand, wind it up then let it go! ZZZZZAP!!!.


Van-B


Muhahahahaha.
Cian Rice
21
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 20th Oct 2004 01:45
I say make the game require a gamepad with two analog sticks and use those for sword and shield.
Just an idea.

There is only one way to package shaolin: Shaolin Soccer...
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 20th Oct 2004 01:46
stop it with the animations already! im saying no animations, just have the object move with the mouse control, not just play a set animation when certain combos are hit! in third person this seems doable by limb control fo an arm, infact there have been a few games out that have done a similar thing from 3rd person, ther ewas an online game called arena or gladiator and it was just u move at an enemy and swing ur mouse to swign a sword etc. was actually quit efun. anyway i'm gonna stuff around with some coding, see if i can't learn myself something while i wait for some more stuff to happen on the HQ front.

zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 20th Oct 2004 01:58
Quote: "I say make the game require a gamepad with two analog sticks and use those for sword and shield."


Just a personal opinion, but gag me with a flamberge. I so hate the latest generation of game controllers. I want to see gross movement and not hyper twitch. A mouse forces you to swing that arm and not flick it with your thumb. In a combat simulation, recovery from a swing is just as important as making the initial attack. Spring loaded reflexes are not the order of the day.
--
TAZ, old school arcade gamer

"Do you think it is wise to provoke him?" "It's what I do." -- Stargate SG-1
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 20th Oct 2004 02:28
ok i stuffed around with the 3d guy for a while, made his limb move with teh mouse but only very slowly. mighta just been the code i picked from a dbc example, but the way i wrote it it was as if it wasnt picking up the movement fromt he mouse very well. will try and get an fps version of it, maybe the ne wcode will work better. the example was dba10 i believe, pretty much copied teh way it gets the object to turn but instead made it do that to a limb.

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 20th Oct 2004 03:14
Ok I'll stop it with the animations .

But just look at that heroquest box for a sec, the big barbarian dude, the dwarf too - How you gonna do those sorts of attack realistically with a mouse controlled sword?


Van-B


Muhahahahaha.
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 20th Oct 2004 10:54
by rolling it around in such a fashion as to mimic the arm movement.

Baggers
21
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 26th Oct 2004 02:28 Edited at: 26th Oct 2004 10:08
OK just to jump back to the idea of controlling a sword by mouse (because ive been dying for a game that did that properly) i've had a quick bash at a start of a sword controled by mouse.
The source can be used freely, hope it helps (p.s. it takes screen size into account so it will behave the same on all resolutions, also the required floor texture is downloadable below)

Problems:
* It would be nice to see the motion smoothed so it gives the user an impression of weight behind the sword, might have a go at coding that soon.
* The 'sword' doesnt turn as you swing, i had a quick go at doing this but i got fustrated when i realised how easy it would be if i had the rotation patch !

Other than that, stick with the idea of proper sword fighting swords, the pre-animated ones like in theif just don't match up.

Baggers

Attachments

Login to view attachments
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 26th Oct 2004 11:36
just tried out your source, yeah thats sort of what I was after, just need to add the rotation and arm model to make the pivot point look more realistic. also need to make it move only when clicking the mouse and moving but thats just a simple lil piece of code anyway. nice work.

Cian Rice
21
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 26th Oct 2004 11:46
Did you notice that you've been here a year longer than Baggers, and counting days and not hours your exactly here a year longer. Just thought I'd point that out, that code looks pretty nice by the way.

There is only one way to package shaolin: Shaolin Soccer...
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 26th Oct 2004 14:09
There was this game on the net where you were a ninja and guys would run at you and you would slide the mouse across the screen and his sword would go SWIPE and you could chop up guys into any size pieces you wanted.

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
Baggers
21
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 26th Oct 2004 15:13
Thanks for the comments,
oh as far as Uberwiggett's date of joining being exactly 1 year after mine, it all comes down to being a <excuse the use of a technical term> A FECK'IN PIRATE, thats right people, when may the 31st arives and the moon beams its full face on us all, it is the pirate equinox when one more must pass out of the realms of pure awesomeness to join the world of modern man for eduate hi..........
oh no wait it was just a co-insidence !

Cya !
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 26th Oct 2004 19:59
1 year before you mean, but its cool, us pirates from the land of awesomeness only count well when it counts.
Quote: "HA i made another funny! - splinter"


Baggers
21
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 27th Oct 2004 05:39
YARR !
....seemed a little wastful to post just that, however i cant for the life of me think up some filler to justify the essentialy pointless creation of such a post, oh wait ive done it...
Baggers
21
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 28th Oct 2004 20:15
If anyone wants to post a link or email me a good sword and hand model ill see if i can extend the code so it functions better, only thing is it requires it looks like a hand holding a sword and i suck at modeling, any help would be most welcome.
Thanks
Baggers
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 2nd Nov 2004 22:58 Edited at: 2nd Nov 2004 23:03
Hey Rob, I recently came up with a neat weapon collision system. It basically detects if a 3D line intersects a sphere, you just call a function with the 2 sets of 3D points, the position of the sphere, and it's radius - and it checks for collision.

The idea is you check each bone and some bone mid-points for collision against the swords tip and base. It'd also work for arrows - like fire an arrow and have it stick out of the character like in the recent LOTR console games. It always makes me laugh when you get guys running around all spikey because of an archer assault!.

I'm using it for bullet collision right now and it's working great, so bear it in mind when your looking into that stuff - or just let me know if you'd like some code to show it working.


Van-B


Muhahahahaha.
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 2nd Nov 2004 23:17
hey van, that sounds neat, not entirely following with what you have written but if you could put some sort of demo up it'd be easier, im working with another bloke on a mog style game that will probably have this sort of fighting, though hopefully 3rd person. but anyway yeah i'd love to test it out.

hmm
21
Years of Service
User Offline
Joined: 11th Oct 2003
Location:
Posted: 21st Nov 2004 02:02 Edited at: 21st Nov 2004 02:09
I got inspired by this post and made a little demo showing the fps sword swinging controlled by movimg the camera;



hold left mouseclick to swicng the sword (follows movement of camera but swings about more)
right mouseclick to raise shield.

w,a,s,d = move

coincidence? how about pure cosmic convergence!
Veronique
20
Years of Service
User Offline
Joined: 30th Aug 2004
Location:
Posted: 30th Nov 2004 08:23 Edited at: 13th Dec 2004 01:51
Well i had a sword i did make for long time ago

but it is only temporery then i can make another one.

i did attach the .x file if you can use it just in the waiting time for another sword is made.

266 faces
(image removed)
Veronique
20
Years of Service
User Offline
Joined: 30th Aug 2004
Location:
Posted: 7th Dec 2004 20:02 Edited at: 13th Dec 2004 01:50
well here is a untextured one if you still need a sword.

(image removed)
Veronique
20
Years of Service
User Offline
Joined: 30th Aug 2004
Location:
Posted: 8th Dec 2004 09:50 Edited at: 13th Dec 2004 01:50
ok i did make some textur for this
and did attach it as a .x file if you still work on this..

(Image removed)
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 12th Dec 2004 17:34
tahts a fine textured sword you got there, when i get round to doing some more work on my mmog i'll ask to borrow it. but one question, do you come with the sword??

Veronique
20
Years of Service
User Offline
Joined: 30th Aug 2004
Location:
Posted: 13th Dec 2004 01:49
before i get any more problems i must say the sword design is by Kit Rae.

i did remove the files but if you still like to use it mail me ok.
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 13th Dec 2004 08:34
ok bu tonly if you're a babe.

Veronique
20
Years of Service
User Offline
Joined: 30th Aug 2004
Location:
Posted: 13th Dec 2004 17:40
i dont know if im a babe maby im the wrong one to answer that question
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 13th Dec 2004 19:09
well depends are you female? oh and im doin work on photoshop makin some graphics for both the mmog im workin on and western themed stuff for anyoen interested

Spaceman Spiff
21
Years of Service
User Offline
Joined: 27th Jan 2004
Location: Smacking my head on your keyboard.
Posted: 13th Dec 2004 20:26
There's somethin' very wrong with you Robx.

Takes 1 2 no 1
Veronique
20
Years of Service
User Offline
Joined: 30th Aug 2004
Location:
Posted: 13th Dec 2004 21:34
yes i am a female..
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 13th Dec 2004 22:47
can i see a photo hehe damn im smooth

Veronique
20
Years of Service
User Offline
Joined: 30th Aug 2004
Location:
Posted: 13th Dec 2004 22:50 Edited at: 13th Dec 2004 22:54
no and i guess you dont ask every member on this forum for a photo
and sex dont really matter in here do it..
Cian Rice
21
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 14th Dec 2004 05:38
He's just joking around.

Have a heart and join my message board.
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 14th Dec 2004 07:04
of course i dont ask members on here for their photo, anyone who is important has already had their photo on one of those show your photo things.

Veronique
20
Years of Service
User Offline
Joined: 30th Aug 2004
Location:
Posted: 14th Dec 2004 16:43
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 14th Dec 2004 17:21


ALPHA ZERO PRODUCTIONS
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 17th Dec 2004 08:55
oh plz....my little brother is smoother


ALPHA ZERO PRODUCTIONS
NEW WEBSITE ONLINE
Wiggett
22
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 17th Dec 2004 18:10
does he have an annoying sig

Bobbbygd
20
Years of Service
User Offline
Joined: 15th Jan 2005
Location:
Posted: 15th Jan 2005 16:15
Back to the subject at hand, i think that you could do something like in Jedi Knight II, if you go into first person, and then get out a lightsaber, you can slash any which way you want, and I think it would be very easy to program.

Fear is the mind killer. Fear is the little death that brings total obliteration - The Litany Agaist Fear
Gil Galvanti
20
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 15th May 2005 07:11
i was thinking about this for my game. About the jedi thing, i was also thinking of doing that, but my game is "Pirates of Port Royale" and its not lightsabers, i think that configuration is great for lightsabers, but im not sure it would work well for a 1600's sword fighting style . Any ideas?

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Gil Galvanti
20
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 18th May 2005 08:27
/bump

Video games…they take you places unreachable, unfeasible. Putting you in the book...putting you in the movie...putting you in a world, that before could only be imagined. expage.com/piratesmainpage.

Login to post a reply

Server time is: 2025-06-12 10:55:37
Your offset time is: 2025-06-12 10:55:37