Crowd/ Battle simulation

You could make the bounding box a field of sight. No need to calc the distance of the archers on top of the hill unless you have a weapon to reach them.

Not to say don’t do it but truthfully I think this would be used
more in a non interactive mode.

(Both have uses but you should hammer out which your doing
or if both thats fine, the way to go about it is different for each however since the api isn’t the same in both)

this sounds really awesome – good luck and all. Have you been to www.massivesoftware.com they’re selling it for $40,000-- there isn’t much on the website though.

What do you guys think of this:


import Blender
from Blender import Object
import sys
from Blender import NMesh 
s = 1
while s <10:
	me = NMesh.GetRaw()
	# flag indicating that there is no uvmapping 
	me.has_uvco=0 
	# flag indicating that the faces are not colored 
	me.has_col=0
	v=NMesh.Vert(1.0,0.0,0.0)
	me.verts.append(v)
	v=NMesh.Vert(1.0,1.0,0.0) 
	me.verts.append(v) 
	v=NMesh.Vert(0.0,1.0,0.0) 
	me.verts.append(v) 
	v=NMesh.Vert(0.0,0.0,0.0) 
	me.verts.append(v)
	f=NMesh.Face()
	f.v.append(me.verts[0 ]) 
	f.v.append(me.verts[1 ]) 
	f.v.append(me.verts[2 ]) 
	f.v.append(me.verts[3 ]) 
	me.faces.append(f)
	NMesh.PutRaw(me, "orc" + str(s), 1) 
	s = s + 1
L = Object.Get()
sys.stdout.flush()
a = 0
for obj in L:
	a = a + 1
y = 1
z = -1
while y < (a + 1):
	for obj in L:
		obj.name="orc" + str(y)
		L = Object.Get()
		sys.stdout.flush()
		obj.LocX = (y * z)
		y = y + 1
		z = z * -1

Blender.Redraw()
 

This is just a simple code for generating 9 orcs and naming them and lineing them up. The orcs are planes right now. But this could be done with a model also, if you wanted to map the verticies. Would this be the way to go for generating an army? Run one script for the orcs…save it then one for the humans save that one too. Then load them into a combat scene with scripts? Can armatures be created with python?

ps: Delete everything in the scene first or your camera will be named orc too. Also I get an error running this with 2.25. I think I just need to change some syntax not sure haven’t had a lot of time to go over it.

The guy that wrote massive said that – ( can’t remember the exact words) but release a lite freeware version. – It was either in 3dWorld magazine or CGI I can’t remember. But that would really be intereting- I just had a quick squiz at the article- thats really all I saw-- But it would definately be worth looking into.