-
Notifications
You must be signed in to change notification settings - Fork 48
Cetus 101 Invincibility
For this tutorial we will be using the following demo WebAssembly game:
https://www.wasm.com.cn/demo/Tanks/
- Open the dev console using your browser's keyboard shortcut (CTRL+SHIFT+I in Chrome, CTRL+SHIFT+K in Firefox)
- Press the "double arrow" button >> and then select Cetus from the list of options
The tanks in this game store health as f32 (Float 32) values starting at 100. We start by searching for this value.
There are three important values to our search:
- The value we are searching for (100)
- The search comparison (Eq meaning "equal")
- The memory type to search (f32)
When this search completes, you will likely get 100+ results. We now want to narrow this down by taking our blue tank and damaging (But not killing!) our red tank.
Once we have done this, we want to search for all values from our previous search that are now less than 100.
Notice we have changed the search comparison to Lt (less than).
If we've done things correctly, we should get 2 results. We next want to "bookmark" the first result with the button to the right of the result.
Now that we've found our tank's health, the first thing we want to do is "freeze" it.
First we navigate to the bookmark tab.
We see our bookmark we just added and a few options to manipulate it. Check the box that says "Freeze". Now attempt to damage that same tank again. You should notice that the tank is now invincible.