olistic / warriorjs

🏰 An exciting game of programming and Artificial Intelligence
https://warriorjs.com
MIT License
9.43k stars 490 forks source link

Feature request: randomized levels #128

Closed hexpunk closed 6 years ago

hexpunk commented 6 years ago

Once play of the game gets high enough, I think it would be cool to have randomized levels.

Care should be taken so that the levels are generated deterministically given a PRNG state. The PRNG seed could be made available so players could share it and compete with each other and replay a given generated level.

Also, if the level generator is deterministic, there could be a "level of the day" that can be generated without needing a server. The day's PRNG seed could be generated based on the date.

This could enable leaderboards later on for the daily levels. Of course, the trick with this would be that players would need to submit their code so the leaderboard server could verify their score. If players only submitted their scores to the server, it would be trivially easy to submit fake scores.

hexpunk commented 6 years ago

I know that a web-based version was mentioned in another ticket. Imagine a leaderboard system where people could watch each other's replays, too. So many possibilities!

olistic commented 6 years ago

Imagine a leaderboard system where people could watch each other's replays, too. So many possibilities!

Yeah, that's my main motivation behind the web version, adding a hint of competitiveness to a game that's currently played from your terminal.

Of course, the trick with this would be that players would need to submit their code so the leaderboard server could verify their score.

This is how it currently works 🙂

Once play of the game gets high enough, I think it would be cool to have randomized levels. Care should be taken so that the levels are generated deterministically given a PRNG state. The PRNG seed could be made available so players could share it and compete with each other and replay a given generated level. Also, if the level generator is deterministic, there could be a "level of the day" that can be generated without needing a server. The day's PRNG seed could be generated based on the date.

I'm very interested on this, and it's being asked over and over. I'm gonna close this issue and create a new one to centralize this idea in case someone wants to play around in this direction.

Thanks for the thoughtful issue!