What are your practices for testing one game "scene" at a time?

I’ve spent the last several years in Godot Engine, where it is easy to run a single scene at a time. Each scene is essentially an OOP class that combines visual elements, configuration, and scripted logic. Variables in the script can be “exported,” which means they become editable in the scene editor. Press F6, and you’re running just the current scene, separate from the rest of the application. This makes it very easy to iterate on individual components, such as a health bars, single cards in a deckbuilder, an animatic, etc.

For reference, here’s an example from a recent game jam project. The Player scene is open, and on the right, you can see some configuration that is either specified in my script or inherited from its superclass. Running in the foreground is just the player scene, where I can tinker with things like size and speed without running the whole game.

I haven’t found an equivalent workflow in Flutter. My game is decomposed into widgets following the usual principles of OOP, just as I would do with scenes in Godot Engine. I am not sure what the fastest way is to iterate on the design of each piece. Making multiple main entrypoints for each significant widget seems wasteful. Automated testing isn’t what I want either, since I’m interested in rapid iteration and not specification nor regression protection.

Does anyone have a good workflow to share to assist in the rapid, iterative development of pieces of the game experience?

In case it’s relevant, I’m using Android Studio as my development environment.

On the flutter master channel there has been some work over the last 3 months on live widget previews, which allow you prepare previews by adding an annotation. I think the goal here is to allow immediate preview of any widget right within your ide, and immediately see changes you make to your code.
The latest merged PR is [ Widget Preview ] Remove `WidgetPreview` in favor of using annotation properties by bkonyi · Pull Request #165500 · flutter/flutter · GitHub and looks pretty good.
Searching for widgetpreview in the closed PRs gives more history and background on the works progression.

In searching for the GitHub flutter pr I found look | Flutter package , which may also accomplish some of what you are looking.. for with a few more steps (code generation).

4 Likes

Encoding a scene and various parameters in an initial route, then parsing them on app startup

Hot restart as required

2 Likes