Jump to content

Winter Games 2016 - On the road again - Part 1

AggrorJorn

877 views

Finally done moving to my new house and today I got my computer setup again. And as a start, I thought, lets give it a go for the winter games tournament.

 

It is a little racing game where the tracks gets randomly generated on the given seed. I think I will call it "On the road again", named after the song and because of the fact that the level generation allows you to skip parts of the track if you simple fall down on the track below you.

 

 



9 Comments


Recommended Comments

This was just today? Damn you work fast. I love the concept of it and that people can compete for score on the same tracks. I wonder if you'll have high scores for both the least lives lost and fastest time (and/or maybe a weighted system combining both). I can already imagine lots of different track piece types as well, including objects on one side or another like obstacles or speed boosts.

Share this comment


Link to comment

Guessing your post about web API was to track this? I think you could uses leaderboards for this. I like how you have an instance of the car stay where it left off. What might be cool is to incorporate that into the leaderboard data. Maybe you can store the position of each user in the leaderboard (remember you can create multiple leaderboards to store whatever numeric data you want), and then when we start you query the leaderboard to get the top 5 players. Take their images and use that to create a unique material in code and use that material for an instance of a car that you place at that players pos/rot that you stored in leadboards.

 

It's a sort of bastardizatiin of the leaderboard but it would be cool to see top 5 cars and where they fell. You could have "score", "score.pos.x", "score.pos.y", "score.pos.z" leaderboard names and the same for rotation to store your data for each user.

Share this comment


Link to comment

I love the idea of showing other player info and visuals to the current player. It seems like it wouldn't be hard to incorporate.

Share this comment


Link to comment

Yes, that was something I wanted to try, but it just looks so awful and I really just want to push a lot more data to the database, without constantly have to make a new steam database.

Initially I wanted to do it like they do it in Trackmania, where you can compete with the ghost of other highscores. But this requires 3positions, 3 rotations every other second or so and that's just insane. I you would play for 100 seconds, you would need 600 highscore databases. For now I will just stick with the fastest time and attempts.

Share this comment


Link to comment

That's why you wrap it up in a class so those details are hidden :). I'm playing around with this because I'm curious if I can get it to work. I'll see if I can figure something out as this would be handy for other things. It wouldn't be to store multiple records per user though as that's way more complex, but I think I can get it so each user gets one record of any number of columns so you could store its final position, rotation, score, any other int.

 

This would all work if the value gets overwritten. Looking back at Josh's original post I see that at that time it would only write the value if it was higher than the current value which wouldn't work for this as a general storage of nits per user.

 

If you just showed the top 5 cars I don't think that would look bad at all. I'd want to see them. I would be much more inclined to keep playing the game to try and beat those guys. Each start of the race you'd have to re-get the data and clear out the old cars and place the new top 5.

 

I'll test if the value we write each time makes it or if it only takes the highest value as that's the key to the entire thing really.

Share this comment


Link to comment

So I have done some experimenting but the performance is really getting bad after a couple dozen highscore tables. I think there is some sort of time out after a while.

So I thought about trying to be smart what kind of data I am storing. For instance you can have a rule that position can only take 4 integer positions (minus values not included) and store the x,y and z after each other. This works pretty well. For instance: 123415678412 is actually vector3(1234,1567,8412 ).

Share this comment


Link to comment

Good idea. Just make sure your maps are high enough and always going in the positive direction of x & z. So does it only take the highest value though? I.e. If the value was 10 and you later set it to 8 does it actually store the 8? That's strange that multiple leaderboards time out or is that slow.

 

Why would you need a couple dozen? I would think one for each field which should just be 7? 3 for pos, 3 for rot, and 1 for score?

Share this comment


Link to comment

If your previous highscore was 10 and now 8, than the highscore will not be updated and the 8 will simple be ignored. I think valve has huild in a little logger that halts the creation of many highscore tables from the same address. I think I got to 64 highscore tables before I started getting delays in the return message. Eventually I couldn't even make new highscore tables, So I though I had hit a limit. But after a few minutes it worked again.

 

I don't think I will be spending a lot more time on making (read: testing) a complex workaround for the things I want to have in my. I will just stick with a basic highscore system for now. What I really miss is a way of seeing which users seeds were used by people and which are popular. I wanted to display a list op popular seeds. My own database could do that easily, but now I do this the following way:

 

every time a user enters a seed for a level, lets say '1337', a higscore table is updated with this value: 13370000000. Every time a user retries the level, the highscore is updated to 13370000001. I get this 'seeds-highscoretable' and read out the seeds and the times it has been userd. Eventually showing a list op popular seeds. Level count (to be replaced with unique users) goes to a maximum of 9999. A bit hacky, but it works.

 

This is an actual result I am getting:

  • 13370000056: results in: seed 1337000, timesplayed 0056
  • 87341200012: results in: seed 8734120, timesplayed 0023
  • 32400000004: results in: seed 3240000, timesplayed 0004

Why would you need a couple dozen? I would think one for each field which should just be 7? 3 for pos, 3 for rot, and 1 for score?

Not If I want to do ghosting of the best car. every second I store the position and rotation of the car.

Share this comment


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Blog Entries

    • By polanskiam in Writer Tips 0
      The records put it straight the majority of the student essay writers really take much delight in custom essay. This makes the whole difference between me and other students in different parts of the world. The findings of the recently concluded research survey conducted in the world’s leading universities and colleges disclosed that only a smaller percentage of the student body could write my essay to the required standards as outlined in the custom essay.
      In as much as the naysayers would be quick to dismiss this revelation as a mere creation of the unscrupulous research, that is the true reflection of reality on the ground. Very few students can write my essay in accordance with the rules of custom essay. An increase in the number of students lacking knowledge of custom essay should be reversed if at all educational objectives are to be achieved in the present day world. One cannot write my college essay unless he or she is proficient in the doing of personal statement.
      Better said than done, one can learn how to write my college essay unless s/he gets down practicing the actual custom essay frequently.
      As a result of the custom essay writing services, I have made a resolution to always write my write my essay online on a regular basis so as to get acquainted with custom essay writing. I tend to master the art of custom essay writing every single time I write my college essay. What an assuring way to write my college essay! This is the main reason why I will continue to write my essay based on the lessons learnt from the custom essay.
      Write my paper
      I am an essay writer and I can write my paper effectively. I have practiced this for over twelve years now. My master is our grammar teacher. He taught me to write my paper always with continuous thought that is logical. He even urged me to be careful as an essay writer not to put down irrelevant ideas. If I made a mistake, he would correct me lovingly. That is when I came to realize that as an essay writer I should always be patient when I write my paper and furthermore when corrected. I usually write my paper and let a friend read it to make sure all the mistakes are corrected. I find the task interesting and I would like to be an essay writer in future. I write my paper every time I am free and I sit down and admire it. I also baffle others as an essay writer because my essays have a very amusing tone. One day I almost wrote an entire novel just enjoying being an essay writer.
      If anyone tells me to write my paper and give him, I know he/she would be testing me concerning the way to handle his or her work because not everyone understands this job like me. I am not praising myself but I am sure that I write my paper quickly and I am a good essay writer. Whenever I write my paper, I am sure to finish it as soon as possible, and I want to sharpen my skill as an essay writer. Both of these give me pleasure because they are gifts about which I can boast. Always be ready to exercise yours too.

    • By polanskiam in Writer Tips 0
      1) How many 2 cm x 2 cm x 2 cm cubes could fit in a box that is 6 cm long, 3 cm wide and 4 cm high?
      Only 6 cubes could fit in that box.
      2) How many 3 cm x 3 cm x 3 cm cubes could fit in a box that measures 5 cm x 4 cm x 4 cm?
      Only one 3 cm x 3 cm x 3 cm cube could fit in a 5 cm x 4 cm x 4 cm box.
      3) You have 8 m of fencing. You fence off a square. What is the area of the square?
      The area of the square is 64 cm2.
      4) What is the length of fencing needed to make a square paddock with an area of 25 m2?
      The length of fencing needed to make a square paddock with an area of 25 m2 is 5m.
      5) What is the area of a rectangle with a 30 m perimeter, if the length is twice the width?
      The area of that rectangle would be 50 m2.
      6) Sketch a solid prism. Find the area of all sides. Find the volume.
      Can’t find the area or volume of a prism with no given dimension.
      7) What is the volume of a box that is twice as long as it is wide, and half as high as it is wide, if it is 20 cm long?
      The volume of that box would be 1000 cm3.
      The volume of this cube is 64 cubic centimetres. If you glued a string on the edges as shown, how long would the string be?
      The string would be 16cm long.
      9)An equilateral triangle has a base of 3cm and a height of 2.5cm. What would the area and perimeter of the triangle be?
      The perimeter of the triangle would be 9cm and the area would be 3.75cm2.
      10) A farmer has a wagon that is 10m long, 2.5m wide, and sits 1.5m off the ground.
      Each bale is 1m long, 75cm wide and 50cm high.
      If the door to the barn is 10m high, how many bales can the farmer fit on his wagon in one load of hay?
      11) In your writing describe the following two instructional strategies: Jigsaw and Bansho.
      Be sure to include how the strategy works, as well as its benefits in the classroom and example.
      Jigsaw is a cooperative learning strategy that enables each student of a “home” group to specialize in one aspect of a learning unit. Students meet with members from other groups who are assigned the same aspect, and after mastering the material, return to the “home” group and teach the material to their group members.
      The process uses a visual display of all student solutions, organized from least to most mathematically rich. This is a process of assessment for learning and lets students and teachers see the full range of mathematical thinking used to solve the problem. Students have the opportunity to see and hear many approaches, and they are able to consider strategies that connect with the next step in their conceptual understanding of the mathematics.
    • By polanskiam in Writer Tips 0
      International flow of funds refers to the movement of money and money equivalents between countries. Funds refer to money or money equivalents that are given for a purpose (Dawson). For example, funds may be given to a country to facilitate a development project in a country. Governments, individuals, and organizations can, therefore, give or receive funds depending on the needs and their financial abilities.
      A government may place various constraints on flow of funds internationally. One of the constraints could be in terms and conditions of providing funds (Sharan). If a provider of funds has varied interest in the country or organization to which it seeks to fund, stringent terms may make the provider shy away from the endeavor. Similarly, if governments or organizations seeking funds cannot adhere to the set conditions, funding arrangements are likely to be avoided altogether. Such conditions, therefore, create constraints to international flow of funds.
      The government would impose such constraints due to a myriad of reasons. One imperative reason would be to prevent its citizens from exploitation by foreign financiers. This might be through the conditions sought after by providers of the funds.

      For example, a financier may demand certain unreasonable stakes in the endeavor, or even demand for contracts that would otherwise be given to citizens of the country. Another reason would be to ensure that the government, not foreigners, remains in control of key sectors of the economy.
      Managers of multinational companies may argue that the constraints may not be favorable for the government as it might be viewed as lack of trust or hostility towards providers of finance. As a result, providers of finance may decide to charge higher interests in case of loans given to the government. Such retaliatory actions may not be favorable for the government presently or in the future.
×
×
  • Create New...