DEV Community

K
K

Posted on • Updated on

Pusher Contest Idea: JavaScript Game (2)

As I wrote, I had the idea to build a battle royal clicker.

Game Design

So lets line out what that could look like.

Core

  • every player will be a company
  • every company will get start capital
  • the companies get laid out in a circle, so you can see all at once
  • every click on a company will write an invoice to it
  • every invoice will cost the invoiced company money
  • every invoice will earn the invoicing company money
  • if a company has no capital left, it will go bankrupt and lose the game
  • last company left will win

This should fuse the clicker genre nicely with a battle royal goal.

Considerations

  • Pusher Sandbox plan only allows 200k events per day
    • merge multiple clicks in one event, maybe 10 or 20 clicks write one invoice
  • Pushers Sandbox plan only allows 100 connections max
    • 20 players per game would allow for 5 parallel games

Nice to Have

  • taxes
    • pulled from every company in a specific interval
  • power-ups
    • will show up (tax break, stocks rising) and/or could be bought (better tech, premium products)

This would make the game more fun and taxes could maybe simulate the eye of the storm people know from other battle royal games like PUBG and Fortnite.

If you have some additional ideas (preferably some that reduce complexity, let me hear xD)

Top comments (11)

Collapse
 
mikkpr profile image
Mikk Pristavka

One idea I had when reading this: instead of handling every invoice's progress separately, make the progress towards your next invoice public, so instead of just buttonmashing you can "snipe" invoices that are almost complete and thus grab the amount yourself? Otherwise every player is playing a separate game from each other and whoever clicks the most in the least amount of time, wins. With this shared invoicing system, players who are slower but more observant can also fully take part.

Collapse
 
kayis profile image
K

You mean, invoices are simply money and don't cost anybody money?

Collapse
 
mikkpr profile image
Mikk Pristavka

I mean, every invoice needs X units of "work" to be issued, but the last unit determines who the invoice is issued by, so if you add the last unit yourself, you earn it to yourself and only yourself.

To simulate the storm, you could have every unit of work count at first (and divide the invoice between everyone who contributed according to the work they contributed), but as the game progresses, only the last Y units actually pay out and the first (X - Y) get nothing. And the endgame would be pure sniping, I guess, with only the last click determining who gets it.

This might not be as fun as I imagine it to be, though :)

Thread Thread
 
kayis profile image
K

Ah yes.

The problem here is, the Pusher API is rather restrictive, especially in the free Sandbox plan.

You should only send about 10 client events per second and you can only send 200k events in general per day.

Given a 10 minute game, you have 600 seconds.

Given 20 players each clicking 5 times a second, which is a optimistic amount, you have 100 clicks a second.

So 600 times 100 makes 60k events per game.

Even if it was just the half (just counting double clicks for example) you could only play about 6 games a day.

So my idea was to consolidate the clicks, only send like 10 or 20 in a batch to the server and be done with it. This could result in more than hundred games per day.

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
kayis profile image
K

Yes, but I liked yours much better than mine xD

Thread Thread
 
mikkpr profile image
Mikk Pristavka

[I messed up and deleted the post because I thought I had replied to my own comment instead of your reply :/]

Thread Thread
 
kayis profile image
K

no problem.

Other idea:

People gather clicks locally and send them to the server in a bunch and the server decides who gets the invoice?

Like some players click 10 times some players click 50 times and the one with the most gets it?

Maybe the criteria needs to be better...

Thread Thread
 
mikkpr profile image
Mikk Pristavka

Maybe each company puts out an assignment, consisting of 1..N units of work (can be clicks or batched clicks, I guess) and other companies can choose one or more assignments to work on. Working == clicking, and different companies can work on the same assignment simultaneously, but only the fastest one actually claims the reward. Assignments could consist of multiple steps, so maybe each step takes 20 batched clicks to complete and each step has its own reward. Or incorporate the sniping idea and let the last step claim the whole reward for the assignment?

Thread Thread
 
kayis profile image
K

Maybe not invoices but products?

  • there are rounds that take like 10 seconds or something
  • everyone is building a product with clicks (locally) in this time
  • when they think they are finished, they submit the product
  • when they don't finish in the time they get a penalty
  • earlier products get some kind of benefit, because customers can buy them quicker
  • in the end the company gets the money when they got the faster * better product?
  • a burn-rate could cost every company money per round
Thread Thread
 
mikkpr profile image
Mikk Pristavka

aha, that could work. also, what about building multiple products per round, if you choose? Every product might bring in some revenue each round, so you can either build one very good product (submit it right as the round ends) or multiple smaller ones, and the one who finds the perfect balance between quality and quantity is the winner?