Multiplayer-Game ! internet
Kannst du bitte mal die Performance mit 32 Figuren plus (low)Spiegelung bei dir Testen !




import Blender
import string as s
from GameLogic import *
con = GameLogic.getCurrentController()
act = con.getActuators()[0]
obj = Blender.Object.Get("Indicator")
own = con.getOwner()
select = 0
scene = getCurrentScene()
ObjectList = scene.getObjectList()
x_list = ['A','B','C','D','E','F','G','H']
y_list = [1,2,3,4,5,6,7,8]
own.z = own.getPosition()[2]
own.y = own.getPosition()[1]
own.x = own.getPosition()[0]
Select = scene.getObjectList()["OBSelect"]
for i in range(0,len(ObjectList)):
name1 = ObjectList[i].getName()
if (s.find(name1,"PL") > 1):
TestObject = scene.getObjectList()[name1]
if (TestObject.x == own.x/4) and (TestObject.y == own.y/4):
if (Select.select < 1):
TestObject.selected = 1
else:
TestObject.selected = 0
step = 4
if (con.getSensor("Up").isPositive()):
if (own.y/4 < 7):
own.y = own.y + step
own.setPosition([own.x,own.y,own.z])
elif (con.getSensor("Down").isPositive()):
if (own.y > 0):
own.y = own.y - step
own.setPosition([own.x,own.y,own.z])
elif (con.getSensor("Left").isPositive()):
if (own.x > 0):
own.x = own.x - step
own.setPosition([own.x,own.y,own.z])
elif (con.getSensor("Right").isPositive()):
if (own.x/4 < 7):
own.x = own.x + step
own.setPosition([own.x,own.y,own.z])
own.xdisp = x_list[own.x/step]
own.ydisp = y_list[own.y/step]
import Blender
from GameLogic import *
con = GameLogic.getCurrentController()
own = con.getOwner()
own.z = own.getPosition()[2]
scene = getCurrentScene()
step = 4
select = 0
Indicator = scene.getObjectList()["OBIndicator"]
x_pos = Indicator.x/4
y_pos = Indicator.y/4
if (Indicator.grab == 1) and (own.selected):
own.setPosition([x_pos*4,y_pos*4,own.z])
own.x = x_pos
own.y = y_pos
else:
own.setPosition([own.x*4,own.y*4,own.z])
import Blender
import string as s
from GameLogic import *
con = GameLogic.getCurrentController()
own = con.getOwner()
select = 0
scene = getCurrentScene()
ObjectList = scene.getObjectList()
for i in range(0,len(ObjectList)):
name1 = ObjectList[i].getName()
if (s.find(name1,"PL") > 1):
TestObject = scene.getObjectList()[name1]
if (TestObject.selected):
select = select + 1
print select
own.select = select






ReSeT hat geschrieben:Ich denke Keith meint wohl eher 2.8 GHz.
Lasst mich raten, da wärt Ihr jetzt nicht drauf gekommen.