What is the best control system for a 3rd person game on the PC? Should the controls be simple and easy to use, or complex but versatile with different modes like select object mode and combat mode? Consider this for a zelda style actiona/adventure/rpg.
I've made a little demo showcasing 3 styles. Please comment on which one u think is best. If you think theres a style I should try to add, please let me know.
edit: mode 4 now added. Kind of like mode 1 but with automatic following camera.
` 3rd person engine - version 2
` setup
sync on:sync rate 0
` make world
make matrix 1,2000,2000,20,20
` make player
make object box 1,50,100,50
` mode
mode#=1
` loop
do
set cursor 0,0
attack=0
` mode
m#=val(inkey$())
if m#>0 and m#<5 then mode#=m#
` mode 1 and 2
if mode#=1 or mode#=2
` camera
ax#=wrapvalue(ax#-mousemovey()/2)
ay#=wrapvalue(ay#+mousemovex())
cay#=curveangle(ay#,camera angle y(),20)
cax#=curveangle(ax#,camera angle x(),20)
position camera object position x(1),object position y(1),object position z(1)
rotate camera cax#,cay#,0
move camera -400
endif
` mode 3
if mode#=3
` camera
ay#=curveangle(object angle y(1),ay#,60)
cd#=-400
cx#=newxvalue(x#,ay#,cd#):cz#=newzvalue(z#,ay#,cd#):cy#=250
cx#=curvevalue(cx#,camera position x(),50)
cz#=curvevalue(cz#,camera position z(),50)
cy#=curvevalue(cy#,camera position y(),50)
position camera cx#,cy#,cz#
point camera x#,75,z#
endif
` mode 4
if mode#=4
` point
point camera x#,75,z#
ay#=camera angle y()
` distance
if distance(object position x(1),75,object position z(1),camera position x(),camera position y(),camera position z())>300
` calculate camera position
cd#=-300
cx#=newxvalue(x#,ay#,cd#):cz#=newzvalue(z#,ay#,cd#):cy#=250
cx#=curvevalue(cx#,camera position x(),80)
cz#=curvevalue(cz#,camera position z(),80)
cy#=curvevalue(cy#,camera position y(),80)
` position
position camera cx#,cy#,cz#
` point
point camera x#,75,z#
endif
` distance
if distance(object position x(1),75,object position z(1),camera position x(),camera position y(),camera position z())<200
` calculate camera position
cd#=-200
cx#=newxvalue(x#,ay#,cd#):cz#=newzvalue(z#,ay#,cd#):cy#=250
cx#=curvevalue(cx#,camera position x(),80)
cz#=curvevalue(cz#,camera position z(),80)
cy#=curvevalue(cy#,camera position y(),80)
` position
position camera cx#,cy#,cz#
` point
point camera x#,75,z#
endif
endif
` mode 1 or 3
if mode#=1 or mode#=3 or mode#=4
move=0
if upkey()=1 then a#=ay#:move=1
if downkey()=1 then a#=wrapvalue(ay#+180):move=1
if rightkey()=1 then a#=wrapvalue(ay#+90):move=1
if leftkey()=1 then a#=wrapvalue(ay#+270):move=1
a#=curveangle(a#,object angle y(1),30)
` move
if move=1 then x#=newxvalue(x#,a#,3):z#=newzvalue(z#,a#,3):yrotate object 1,a#
endif
` mode 2
if mode#=2
d#=3
dir1=0:dir2=0:dir3=0:dir4=0
if upkey()=1 then dir1=1
if downkey()=1 then dir2=1
if rightkey()=1 then dir3=1
if leftkey()=1 then dir4=1
a#=curveangle(ay#,object angle y(1),30)
` move
div#=dir1+dir2+dir3+dir4
if div#>0
if div#=2 then d#=sqrt(d#)
if dir1=1 then x#=newxvalue(x#,a#,d#):z#=newzvalue(z#,a#,d#)
if dir2=1 then x#=newxvalue(x#,a#+180,d#):z#=newzvalue(z#,a#+180,d#)
if dir3=1 then x#=newxvalue(x#,a#+90,d#):z#=newzvalue(z#,a#+90,d#)
if dir4=1 then x#=newxvalue(x#,a#-90,d#):z#=newzvalue(z#,a#-90,d#)
endif
yrotate object 1,a#
endif
` notes
print "1,2,3,4 keys - select mode"
print "mode: "+str$(mode#)
print " "
if mode#=1
print "Arrowkeys - Move"
print "Mouse - Look"
print "Mouseclick - Attack"
if Mouseclick()=1 then attack=1
endif
if mode#=2
print "Arrowkeys - Move/Strafe"
print "Mouse - Look"
print "Mouseclick - Attack"
if Mouseclick()=1 then attack=1
endif
if mode#=3
print "Arrowkeys - Move"
print "Shiftkey - Attack"
if shiftkey()=1 then attack=1
endif
` position object
position object 1,x#,50,z#
` attack
if attack=1 then print "ATTACK!!!"
sync
loop
` distance function 3D
function distance(x#,y#,z#,x1#,y1#,z1#)
` distance
dx#=x#-x1#:dz#=z#-z1#
dist#=sqrt(dx#^2+dz#^2)
endfunction dist#
coincidence? how about pure cosmic convergence!