Chrome Dinosaur Game, with AI player

wow look, AI, cool buzzword

I was making a rough game to prepare for a walkthrough for my school’s game dev club, but I got a bit carried away and oops I have a full game now.

This is a simplified version of the Chrome no-internet dinosaur game. There are no pterodactyls (the bird things), no day/night cycle, and the cactus-spawning gets… a bit ludicrous.

Since the game can be a little boring at the start, you can choose to significantly increase the rate at which the game gets harder.

Also, there’s an AI that can play the game. All it does is check if a cactus is close enough to the dino to tell it to jump. It’s not perfect but it gets pretty far, and I have no plans on tuning it any further.

The code was readable at one point, but now it’s a complete mess, and I’m not very confident this game can run at 60FPS on all computers.

If you want to give development a try, I can give you the starter project with the assets and stuff. DinoGame10-16-2024_0-06-24.wick (72.9 KB)

Anyway, here’s the game. Dino10-18-2024_23-01-35.html (2.3 MB) (look below for a new version)

If you want to submit scores here, I will allow the fast leveling option. It gets harder 6 times as fast but you get 6 times the score. All I ask is that you don’t enable the AI, let it play, disable the AI, and then screenshot the game… ok bye have fun

1 Like

very cool! the only problem i have with it is the hitboxes, it gets unfair at times
image

also i got a score of 2699

Attempting to edit this and the moment I press that “next frame” shortcut I’m met with the bane of my animation career: the playhead won’t stop moving in Wick Editor.

All that aside, pretty good clone.

The hitbox of the dinosaur is pretty narrow, it ignores the head and tail. I think the problem is that even after the dinosaur is declared dead by the game, the cacti move by 1 more step before freezing the game, so it looks a bit unfair.

edit: just kidding something might be wrong hang on

edit 2: ok yes there was an oversight on how i detected collisions, i created a hitbox but never actually used it properly. i’m making fixes, and i’ll also add a few other features.

Version 1.1 is released.

The hitbox bug is fixed, and extra enhancements to the AI player have been added. Since the AI can run for a really long time, you can now press Q to end it early. Also, there’s a “watermark” of sorts if the AI player was enabled for a particular round.

(This is what it looks like when you tell the AI to stop)

Dino10-19-2024_12-17-38.html (2.3 MB)

edit: Since the hitbox is smaller, the AI now goes for a LOT longer than before. I got it to go past 17000 points, and by then the speed of the cacti kinda lose meaning, and I’m sure that in regular gameplay you could just phase through some of the cacti with how fast it goes. But oh well ¯\_(ツ)_/¯

3 Likes