Skip to content

Conversation

@gicha-odoo
Copy link

[IMP] awesome_clicker: implement a clicker game inside of Odoo.

This will implement a clicker game inside of an Odoo database. Each click inside the database will increment a click counter and the user will be able to buy upgrade with those clicks. The upgrade are unlock when milestones are reached.

The available upgrades are:

  • Bots (clickbot and bigbot): generate click automatically
  • Power: multiply the click production of bot to make more click in the same time
  • Trees: produce fruits to collect. There are several type of trees

The game also come with random reward that can be received when opening form view. Each reward can have a level requirement.

This will add a click counter to the systray. This counter is incremented when clicking the button next to the counter.
It will serve as the base of the awesome_clicker module game.
… service.

The client action will display a dedicated window that will serve to play the game. In the current state, it only contains an increment button with a total value of 10.
The clicks state has been transfer to a service to share it between the systray item and the client action. That way the clicks count will be the same for the entire web client.
The service also implement the increment() function to replace the one that was defined in the systray item class.
… counter and add the ClickBots.

This will introduce a custom cliker hook that will handle the required import to create and use the clicker service. That way, the classes that use this service will only require to import and use this hook.
This will also add the clickValue class and component. It transform the displayed value of the clicks counter to something more readable for human, especially with greater values. To allow the player to see the exact number of clicks, a dynamic tooltip has been added to the counter.
Finally, this will add the possibility to buy ClickBots with 1000 clicks. Those ClickBots will be available when reaching level 1 (1000 clicks) and will generate 10 clicks each every 10 seconds.
This will add a new effect when reaching milestones: the rainbow man effect, to give a feedack to the player and let them know that they can buy new bots.
This will also add new bigbots: they are more expensive than clickbot but generate 100 clicks every 10 seconds.
This will add a new resource to the game: power upgrades.
This upgrade will unlock at level 3 (100k clicks) and will cost 50k for each. It multiplies the power of the bots.
Thi will also add the total clicks per second of every bot and the grand total on the client action view.
This will add reward that will randomly be given when opening form views inside the Odoo databse.
The rewards are defined in the click_rewards.js file and all have a description and an action (apply). A minimum and maximum level can also be set.
This will add a new resource: trees. Each tree will cost 1M clicks and produce a fruit each 30 seconds. It represent the actual end-game of the clicker.
The systray item has been improve to display the click count, tree count and fruit count and transform it into a dropdown menu.
Inside the dropdown, we can access the clicker game panel and use a command to buy a clickbot. It also display the number of purchased trees and produced fruits in more detail.
This will separate the clicks upgrades from the trees and fruits using a notebook. This will allow to keep thing clearer for the user.
The game will save automatically every 10 seconds inside the browser local storage and this state will be retreive when the database is loaded.
If there are no data saved in the browser, a new instance of ClickerModel will be created with the default values.
This will add a new migration mechanism, ensuring that when a new version is released, the state save in the local storage is updated correctly.
This will also add a new tree resource: peachTree. The game is now in version 2 and will update its save file automatically.
@gicha-odoo gicha-odoo closed this Dec 24, 2025
@gicha-odoo gicha-odoo reopened this Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants