DEV Community

tomokat
tomokat

Posted on

My second day with Antigravity

If you already saw my previous post, no, I don't think I can possibly create "every day" report of Antigravity but I feel I just can't stop sharing my excitement with this beast! Also I plan to put more focus on my experience with it for (very simple) game development here - while keeping my LinkedIn for more (potentially) work related.

Once again due to its incredible power, I was done "(potentially) work related" study/research by noon, after lunch I quickly flipped to expand my game. Here is what Antigravity achieved for me:

  • expand DialogScene from simple one character display and message window to up to 3 characters display, face icon, speaker and message window
  • bring bit of scripting into my game. I can define each conversation with CSV file format, it even managed to load all words from another file (like language resource file)
  • expand this CSV script with ability to perform basic animation (for now I implemented WAIT, SHAKE, FADE_OUT, FADE_IN)
  • create very basic yet powerful event trigger system with JSON format data

My approach for working with any AI tool is, first talk with Chat GPT and/or Gemini to keep asking what I want to do and refine prompt. I have a theory that AI tool knows best how it want to be prompted (I use this back in days when I was working with my Lovable project) and that seem to work very well so far. For all these 4 points, most of them are done with single prompt with 2-3 small tweaks after that! (can you believe it? Some prompt sure look really long but somehow it always nailed it)

Another thing worth noting is that code Antigravity generates, at least so far, being impressively clean! I feel this project is getting more complex as I keep asking it do more - to give you some idea about this, here is a JSON file I have (generated by Chat GPT) to test event trigger work:

{
    "events": [
        {
            "id": "EV_GREETING",
            "kind": "dialogue",
            "script": "scene_script.csv",
            "startScene": "event_0",
            "once": true,
            "conditions": [
                {
                    "type": "flag_not_set",
                    "key": "EV_GREETING_DONE"
                }
            ],
            "effects": [
                {
                    "type": "set_flag",
                    "key": "EV_GREETING_DONE"
                }
            ]
        },
        {
            "id": "EV_LOWHP_HELP",
            "kind": "dialogue",
            "script": "scene_script.csv",
            "startScene": "join_yes",
            "once": true,
            "conditions": [
                {
                    "type": "hp_lte",
                    "value": 10
                }
            ],
            "effects": [
                {
                    "type": "set_flag",
                    "key": "EV_LOWHP_HELP_DONE"
                }
            ]
        }
    ]
}
Enter fullscreen mode Exit fullscreen mode

I don't think all of these are properly implemented yet BUT I can already test/check that EV_GREETING occurs as expected (but while writing this I realize I didn't specify WHERE and WHEN this event take place so I need to fix/expand that) When I go to (2,4), event should trigger only once - and it works as expected. With this set up (mind you, all I spent is total 7-8 hours!) I already have enough hook to build decent Adventure game.

Another really cool (and even scary) thing is that, when I ask it to expand DialogScene to have 3 characters, it actually started to generate images on its own! (So all the images you see in video, character images and background image is auto-generated) I thought that was really cool, as of course I will prepare my images later but the fact that it automatically generate something to give me a feel for how conversation takes place was beyond my expectation!

I'm building this game in Japanese (mainly so that I can focus on scenario - that is one major difference I'm taking with my game development this time. I'm talking to Chat GPT insane amount (in fact, most of my time is used to do that, not to create game lol) as I got really interesting story line and Chat GPT help me refine it to the detail I would never imagined.

Here is a quick screencast, show casing how that event EV_GREETING works (again, sorry dialog is in Japanese (and even if you understand it, what it is saying make no sense lol) but I think you get the gist of why I feel Antigravity is a beast - which is the main reason why I want to write this article!), as well as how CSV handles branching - hope you enjoy it! :)

https://youtube.com/shorts/S943iwxZorw?feature=share

Top comments (0)