Skip to content

Commit

Permalink
Updates speed (#57)
Browse files Browse the repository at this point in the history
* Adds worm updates

* Shrinks map
  • Loading branch information
MaxEdwards20 authored Apr 9, 2024
1 parent 63d0bbb commit 55341d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Server/GameModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class GameModel
private CollisionDetection m_systemCollisionDetection = new CollisionDetection();
private CollisionHandler m_systemCollisionHandler = new CollisionHandler();
Systems.Network m_systemNetwork = new Server.Systems.Network();
private int mapSize = 5000;
private int mapSize = 3000;

/// <summary>
/// This is where the server-side simulation takes place. Messages
Expand Down Expand Up @@ -178,7 +178,7 @@ private void createNewWorm(int clientId, string name)
var headStartLocation = getLeastDenseStartLocation();
var segmentStartLocation = new Vector2(headStartLocation.X - 75, headStartLocation.Y);
var rotationRate = (float) Math.PI / 1000;
var moveRate = 0.1f;
var moveRate = 0.3f;
var headSize = 100;
var bodySize = 80;

Expand Down
2 changes: 1 addition & 1 deletion src/Shared/Systems/WormMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private void applyThrust(Entity wormHead, TimeSpan elapsedTime)
var headPosition = head.get<Position>();
var frameTotalMovement = movement.moveRate * (float)elapsedTime.TotalMilliseconds;
var orientation = headPosition.orientation;
float LOCATION_THRESHOLD = 2f;
float LOCATION_THRESHOLD = movement.moveRate * 20;
const float MIN_SEGMENT_SPACING = 30f;
const float IDEAL_SEGMENT_SPACING = 40f;

Expand Down

0 comments on commit 55341d8

Please sign in to comment.