Difference between revisions of "Q3osc"

From CCRMA Wiki
Jump to: navigation, search
m (links)
(things to think about)
Line 280: Line 280:
 
* [http://caia.swin.edu.au/urp/l3dge/tools/l3dgeworld/index.html l3dgeWorld]
 
* [http://caia.swin.edu.au/urp/l3dge/tools/l3dgeworld/index.html l3dgeWorld]
 
* [http://www.stanfordalumni.org/news/magazine/2008/janfeb/features/virtual.html Stanford's Jeremy Bailenson VR]
 
* [http://www.stanfordalumni.org/news/magazine/2008/janfeb/features/virtual.html Stanford's Jeremy Bailenson VR]
 +
* [https://terrapeer.dev.java.net/resources.html virtual world resources]
  
 
===bundle data: 1/13/08===
 
===bundle data: 1/13/08===

Revision as of 16:57, 26 January 2008

q3osc-halo2.jpg

 

about

q3osc is an update of the manner in which the quake3 gaming engine can be used to export player locations and entity movements and actions outside of the q3 server via OSC. While q3osc is working from a fresh ioquake3 codebase, the inspiration came from pix + delire's excellent Q3APD project, which unfortunately makes use of the string-based FUDI protocol instead of a more flexible proper OSC protocol.

After using Q3APD for the 8-channel work maps & legends, it became apparent that while the mod was great, the idea could be improved and further explored, especially in terms of using OSC instead of FUDI, additional player gestures and data-points being exported from quake3 to an external audio engine. Since Q3APD used the string-based FUDI UDP implementation, rather than a full-blown standards-based OSC implementation, only PD could reasonably be used as the recipient of Q3APD outgoing data-streams. Since there are other excellent languages to be used, osc is a better choice.

With q3osc, the goal is to use a fully-featured OSC implementation like oscpack to not only recreate the basic user-coordinate tracking from Q3APD, but to also expand the scope of usable in-game parameters to include missle objects and other actionable items and events in the game world. Using OSC, we can implement audio engines built in any osc-capable audio software, such as ChucK, Max/MSP, SuperCollider or PD.

By adding behavioral controls to in-game entities like plasma and bfg-bolts (both of which have interesting visual attributes), visual in-game behaviors like bouncing and attraction/homing both to self and other in-game entities, we can create audio gestures which tightly follow the visual gestures.


media


current status

feature list

  • individual client x,y,z coordinates: ✓
  • homing bfg: ✓
  • homing plasma: ✓
  • homing rockets: ✓
  • cvar projectile speeds: ✓
  • bounce-able plasma, bfg: ✓
  • independent plasma, bfg speeds: ✓
  • bindable homing and bounce flags: ✓
  • independently addressable osc host and port outs for client vs projectiles: ✓
  • forced-destruct of projectiles (plasma, bfg, plasma-homing, bfg-homing): ✓
  • OSC bundle or single-line message output modes: ✓
"b" ("/bind b bounce") enable/disable plasma bounce
"h" ("/bind h homing") enable/disable plasma, rocket and bfg homing
"n" ("/bind h bfgbounce") enable/disable bfg bounce
"p" ("/bind p parenthoming") enable/disable parent homing
"y" ("/bind y plasmapersist") enable/disable
"u" ("/bind u bfgpersist") enable/disable
"i" ("/bind i plasmahomingpersist") enable/disable
"o" ("/bind o bfghomingpersist") enable/disable
osc_projectile_hostname missle-events can have their own OSC target IP
osc_projectile_port missle-events can have their own OSC target Port
osc_client_hostname client-events can have their own OSC target IP
osc_client_port client-events can have their own OSC target Port
osc_send_client 0/1 flag to output client data over OSC
osc_send_projectile 0/1 flag to output projectile data over OSC
osc_bundle boolean to pass bundles (1) or messages (0 - default)
g_homing_speed initial and tracking speed for all missles fired with homing enabled
g_homing_radius default 1000 - sets radius for homing entity search
g_plasma_speed speed for non-homing plasma bolts
g_plasma_bounce enable/disable (1/0) bouncing for plasma bolts
g_bfg_bounce enable/disable (1/0) bouncing for bfg bolts
g_bfg_speed speed for non-homing bfg bolts
g_plasma_time set decay/fade-out time
g_bfg_time set decay/fade-out time
g_rocket_time set decay/fade-out time
g_parent_homing turn on/off parent homing

enhancements

dedicated server support

OSC input functionality

assignable clientID projectile tracking

individual control of projectiles (speed, xyz)

changeable color for each user for plasma and bfg

update history

1/25/08
  • created q3osc.ck ChucK main processes/class-models
  • made "/<classname" descriptor for each osc projectile message and "/player" for osc client messages.
1/24/08
  • added sendOSCmessage and sendOSCbundle switched by osc_bundle boolean
  • added cg_plasma_trail_length to cg_local.h et al.
1/21/08
  • added osc_bundle checks to determine whether bundles or single multi-field osc messages are sent
  • split sendOSCMessage_projectile into sendOSCmessage_projectile... and sendOSCbundle_projectile... using osc_bundle boolean as switch between methods
  • added methods and check for boolean into g_missile code
1/20/08
1/20/08
  • using cg_oldPlasma 0
1/19/08
  • added g_plasma_persist, and g_homing_persist and used in checks on G_HomingMissle to trigger expiration of all typed entities
  • added g_plasma_homing_persist, g_bfg_homing_persist and logic track them in G_HomingMissle
  • added bindable "plasmahomingpersist", "bfghomingpersist"
1/18/08
  • added osc_send_projectile, osc_send_client booleans to turn on and off osc output
  • added g_bfg_persist flag: 1 postpones ent->nextthink so bfgs don't explode... when flag is set to 0, then after g_bfg_time G_ExplodeMissile will be called and all bfg entites bouncing around will explode/go away
1/16/08
  • added g_homing_radius
  • recorded video demo of homing balls
  • /record balls1
  • /stoprecord
  • /demo balls1
  • /video (converts to .avi from demo format)
1/13/08
  • Added insane g_parent_homing flag to allow projectiles to home on their parent client. This can create great spheres of entites revolving around the client when g_homing_speed in set just so.
1/11/08
  • Running q3osc with client data output as bundles to one IP/Port while projectile data is routed to its own IP/Port. Homing and bounce are triggered by client variables, so each client can decide for him/herself whether or not homing/bounce are enabled.
1/09/08
  • Ludicrous bouncing/homing enabled for Plasma and BFG projectiles. Added g_homing_speed, g_plasma_speed, g_rocket_speed cvars. Added g_plasma_bounce (taken from q3apd)
  • g_synchronousClients 1 : synchronizes client messages but purportedly makes playability more difficult... will see.
1/08/08
  • missle tracking working; need to isolate individual gentity_t id's for each rocket, as well as target ids (this can probably be gleaned from the radius reference)
  • osc bundle output working: needed to "#define OSC_HOST_LITTLE_ENDIAN 1" in OscHistEndianness.h (oscpack) for linux system. Will need to re-set this for Windows compilation.
  • Osc output console variables "/osc_hostname" and "/osc_port" are working. Currently designing and implementing osc namespace.
1/03/08
  • osc output from test.cpp using oscpack compiled into ioquake3 engine successfull using homing rocket as trigger. Now moving on to isolate good params for export including the methods used in q3apd plus new goodies.
12/29/07
  • initial linking success with test.cpp, thanks to ge's sweet sweet compiler flags:
$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ)
 $(CC) $(SHLIBLDFLAGS) -lstdc++ -o $@ $(Q3GOBJ)
$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ)
 $(CC) $(SHLIBLDFLAGS) -lstdc++ -o $@ $(Q3GOBJ)
DO_CPP=$(CPP) $(BASE_CPPFLAGS) $(SHLIBCFLAGS) -o $@ -c $<

Makefile
Makefile.local

12/07
  • uber-beta floundering; while test .cpp classes are compiling correctly, something is going screwy in the linking process, which causes qagamei386.so to fail on the foo method call (see below)
Loading dll file qagame.
Sys_LoadDll(/user/r/rob/data/q3/dev/ccrma-kdevelop/build/release-linux-i386/ccrma/qagamei386.so)...
Sys_LoadDll(/user/r/rob/data/q3/dev/ccrma-kdevelop/build/release-linux-i386/ccrma/qagamei386.so) failed:
"Failed loading /user/r/rob/data/q3/dev/ccrma-kdevelop/build/release-linux-i386/ccrma/qagamei386.so:   
/user/r/rob/data/q3/dev/ccrma-kdevelop/build/release-linux-i386/ccrma/qagamei386.so: undefined symbol: foo"

references

Hamilton, R., "Maps and Legends: FPS-Based Interfaces For Composition and Immersive Performance" In Proceedings of the International Computer Music Association Conference, Copenhagen, Denmark, 2007.


dev shortcuts

rm -rf ccrma && mv baseq3 ccrma && ./ioquake3.i386 +set sv_pure 0 +set fs_game ccrma +devmap space +set vm_ui 0 +set vm_cgame 0 +set vm_game 0 +set cg_draw2d 0 +set cg_drawGun 0 
~/.openarena/ccrma/screenshots
/cg_thirdPerson (0/1; default: 0)
/cg_thirdPersonAngle (0-360; default: 0)
/cg_thirdPersonRange (default: 40)
/r_mode -1
/r_customheight 1021
/r_customwidth 1672
/vid_restart
r_ext_texture_filter_anisotropic 4
r_flares 1
cg_shadows 2
r_stencilBits 8
r_detailTextures 1
/com_blood 0

things to think about

bundle data: 1/13/08

196 byte message:
23 (#)  62 (b)  75 (u)  6e (n)
64 (d)  6c (l)  65 (e)  0 ()
0 ()    0 ()    0 ()    0 ()
0 ()    0 ()    0 ()    1 ()
0 ()    0 ()    0 ()    18 ()
2f (/)  63 (c)  6c (l)  61 (a)
73 (s)  73 (s)  6e (n)  61 (a)
6d (m)  65 (e)  0 ()    0 ()
2c (,)  73 (s)  0 ()    0 ()
70 (p)  6c (l)  61 (a)  73 (s)
6d (m)  61 (a)  0 ()    0 ()
0 ()    0 ()    0 ()    18 ()
2f (/)  70 (p)  72 (r)  6f (o)
6a (j)  65 (e)  63 (c)  74 (t)
69 (i)  6c (l)  65 (e)  6e (n)
75 (u)  6d (m)  0 ()    0 ()
2c (,)  69 (i)  0 ()    0 ()
0 ()    0 ()    0 ()    54 (T)
0 ()    0 ()    0 ()    1c ()
2f (/)  6f (o)  72 (r)  69 (i)
67 (g)  69 (i)  6e (n)  0 ()
2c (,)  66 (f)  66 (f)  66 (f)
0 ()    0 ()    0 ()    0 ()
42 (B)  ffffffcc (?)    f ()    ffffffaa (?)
45 (E)  1f ()   6e (n)  0 ()
ffffffc5 (?)    11 ()   ffffffdd (?)    ffffffd0 (?)
0 ()    0 ()    0 ()    14 ()
2f (/)  6f (o)  77 (w)  6e (n)
65 (e)  72 (r)  6e (n)  75 (u)
6d (m)  0 ()    0 ()    0 ()
2c (,)  69 (i)  0 ()    0 ()
0 ()    0 ()    0 ()    0 ()
0 ()    0 ()    0 ()    14 ()
2f (/)  74 (t)  61 (a)  72 (r)
67 (g)  65 (e)  74 (t)  6e (n)
75 (u)  6d (m)  0 ()    0 ()
2c (,)  69 (i)  0 ()    0 ()
0 ()    0 ()    0 ()    37 (7)
0 ()    0 ()    0 ()    10 ()
2f (/)  62 (b)  6f (o)  75 (u)
6e (n)  63 (c)  65 (e)  0 ()
2c (,)  69 (i)  0 ()    0 ()
0 ()    0 ()    0 ()    1 ()
0 ()    0 ()    0 ()    14 ()
2f (/)  65 (e)  78 (x)  70 (p)
6c (l)  6f (o)  64 (d)  65 (e)
0 ()    0 ()    0 ()    0 ()
2c (,)  69 (i)  0 ()    0 ()
0 ()    0 ()    0 ()    0 ()
[ 000000001
/classname "plasma" 
/projectilenum 84 
/origin 102.030594 2550.875000 -2333.863281 
/ownernum 0 
/targetnum 55 
/bounce 1 
/explode 0 


links