Jump to content

Amount of items in semi-random levels and high scores..?


BdR
 Share

Recommended Posts

Okay here's a stupid question ;) I'm making a endless runner sort of game, where the screen scrolls and the player must collect coins and avoid bombs.

 

The level will be generated semi-randomly. I've created "blocks" of coins and bomb layouts (laid out in a star pattern, wave patterns etc.) and during the game random level blocks are selected. These are put after each other in random order to make the endless scrolling level. This is a similar technique to Submarine Dash. The blocks or level parts contain varying amounts of coins and bombs, some even have only coins or only bombs. And I also want to incorporate online high-scores.

 

But there's a "problem" I'm anticipating. Some players might get lucky and get many coins and thus easier to get a high score, while others might get relatively few coins thus lower scores. This seems unfair and would make the game a little unbalanced I think.

 

So my question:

what is the best way to get a fixed amount of items in a semi-random generated level?

Link to comment
Share on other sites

I would say that a random/unbalanced game is not that a problem.

 

After all, some casino games are all about luck and they have their public.

 

 

But to answer your question... I don't know, I guess I would do something like:

 

 

 

var maxBombNbr=10;

var maxBonusNbr=5;//totally arbitrary

 

var bombNbr=0;

var bonusNbr=0;

 

 

for(var i=0;i<25;i++){

if( Math.round((Math.random()*10))%2==0 && bombNbr<maxBombNbr){bombNbr+=1; addBomb(); }

else if(bonusNbr<maxBonusNbr){bonusNbr+=1; addBonus(); }

}

 

 

Not sure if that would work at all, haven't tested it.

Link to comment
Share on other sites

  • 3 weeks later...

Here's an idea:

 

For each scene, based on your lowest-highest value of coins in a "scene".

Set the coin(s) at different points (I guess this is how your keeping score)

 

So if one player gets 100 coins on a "scene" and 100 is your maximum # of random coins allowed to be generated.

Then if another player gets 50 coins on the same "scene".

 

The guy who got 100/100, each coin would be worth "1"

There guy who got 50 out of 100coins randomly generated, each coin would be worth "2" points

Link to comment
Share on other sites

What if you increase the chance of bombs appearing each time coin blocks are generated, and vice-versa?

 

You could also define the percentange of bombs for each level part and fill them randomically, while obeying that percentage.

 

I find this article an interesting read about the topic: http://www.gamasutra.com/blogs/CarstenGermer/20131118/204997/quotNot_So_Random_Randomnessquot_in_Game_Design_and_Programming.php

Link to comment
Share on other sites

Thanks for the suggestions :) The idea of varying coin values doesn't feel right, the game rewards has to be reliable I think.


 

I've decided on this approach: I'll create several level blocks like in Submarine Dash because that way you can also have funny or specific patterns (as opposed to all just random objects). Each block will also have a "appears" number property and in each game the different blocks will appear exactly that many "appears" times. So then, at the beginning of a game all blocks indexes are thrown into a playlist, and that playlist is randomised. The game as a whole will be a random level every time, but it will have the same level blocks thus the same amount of coins and bombs.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...