Characters other than the player are controlled by a strategy,
encoded as an integer value. Possible movement style include
random, straight, back and forth, up and down, attack,
retreat, random attack, and random aggressive. A character
moves along its current path, specified by a deltaX and
a deltaY value, until it encounters an obstacle or reaches
the edge of the room. At this point, it re-evaluates the
deltaX and deltaY. For example, “back and forth” simply
negates the current deltaX value, while the “up and down”
negates deltaY. “Random attack” updates the path whenever
the character reaches an obstacle or edge. Half of the
time (if (Math.random() > 0.5)) it will set the delta values
on a path to the player’s current location, otherwise it
will set them randomly.
The straight movement pattern corresponds to something
that becomes inactive upon reaching an obstacle or edge,
such as a falling rock. The game engine assigns this movement
style to projectiles.
Some movement types update the deltaX and deltaY every
time. The “attack” movement always comes after the
player, and will change course as soon as the player does,
while “retreat” always moves away. The “random aggressive”
movement has the character go directly after the player randomly,
but not too often. The threshold value is set to 0.91,
meaning that it moves along its current path 91% of the
time, and the rest of the time it changes its path to go after
the player. This threshold was determined after experimentation,
but should not be considered an optimal value, nor
should it be considered precise.
A future enhancement is to add more movement patterns,
perhaps controlled by a finite state machine or AI technique.
Characters other than the player are controlled by a strategy,encoded as an integer value. Possible movement style includerandom, straight, back and forth, up and down, attack,retreat, random attack, and random aggressive. A charactermoves along its current path, specified by a deltaX anda deltaY value, until it encounters an obstacle or reachesthe edge of the room. At this point, it re-evaluates thedeltaX and deltaY. For example, “back and forth” simplynegates the current deltaX value, while the “up and down”negates deltaY. “Random attack” updates the path wheneverthe character reaches an obstacle or edge. Half of thetime (if (Math.random() > 0.5)) it will set the delta valueson a path to the player’s current location, otherwise itwill set them randomly.The straight movement pattern corresponds to somethingthat becomes inactive upon reaching an obstacle or edge,such as a falling rock. The game engine assigns this movementstyle to projectiles.Some movement types update the deltaX and deltaY everytime. The “attack” movement always comes after theplayer, and will change course as soon as the player does,while “retreat” always moves away. The “random aggressive”movement has the character go directly after the player randomly,but not too often. The threshold value is set to 0.91,meaning that it moves along its current path 91% of thetime, and the rest of the time it changes its path to go afterthe player. This threshold was determined after experimentation,but should not be considered an optimal value, norshould it be considered precise.A future enhancement is to add more movement patterns,perhaps controlled by a finite state machine or AI technique.
การแปล กรุณารอสักครู่..

อักขระอื่นนอกจากผู้เล่นจะควบคุมโดยกลยุทธ์
เข้ารหัสเป็นจำนวนเต็มค่า รูปแบบการเคลื่อนไหวที่เป็นไปได้รวมถึง
สุ่ม , ตรง , กลับ , ขึ้นและลง , โจมตี ,
ถอย สุ่มโจมตี และสุ่มที่ก้าวร้าว ตัวละคร
ย้ายตามเส้นทางปัจจุบัน ระบุ โดย deltax และ
เป็น deltay ค่า จนกว่าจะพบอุปสรรคหรือถึง
ขอบห้อง ณจุดนี้มันกำลังประเมิน
deltax และ deltay . ตัวอย่างเช่น " กลับมา " เพียง
negates มูลค่า deltax ในปัจจุบัน ขณะที่ " ขึ้นและลง "
negates deltay . " โจมตี " สุ่มการปรับปรุงเส้นทางเมื่อ
ตัวละครถึงอุปสรรคหรือขอบ ครึ่งหนึ่งของ
เวลา ( ถ้า ( คณิตศาสตร์ random() > 0.5 ) มันจะตั้งเดลต้าค่า
บนเส้นทางไปยังตำแหน่งปัจจุบันของผู้เล่น หรือมิฉะนั้น ก็จะตั้งให้
แบบสุ่มรูปแบบการเคลื่อนไหวตรงสอดคล้องกับสิ่งที่
ที่กลายเป็นใช้งานเมื่อถึงอุปสรรคหรือขอบ
เช่นหินถล่ม . เครื่องยนต์เกมกำหนดรูปแบบการเคลื่อนไหว
บางชนิดนี้ ขีปนาวุธ และทุกการเคลื่อนไหวปรับปรุง deltax deltay
ครั้ง " โจมตี " เคลื่อนไหวมักจะมาหลังจากที่
ผู้เล่น และจะเปลี่ยนแน่นอน ทันทีที่ผู้เล่นไม่
ในขณะที่ " ถอย " เสมอย้ายไป" สุ่มก้าวร้าว "
เคลื่อนไหวได้ตัวไปหลังจากเล่นสุ่ม ,
แต่ไม่ค่อยบ่อย ค่าเกณฑ์ตั้งเป็น 0.91
ความหมายมันเคลื่อนไปตามเส้นทางปัจจุบัน 91% ของ
เวลาและส่วนที่เหลือของเวลาจะเปลี่ยนเส้นทางไปหลังจาก
ผู้เล่น เกณฑ์นี้ตัดสินหลังการทดลอง
แต่ไม่ควรพิจารณาค่าเหมาะสมหรือ
มันควรได้รับการพิจารณาที่ชัดเจน การเพิ่มในอนาคตคือการเพิ่มรูปแบบการเคลื่อนที่มากขึ้น
ควบคุมบางทีโดยจำกัดสภาพเครื่องจักรหรือ AI
)
การแปล กรุณารอสักครู่..
