Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    5
  • comment
    1
  • views
    479

#5 - Testing the attributes

Jaap85

1146 views

Since my last update, i have implemented most of the attributes in Cycling - The board game.

Quick recap: the game is about getting to the finish line first. Each turn, each player rolls a dice (D6) and moves the amount of squares. The odds of the dice are rigged based on the player's strength (higher strength = better odds). Next to the dice roll the player can gain bonuses to move additional squares. These bonuses are based on their attributes (which can range from 1 - 20).

Now that i have implemented them, i have to check if they add fun to the game. Fun is of course hard to measure, but what i am aiming for mostly is balance between the different elements. For example, if one attribute is much more important than others, the others are irrelevant.

To test them, i left my computer running for a night and simulate over 600 different races with different AI players (with every time different attributes and strength). I now had a lot of data points to analyse with.

I decided to use a multiple regression analysis, where i analysed the impact of the strength and all the different attributes on the outcome of the race. This led to the following results:

R-squared: 

0.43 

 

Coefficient of different attributes

Strength

-4,59

Climbing

-3,60

SoloRiding

-3,06

GroupTechnique

-3,04

Flair

-1,57

Sprinting

-0,93

Restoration

-0,84

Starting Position

-0,73

Determination

-0,51

Composure

-0,36

Luck

0,12

Conclusions

  • This stuff really makes me feel like a nerd, which is nice 😉
  • The R squared means that more than half of the results are not explained by this model
  • The fact that all attributes are negative is correct (the higher the attribute, the lower your total final time)
  • The attribute luck has a different sign, which basically means that a lower attribute is better (although the coefficient is very small, so technically it means that it is not relevant)
  • Strength is more important than all the different attributes
  • Climbing, solo riding and group technique are most important
  • Composure and determination hardly matter at all
 
I am somewhat happy with these outcomes, but find it difficult to determine my final goal here. I think it is not a good idea to have all attributes at (roughly) the same value, since then it won't matter which one you improve at all. 
 
On the other hand, an extremely large difference between attributes, means that your strategy should be to simply focus on the best attributes, which is also technically not really fun.
 
For now, my next move will be to make the lowest three attributes somewhat more influential so that they matter more. When that is done, i am just going to continue playtesting manually and get a feeling for how the game is running. At that point i will also upload a new version, so i can (hopefully) get some feedback on the game itself. 
 
In the meantime, please feel free to try out the game yourself (link) or even better, let me know what your ideas would be to further balance the game.
 
