Inspiration
I'm an unconditional fan of management and resource games. So is my team-mate. So it was quite natural that we were inspired to combine waste management with this gameplay. Without wanting to "moralize" the player, we preferred to put the player face to face with the problem: managing the waste we all produce! It's a complex task, given that the pollution it generates is added to the pollution generated by its treatment. The player is thus the protagonist of the problem, seeing for himself the challenges it entails. It's up to the player to find the right balance, so as not to cause even more damage, but to propose a sustainable and viable solution for the planet.
What it does
The game has two aspects:
- Playing to manage the waste produced by fictitious cities.
- Getting involved in the real world by carrying out actions that have a positive impact on the environment.
In the game, players are faced with a stream of waste produced by cities that are more or less eco-responsible. They must build a treatment center for this waste and transport it to the incineration or recycling platform. He's faced with a choice: an inexpensive vehicle with a lot of cargo, but high levels of pollution? Or a vehicle that's harder to obtain but more environmentally friendly? The same applies to waste treatment, where improvements are possible but will cost a portion of the budget. The player can also take action in cities to limit waste production, but this will require him to spend precious resources that he won't be able to invest elsewhere. The player must successfully process a certain amount of waste to validate a level. However, there is a pollution limit that must not be exceeded, or the game will be lost!
Thanks to the game, players can also organize waste collection and natural area clean-up events in the real world. Other players can view and take part in these events. How do you get the impetus to organize and take part in events? By rewarding players who get involved with an in-game virtual currency: EcoCredits! A rare currency that's otherwise hard to come by, and which unlocks powerful in-game upgrades. The game provides a platform for players to create events, view and participate in them, and earn rewards on their own. All this is made possible by the integration of Google Wallet.
In addition to these two aspects, players can collect achievements as they progress through the game and add them to their Google Wallet. We've added a unique feature: their Google Wallet passes are updated daily to reflect the real-world air quality index: the index is provided in text form, and the pass color changes accordingly! They can even know how many other citizen have earned that pass and feel connected to them, participating to the global change!
And to reinforce immersion in the game, the difficulty of the game evolves according to the quality of the real world's air. The more polluted the ambient air in the real world, the lower the pollution limit in the game!
How we built it
To make this architecture work, we used several technologies:
Flutter and Dart: the backbone of the application that drives the whole project.
Flame: the game engine built on these pillars, enabling development with components rather than widgets. As the logic is very similar, we quickly familiarized ourselves with its functionalities, even though this was our first project with Flame. The team responsible for the development and maintenance of this game engine were very responsive to our questions and gave us advice, which enabled us to move ahead with development at a steady pace. Many thanks to them!
Riverpod: the state management solution we chose integrates very effectively with Flame, giving us the flexibility and performance we needed to guarantee the technical performance of our ambitious game.
Node.js: the back-end is managed by Google Cloud functions written in Node.js. This enables efficient communication with the Google Wallet API for pass management.
Google Air Quality API: we're using this resource to combine the air quality indices of 10 of the world's largest cities on every continent. The result is information that reflects the real state of the air we all breathe. Whoever we are, air is a common resource, shared and necessary to everyone's life. It's a good way of uniting all the world's citizens around a common issue that concerns us all!
Google Wallet API: this is the backbone of our entire system of interaction between players in the real world. We've even been able to make them autonomous thanks to the functionalities enabled by Google Wallet. When a player organizes an event, he gets a special Google Wallet pass. At the event, all he has to do is let participants scan the QR CODE on the pass, and they receive a Generic Pass certifying their participation. They will then have a code on this pass which they can enter into the game to get their EcoCredits!
To enable as many people as possible to join in the adventure, we've developed this game to be compatible with all platforms:
- Web (tested)
- Android (tested)
- Windows (tested)
- iOS (untested)
- macOS (untested)
Challenges we ran into
During development, we faced many challenges. We opted for an isometric view, dimetric to be exact. This required compatible assets. Thanks to kenney.nl and its bank of royalty-free 3D assets, we had the necessary resources. These files were modified, adapted and assembled in 3D, before being made available in a 4-angle dimetric view. This allows the player to turn the camera within the game for unobstructed gameplay. As 3D is not yet sufficiently supported in Flutter, we looked for other solutions to provide players with pleasant animations. We experimented with SpriteStacking, which enables Flame to render 2.5D live. The result is worthy of our efforts.
This is the first time we've worked with the Google Wallet API. The documentation wasn't easy to get to grips with at first, but once we understood how it worked, it was a very simple API to use, and we can now see immense possibilities for other projects.
Managing users, their accounts and their progress was initially a time-consuming task. But using Firebase Firestore has made it extremely fluid. As we were already familiar with the tool, this was a real strength in rapidly developing a functional, robust and scalable solution.
The biggest challenge we faced was ensuring that the game's performance was optimized to add these many features without compromising the gaming experience. The Flame documentation doesn't make much reference to this aspect, and in particular to the best practices to be implemented. We had to test, ask for help and rework our code several times before it lived up to our expectations.
Accomplishments that we're proud of
What we're particularly proud of is having a game that's fun to watch evolve. Go to the main menu of the game and I guarantee you that there's a satisfying aspect to watching the trucks collect waste and take it to recycling. The trucks determine the tasks they need to perform, look for a possible route to get there and then go about their mission. We're particularly proud of this autonomous aspect of the game.
Another thing we're particularly pleased with is the functionality provided by Google Wallet. Issuing a pass, saving it in the user's Google Wallet and then generating another pass by scanning the QR CODE between two players seems almost like magic to us, such is the efficiency of the functionality with so few lines of code to achieve it. This API, which seemed opaque to us at first, finally enabled us to set up a high-performance system that we didn't think we'd be able to achieve so quickly.
Finally, the discovery of Flame was a real coup de coeur for its high-performance system, despite the load imposed by the game.
What we learned
I've covered this point before, but what we're particularly keen on is the potential of the Flutter/Flame alliance for game development! I started writing articles about some specific points : blog
What's next for MGame - A waste management game
To be perfectly honest, we still had a lot of ideas in mind for our game. Unfortunately, the principle of this challenge is to have a limited amount of time, which means we have to make choices about what to develop. So, after the challenge, we'll continue to enrich the game.
First of all, we'll be adding more levels, with a better management of the difficulty curve.
The introductory tutorial is effective, but we'd like to develop the character who welcomes the player to imagine a narrative and make the experience more immersive.
The complexity of waste management has been calibrated to ensure that the development challenge is achievable in the time available. However, we'd like to bring in different types of waste, with a sorting system and other treatment solutions.
Furthermore, waste is currently produced by cities. We'd like to propose other possibilities to make players more aware of the impact of their everyday gestures and habits on the environment. For example, we could propose a mission to deal with the waste associated with clothing orders from a distant part of the world, or to manage the waste drained into a river.
The most ambitious feature we'd like to implement is global in-game events. Imagine: in a week's time, in-game players will have to join forces to manage the equivalent amount of waste produced in a year by the city of New York. Players will be able to take part in the event and invite friends to join them in tackling this unstoppable wave of waste. This will put the spotlight on the players who have recruited the most citizens to overcome the ordeal. No one could meet the challenge alone. Only collective action would be powerful enough to overcome the enormous challenge.
And after that, it's time to take action together in the real world!
Thanks to all of you!


Log in or sign up for Devpost to join the conversation.