Thank you once again for reading!


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By Nilmani Gautam
      Unity is a cross-platform game engine developed by Unity Technologies, first announced and released in June 2005 at Apple Inc.'s Worldwide Developers Conference as an OS X-exclusive game engine. As of 2018, the engine has been extended to support 27 platforms.
      I have started a video tutorial on A Complete Game Development course using Unity3d on YouTube. It is completely a beginner to advance course so any on can visit and learn to code and design game from beginning.
      Course will be updated daily.
      Visit here for more information.
      https://www.youtube.com/channel/UCJjDIEeBxUT8VxBVnMXHkDQ
       
       

    • By Brizzler
      Hey Everyone, 
      I'd like to review some of your indies games! I'm interested in games made for the Universal Windows Platform (UWP).
      Reply to this post if your interested in having your games reviewed and youtubed on my channel:
      UWPdeveloper
       
      Cheers,
       
      B
    • By JustHusk
      Hi there,
      So i'm an inexperienced student learning games dev at college and im studying c#, in my spare time im trying to work on a text adventure game with a narrative. My issue is that i dont know how to make the decisions, well not simply anyhow.
      I could write out 50 variables for each decision to read from the player but that would become very tedious and too messy to even comprehend when im adding content. I was thinking of adding functions to hold each decision or area but im at a lack of knowledge on how to jump to a function or if it's even a good solution. I know i could use an array and each decision be a number but that just doesn't seem like a good solution to me either.
      Any advice would be appreciated and this whole topic might sound dumb to a professional so be understanding please haha.
      Thanks,
      Luke
    • By 999PING
      I'm very often facing one small problem when trying to learn some new stuff - hard to choose what to learn next.
      Even if the problem seems to be small it has a very huge impact on the final result I think. And because Game Programming offers so much to learn, I'm always feeling that I'm missing something important and wasting my time learning something not important or unneeded. Or usually, I'm afraid to focus on something specific and huge for a long time, because I think that I'll spend all my time on that particular filed and will not be able to solve another problem.
       
      So I've tried to fit all my thoughts in this questions.
      1) Are you trying to cover all the aspects of Game Programming? Or you trying to focus on some specific aspects like physics, animations, or networking etc.
      2) What is your way to find a new theory or whatever else for your learning process? (Manuals, Courses, Books, Documentation? etc.)
      3) When you trying to learn while practicing, are you search for learning because of a problem that appears, or because you wants to try new things? How do you choose this new thing? And finally, Which of this two approaches was the best for you if any?
       
      Not actually in the scope of the topic, but I'm also very interested to hear your thoughts on this.
      What is Game Programming for you? How would you describe what should Game Programmer able to solve?
    • By Septopus
      Okay, looking for some constructive feedback/criticism here... 
      What follows is the code of my c# UDP Socket Class.  I've written this based on a number of online examples and a few distant memories from the past, so I really have no idea how "bad" the code is/could be in a 100+ concurrent connection scenario(my dev environment is just two machines at the moment)...  It works, I know that, it is fairly stable(I can't break it when using it normally), and it behaves how I believe I want it to. 
      It is a dual purpose class for handling both Servers and Clients.  It uses an asynchronous receive and synchronous send(I may switch to async send if it proves beneficial later on).  My servers use Client sockets to communicate with each other and to perform internal connection tests in a multiple server, "single shard" type environment.  I'll be devising some heavy load testing methods a little further down the line, but I'm hoping to fish out most of the major gotchas before I get there.
      So, please, let me know how to fix it up if it smells terribly to you, or if not, that's even better...
      Sorry for the large code dump, but THANKS for checking it out!
      using System; using System.Collections.Generic; using System.Net; using System.Net.Sockets; using System.Text; using UWAvatarServerData; namespace UWAvatarServer { public class UDPSocket : IDisposable { //Some simple string length counters and averages to get a rough idea of generated traffic. public int sndMax = 0; public MovingAverage sndAvg = new MovingAverage(); public int csndMax = 0; public MovingAverage csndAvg = new MovingAverage(); public int rcvMax = 0; public MovingAverage rcvAvg = new MovingAverage(); //Constant for configuring the prevention of ICMP connection resets private const int SIO_UDP_CONNRESET = -1744830452; //UDP socket private Socket _socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); //Buffer Size Constant private const int bufSize = 8 * 1024; //Raw string data from client packets private Dictionary<EndPoint, Queue<string>> messageDictionary; //Queue for holding raw string data from server packets when in client mode. private Queue<string> cQ; //Referece to the data store used by the server(for access to the current game time clock) private UWDataStore dataStore; //Time code storage for last sent/received messages private double lastSentMessage = 0; private double lastReceivedMessage = 0; //Boolean to determine which mode we're in so received messages get put in the right place. private bool clientMode = false; //Max string lenght allowed by the servers. private int maxMessageLength = 1450; //IDisposable stuff public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { if (disposing) { // free managed resources if (_socket != null) { _socket.Dispose(); _socket = null; } } } //State class for async receive. public class State { public byte[] buffer = new byte[bufSize]; public EndPoint epFrom = new IPEndPoint(IPAddress.Any, 0); } //Server "Mode" public UDPSocket(Dictionary<EndPoint, Queue<string>> msgsDict, UWDataStore DATASTORE) { clientMode = false; messageDictionary = msgsDict; dataStore = DATASTORE; lastSentMessage = dataStore.UWServerSeconds; } //Client "Mode" public UDPSocket(Queue<string> mq, UWDataStore DATASTORE) { clientMode = true; cQ = mq; dataStore = DATASTORE; lastSentMessage = dataStore.UWServerSeconds; } public void CloseSocket() { _socket.Close(); } //Internal connection status checking public int SendHowStale() { if (lastSentMessage == 0) lastSentMessage = dataStore.UWServerSeconds; return (int)(dataStore.UWServerSeconds - lastSentMessage); } //Internal connection status checking public int ReceiveHowStale() { if (lastReceivedMessage == 0) lastReceivedMessage = dataStore.UWServerSeconds; return (int)(dataStore.UWServerSeconds - lastReceivedMessage); } //Start/Bind a Server. public void Server(string address, int port) { //In case restarting uncleanly, dunno if this actually does anything.. _socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.ReuseAddress, true); //Ensure all async packets contain endpoint info and etc. _socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.PacketInformation, true); //Ignore ICMP port unreachable exceptions. _socket.IOControl((IOControlCode)SIO_UDP_CONNRESET, new byte[] { 0, 0, 0, 0 }, null); //Bind to port. if (address == "all") { _socket.Bind(new IPEndPoint(IPAddress.Any, port)); } else { _socket.Bind(new IPEndPoint(IPAddress.Parse(address), port)); } //Start receive callback process. Receive(); } //Setup a Client to Server socket. public void Client(string address, int port) { //Dunno if these two options do anything for client sockets, but they don't seem to break anything. _socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.PacketInformation, true); _socket.IOControl((IOControlCode)SIO_UDP_CONNRESET, new byte[] { 0, 0, 0, 0 }, null); _socket.Connect(IPAddress.Parse(address), port); //Start receive callback. Receive(); } //ServerSend sends to any EndPoint from THIS server. public void ServerSend(string text, EndPoint ep) { try { byte[] data = Encoding.ASCII.GetBytes(text); _socket.SendTo(data, ep); lastSentMessage = dataStore.UWServerSeconds; if (text.Length > sndMax) sndMax = text.Length; sndAvg.ComputeAverage((float)text.Length); //Console.WriteLine("TO NET: " + text); } catch (Exception ex) { Console.WriteLine("ServerSend Exception: " + ex.Message); } } //Client Send only sends to the connected Server. public void cSend(string text) { try { byte[] data = Encoding.ASCII.GetBytes(text); _socket.Send(data); lastSentMessage = dataStore.UWServerSeconds; if (text.Length > sndMax) sndMax = text.Length; sndAvg.ComputeAverage((float)text.Length); //Console.WriteLine("TO NET: " + text); } catch (Exception ex) { Console.WriteLine("cSend Exception: " + ex.Message); } } //Setup Async Callback private void Receive() { try { State so = new State(); _socket.BeginReceiveFrom(so.buffer, 0, bufSize, SocketFlags.None, ref so.epFrom, new AsyncCallback(_Receive), so); } catch (Exception) { } } //Receive Callback private void _Receive(IAsyncResult ar) { try { State so = (State)ar.AsyncState; int bytes = _socket.EndReceiveFrom(ar, ref so.epFrom); lastReceivedMessage = dataStore.UWServerSeconds; string smessage = Encoding.ASCII.GetString(so.buffer, 0, bytes); //Console.WriteLine("FROM NET: " + text); if (smessage.Length < maxMessageLength) { if (smessage.Length > rcvMax) rcvMax = smessage.Length; rcvAvg.ComputeAverage((float)smessage.Length); if (clientMode) { cQ.Enqueue(smessage); } else { if (!messageDictionary.ContainsKey(so.epFrom)) { messageDictionary.Add(so.epFrom, new Queue<string> { }); } messageDictionary[so.epFrom].Enqueue(smessage); } } _socket.BeginReceiveFrom(so.buffer, 0, bufSize, SocketFlags.None, ref so.epFrom, new AsyncCallback(_Receive), so); } catch (Exception) { } } } } Generally speaking I use it as such:
      public static bool running = true; static void UDPServer() { using (s = new UDPSocket(MessageDictionary, UWDataStore)) { s.Server("all", 37373); while(running) { //Servery Stuff Goes Here. //Like reiteratively dequeuing the Message Dictionary Queues and processing/replying to all commands/etc... } } } All processing of individual messages from clients is handled with Task.Factory tasks, and a reference to the server's socket varible (s), and the client's EndPoint is sent along the ride for use in replying to clients.  There's no game logic and there are no client replies that happen directly from within the UDP server's main while loop, mostly just connection status checking and reorganizing of the Message Queues into Tasks.
      Thanks again for making it this far.
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!