[DevLog][WIP] A Ride In a Tank (Tentative Name)

Day 11, 12, 13, 14 - 2020-05-03 / 2020-05-04 / 2020-05-05 / 2020-05-06

Ooopsie, I forgot to post here, so I’m going to make a summary of those 4 days!

  • Collisions are now handled using the new InteractionSpace.
    • They act as layers specialized into collisions detections.
    • Each frame, every objects inside a InteractionSpace are checked for collision.
    • When a collision is detected, the two objects’ handler are checked and the one with the higher priority will be called to handle it.
    • Currently they’re used to make the Shell explode on contact of Barrels (it’s a temporary use, projectiles don’t have to be checked against other projectiles).
    • Later, they’ll be used to handle physical collisions and separations.
    • Also, to check if the player is going on a trigger zone.
    • It’s probably overengineering :stuck_out_tongue: but it’s fun nonetheless.
  • Implementation of a double Tilemap.
    • I struggled with a choice - should I go for a 4:3:4 (x:y:z) ratio or another one?
      • Initially I wanted to use a 4:3:4 (x:y:z) ratio, but it was going to be more annoying to render with a tilemap.
      • I made a few mockups and asked some people for advice from the chat and my friends as well.
      • I ended up with a 4:4:4 ratio, which will give a more top-down view.
      • It also avoid some gameplay issues related to the fact that the Y axis would be rendered with less pixels than the X axis.
    • I chose to ditch TAS tilemap in favor of a twin Tilemap system.
      • I needed a way to render an additional tilemap above the sprites, to be able to partially hide game objects.
      • I relied on TAS UI’s TileMap, which is a different kind of tilemap, with different features and restrictions than the regular Tilemap used by TAS.
      • Basically, I’m using TAS like a sandwich with the following layers:
        • Background Tilemap
        • TAS Sprites
        • Foreground Tilemap
        • TAS UI
    • To render a bigger map, I’m using the same pattern than TAS’ Tilemap.
      • The rendering tilemaps only cover the screen.
      • Full tilemaps are represented by constant/flash instances of a Place class.
      • The Rendering Engine is checking which tiles are being shown, and asks the current Place to update both the background and foreground tilemap appropriately.
  • I worked a bit on the story.
    • It’s probably going to be a very short game, story-wise.
  • As an extra, out of curiosity while discussing with @FManga, I demoed a use of TAS to have 16-bits colors (see below).
    • It’s a rather simple trick: use a single line-filler which initialize the buffer to values from 0 to 219, then operate on the palette instead of the line-buffer.
      • In such a configuration, changing the palette entry#0 would change the 16-bit color of the first pixel.
      • It works because the palette is applied before each line is sent to the LCD.
      • So the real trick is to change the palette for each line of course.
      • While it’s very slow, being able to is still a clear demonstration of how powerful TAS is.
      • Palette changes can be applied in TAS’ Sprites & Tilemap and also UI, for interesting effects!

TilemapMockup
Mockups about using 1:1:1 ratio vs 2:1:2 ratio. The first one has a shoot’em up mood, while the second one is more reminiscent of SimCity (especially SC 2000).

2020-05-06 - MultiTilemaps
The TAS sandwich, flavor ARIAT in action. Note how the target also gets under the white part of the map.

2020-05-06 - PaletteManip
OK, the GIF is showing only 256 colors so it sucks a bit to demonstrate 16bit colors. Everytime I have fun with LineFillers, it looks like I’m working with Pixel Shaders. You can try this unoptimized bin I made up quickly: ariat-pokitto-16bittest.bin (108.4 KB)

Upcoming things

  • More physical map - aka the Tank cannot roll inside the walls or outside the map.
  • Measurements - Getting a rough idea of where the CPU is spent.
  • Barrel-Tank collisions - Pushing the Barrels with the Tank.
  • Exiting the tank - Getting intimate with the Protagonist!
6 Likes

Days 15, 16 - 2020-05-07 / 2020-05-08

All about tilemaps!

  • I created an new map converter script.
    • As I’m using 2 tilemaps, it was getting complicated to be using the default Map Converter.
    • This new Map Converter looks for the following things in a TMX:
      • A Foreground and Background Tile Layers.
      • A Collisions Tile Layer (see below).
      • Then it generates a constant instance of the new Place class, which represents a location in game.
    • The generated data is of course heavier than @Fmanga’s Map Converter, as I don’t have the time to optimize it.
  • I implemented Collisions with the Map.
    • It’s done using a special layer, the Collisions, which must be using the Collisions Tileset.
    • It’s actually very similar than the MapEvent, but it’s focused especially on collisions and effects.
    • It can tell that a tile is Empty, Full, or Half-Empty with a diagonal cut.
  • Projectiles now collide with the Map.
    • It’s simply doing a point query to do so.
  • The Tank also collides with the Map.
    • Initially I wanted to make a clean shape collision check, but it got more complicated than it should have.
    • Instead I used the “push” technique: use 8 points on your “circle of collision”. If a point collides, apply a push on the object.
    • It is good enough for the jam.
  • I also made a few refactoring as usual, to pave the ground for more gameplay-related features and contents.

2020-05-07 - Collision Tilemap
Projectiles exploding against the wall.

2020-05-08 - Tank Colliding with Map
The Tank grinding against the wall.


How the collision map is represented in Tiled. Red part indicates where the walls are.

Upcoming Things

  • Upgrading the Map Converter to be able to place Objects in Tiled and have them pop in the game.
  • Barrel Damage & Explosion.
  • Pushing Barrels with the Tank.
  • Exiting the Tank.
6 Likes

The twin-map system is very interesting. Could you tell an example what it is used for? What kind of FPS do you get?

1 Like
  • When I tried with two full 8x8 maps on top of each other, perfs were around 55ish fps, without music, sprites, sfx, streaming.
  • Using smaller tiles, you will need more RAM and CPU needed, but less less FLASH. Same applies for bigger tiles. I chose 8x8 because I wanted finer maps.
  • I never reached under 30fps in ARIAT yet by spamming sprites and enabling a default opaque tile for the FG in my game. I’m not sure how to be honest, it’s amazing what firepower there is inside the Pokitto.
  • All of those were done using TASUI’s TileMap class, not the regular Tilemap class. It got different constraints, and allows empty tiles (= no rendition), per-pixel 0-1 transparency.
  • With this, if you got a fully opaque tile on the FG, you can put an empty tile in the BG under so you save a bit of CPU. In ARIAT I intend to use a lot of the FG in such a manner, especially for some building parts.
2 Likes

Day 17, 18 - 2020-05-09-, 2020-05-10

More about Tiled and UI.

  • I upgraded my Map/Place converter so it’d generate code on a per object basis.
    • I’m using a special Tiled-only Tileset to add the entities to a scene.
      • The Tileset, named ObjectsTileset, defines all the objects available for instancing into the Place.
      • It’s done using the code custom property, which currently, for Barrel, is the following:
        game.entities.add<BarrelEntity>().setPosition256({($object.x$ + $object.offset.x$) * 256, ($object.y$ + $object.offset.y$) * 256});
        
      • $object.XXX$ is going to be replaced by the corresponding property in the final object.
      • In addition, the properties defined in the original object’s tile will also be used.
    • A map will define one or more Objects Layers.
      • Each of those will contain Image-Objects, using the ObjectsTileset.
      • They also contain a custom property “initFunction” , whose names actually don’t matter, but where a custom property “initFunction” which is the name of the function that’ll execute the generated code.
    • The screenshots will speak for themselves (see below).
    • This is a very convenient system. I wish I knew Tiled before to be honest, in past projects!
    • Something
  • I made a dumbed down Sprite Layer, ironically named VersatileLayer, which allows me to place Sprites (no mirror/flip/recoloring) above the UI, while having the regular sprites below it.
  • I updated the Tank’s Target Cursor so it’s always drawn above every other game objects, including the Foreground Tiles.
  • I drawn and implemented a new Hand Cursor to the various menus.
  • I also started coding the Pause Screen, with a menu.
    • This one provides an “Exit” option, which takes the Player back to the Main Menu.
    • It’s also using the Versatile Layer, since the Sprites Layer is already used for Game Objects.
  • I revamped a bit the Sprite class so I could control the animations in them.
    • This allows me to fix a bug where explosions would continue to explode while the game is paused.

2020-05-11 - Map's layers2020-05-11 - Objects Layer Properties
Map’s layers. The interesting one here is Objects - Initial, as well as its properties. Notice the custom property initFunction.

2020-05-11 - Barrels on the Map
Delicious barrels!

2020-05-11 - Barrel Instance2020-05-11 - Barrel Tile Properties
A single barrel instance and the tile it’s deriving from. Notice the offset.x/offset.y which are used to adjust the in-game barrel to the Tiled rendition.

2020-05-11 - Generated Places
Generated header file. The init function is available from here.


The generated code for the init function.

2020-05-10 - Menu Cursor
A little gif summarizing everything. Sorry, I’m fond of hand cursors!

Upcoming things

  • More interactions between the Game Objects.
  • Explosions, Damage, Exploding Barrels.
  • Pushing a Barrel with the tank.
  • Exiting the Tank and taking a Stroll.
7 Likes

That is a very good idea.

1 Like

Sorry, yet another packed devlog!

Day 19 - 2020-05-11

Getting more physical!

  • The InteractionSpace -which is responsible for any kind of interactions between objects- has been upgraded to handle the map collisions (if specified) and body-to-body collisions.
  • As a result, barrels can now be pushed with the tank.
  • Barrels will also collide with the map itself.

2020-05-11 - Pushing Barrels Around
A lengthy GIF showing the tank playing with the barrels.

Day 20 - 2020-05-12

Explosions!

  • When a fired Shell explodes (against a wall, the ground or an object), it’ll generate an Explosion Effect.
    • Basically it’s a splash damage effect against the surrounding objects.
  • Barrels now have HP, and those will decrease when touched by Explosions.
  • Barrels without any left HP will explode as well.
    • Because there is a few frames between the start of the Explosion and its effect, it leads to interesting chain reactions.
  • When an explosion happens, it’ll shake the screen.
    • The shaking is cumulative, and decrease quickly over the time.
    • This was requested so much by @FManga that I couldn’t ignore it anymore.
  • The Options screen allows going into the same map but with more more barrels, for fun.
    • … and loweved FPS too.
  • In-game animations are now paused when the game is paused.

2020-05-12 - SPLOSIONS
No shaking yet, but a chain reaction.

2020-05-12 - Barrels Room
Loading the Barrels Room for more fun! Actual FPS is around 21.

2020-05-12 - Shake it baby
Finally, shaking.

Day 21 - 2020-05-13

Deadline approaching!! DANGER.
Let’s add a few humanoids to the game!

  • I’ve spend a lot of the day drawing and rendering simple characters.
    • There is the Dummy, which is your lovely naked bald man, and Clementine, the actual protagonist.
    • I’ve also drawn a knife, but it’s not used yet.
  • Introduced the new CharacterEntity, used to represent in game all kind of characters, from the protagonist to the NPCs.
    • Currently less useful than a barrel, since they don’t explode.
    • They do take damage from nearby explosions tho.
    • If they die, they blink out to non-existence.
  • Holding C will let the Protagonist get out of the Tank.
    • The camera will be centered on them.
    • The HP bar will represent the Protagonist’s HP when they’re outside.
    • It’s an early introduction to the Character Mode, where the player will spend a lot of time as well - less fast than the tank, much more agile, more fragile, … and also when you can interact with people and objects other than by firing at them (thought you will still be able too).
  • Pre-animated the walking for Characters.

2020-05-13 - Dummies
Diverse targets!

2020-05-13 - Clementine
Enters Clementine! … but she’s as stupid as a dummy right now.

2020-05-13 - Clementine Death
The Tank is currently indestructible, but a panicked Clementine is not. Should’ve kept yourself inside! Also, no game-over yet.

Upcoming things

  • Exploring the map as the Protagonist.
  • Enter the Tank again - with a few related UI.
  • Some hand weapon maybe.
  • Picking up items from the ground.
  • Dialogs?!
  • Enemies?!
  • More map to explore?!
  • Jam end is coming so fast tho…
6 Likes

Days 22 - 2020-05-14

Some (ill-fated) refactorizations, and an actual (important) gameplay feature.

  • I implemented a way to have 100 updates per second in the game, with the rendering FPS able to go as low as 10 fps (if below, the update/second rate will also go down).
    • I got an issue with the buttons press/release, so I made an emergency wrapper for them.
  • Internally added launch types to GameActivity - story, debugLevelXXX.
    • It’s simply a way to communicate between Activities (States).
    • It’ll be also used when loading a file later.
  • It is now possible to move the Character after going outside the Tank.
    • The walk itself is animated.
  • Velocities are now used for Tank, Character and Barrels, which are used by the
    • It is done by long-pressing C, which will bring the character out instead of the pause menu.
    • Pause menu is bring up by simple pressing-then-releasing C.
    • Explosions will add a give of velocities to surrounding Colliders.

2020-05-14 - Taking a Walk
Character getting out of the tank and taking a walk. Since they’re spawn at the same position than the tank, the Collider Separation Code will actually separate them using the X axis by default.

2020-05-14 - Debug Levels
Launch modes - “Story”, and two debug levels. More importantly, one debug level allows spawning a character without a tank; which is the way the game will start.

2020-05-14 - Velocities
Velocity never fails to make me happy!

Final Jam Day 23 - 2020-05-15

TL-DR

  • I gave up the jam.
  • I didn’t gave up the game.
  • Brain fried.

About giving up and fried brain.

  • The Character can enter the Tank (if there is one) by long pressing C near it.
    • A hint appears when it is possible to either exit or enter the Tank.
  • Exiting the Tank is now consistently spawning the Character behind it.
  • Character’s HP is now properly sync’d when entering back into the tank.
  • When the Character dies, the game switches into “Game Over”.
    • Then the game is soft-locked since there is no menu yet to exit.
    • The time is also slowed down after dying.
  • Items can be found and picked up in the ground.
    • They’re automatically picked up when the Character touches them.
    • However the Tank cannot pick up items!
    • The Inventory doesn’t show them yet.
  • The internal Player class was refactored in order to support the Item picking-up and HP syncing.
  • The game failed to reach a state closer to what an actual game is.

2020-05-15 - Exiting and Entering the Tank
Exiting, Entering, Firing, Exiting, Dying because of an Exploding Barrel, and finally showing the Game Over screen in slow motion.

2020-05-15 - Picking up items
Items! A Pokitto, a Government Keycard, an Energy Cell, a Knife and a Package.

About the Jam / Post-Mortem

Unfortunately I gave up on the jam around 21:00. My mind got less and less focus as the deadline approached, and I was nearly in a zombie state after 3:00 PM.

What I intended to do for the jam:

  • You start inside the Workshop, and your employer wants you to deliver a package into the Farming Area.
  • You get the Package inside the Workshop Building, get into the Tank, and then the City Map shows, with only the given location.
  • You end up in an ambush in the Scrapyard Area, and you have to defend yourself. You also have to retrieve an Energy Cell in order to activate a bridge or door so you can escape the Ambush.
  • You deliver the package in the Farming Area by meeting with a Mysterious Guy™ there.
  • A dialog happens with the Mysterious Guy™, who ask you to deliver a message to your Employer.
  • You get back into the Workshop Building and have a final discussion with the Employer.
  • You’re being teased about a following.
  • Out of the Tank you could talk to people while in Peace Mode, or attack them with the Knife in Trouble Mode.

Optionally you could pick up a few items while battling in the Scrapyard Area, (including the Pokitto and Government Card, but other as well), which would have triggered different dialog lines after the battle.

Why I gave up

I couldn’t deliver a half-backed (or as some called it “raw gem”) tech demo. I didn’t want to waste the judges’ time with a game that’d be closer to a tech demo, showing nothing of the story, with fake UI. I felt like it’d be the same as mocking judge. Additionally, other people had really polished games. So I just gave up. It was shamefully relieving to do so.
I needed to rest, and I’m still resting, given the inconsistencies I’m making for various things.
My brain is still active about the game, because it doesn’t want to stop being passionate about it. I’m taking notes here and there.

Thoughts about it

As for the main objective of the jam, it’s obviously a failure. I couldn’t deliver on time.
It’s an important lesson for me, because I tend to be slow doing things, and people around me anticipate that by extending deadline. Which is bad - I grew into the concept that I never need to deliver something for the deadline. Thanks @filmote for having vetoed the extension and convinced @jonne to not extend it. I think it’s also a good thing for the PokittoLand that we do not extend our jams.

However the jam is also a journey and about that, I do not consider it a failure at all.
While I obviously messed up my priorities and failed to meet the deadline, I’m very happy with the following:

  • I managed to combine a tilemap supporting slopes with a very simple 2.5D physics engine.
  • I recreated a converter script with my own code generation and learned how to exploit some of the most interesting Tiled features to pull up data.
  • I created an embryo of universe I’m really happy with, and I intend to explore more of it in the future.
    • The concept arts tell a part of it, but a lot happens in my mind as well - musics, scenes, stories, gameplay features …
  • This game is actually a follow-up of two tank games I made in the past (around 17-18 years ago!), and could be also named “BattleTank 3”.
  • I’m very happy of the code structure. While it’s not the most efficient, it suits my needs (or desires?) about separating concerns a lot.
  • While I spent a significant amount of time on TASUI, it allowed me to improve my knowledge on various stuff and to get comfortable with TAS as well.
  • While I’m resting, I’m even more “hungry” about making that game, the more by writing this “final” devlog.
    • This includes a special TAS layer/linefiller I wanted to do as an hypothetical feature.
    • I got great hopes toward @FManga’s AudioLib LibAudio as well.

It means that this will become my main Pokitto game. @jonne said it got a vibe of TAZS, and it’s also not that innocent. Both games use similar concepts at their core, after all.

Extra

By the way, here is the final jam bin!
ariat-pokitto.bin (107.8 KB)

3 Likes

I am not sure I convinced @jonne but you are welcome :slight_smile:

1 Like

With all due respect, I wholeheartedly disagree,
and I think you’re being too hard on yourself.

It doesn’t matter if a game is fully featured or achieved the grand idea,
that’s not the point of a game jam.
The point of a game jam is the idea, the excution and the process itself.

You can take the demo and polish it up into a proper game after the jam if you want to take it further,
but even a half-finished mess is worth entering.

The last two jams I entered, my entries were crap,
poorly made demos that I threw together in less than two days.

In the former jam I came 7th or 8th (out of something like 10-15 entrants),
and the latter I came joint third.
Neither are particularly great games.
(In fact the latter isn’t even a game, it was just a lame nod to an old Nintendo toy.)

Next time don’t hesitate to submit.

No matter what you do, no matter how great your game is,
one day you’ll look back at the code and say “this could be better”.
The curse of video game programming is that a game is never finished,
and the curse of being a programmer is that you never stop learning,
so everything you’ve ever done looks inferior to what you can currently do,
and what you will go on to be capable of will be better than that.

Either way, keep going. Even if you never attain your goal, don’t stop reaching for it.
(At least not until something better comes along to draw your eye away… :P)

3 Likes

Definitely, this game looks great so far and I can see it becoming one of the ‘must have’ games on the Pokitto.

Amen, brother.

5 Likes

It’s not even half-finished mess to my eyes.

You’re free to disagree, but really, I didn’t ask to be lectured about that decision. It’s been painful enough to decide not to release it for the jam, I really don’t want to be lectured about it or to even debate over the fact it was or wasn’t the right decision to take - I don’t even have the energy to do that -, it’s been taken, that’s it, case closed.

I’ll make (hopefully) smarter decisions in future jams, but I’m 100% convinced that was the best one I could take for this one, given the state of things - which include my own mental state on the 15th.

I know you want to help, but I’m currently in no state for receiving that kind of help. Digestion first!

2 Likes

Day 1 (Post Jam Era) - 2020-05-20

Slowly getting back into it.

  • I made a review so I can have a list of the issues -with their associated countermeasures- somewhere.
  • I drawn an actual portrait for the Protagonist.
    • It’s currently used in the Pause/Inventory Screen.
    • It’ll be used later for dialogs.
    • I’ll have to deport them into SD eventually.
    • Currently the eye blinking is a full frame, but I’ll make a simple “patch” system so I don’t have to get the full image each time.
    • More animations will be done later as well, like talking mouth, wink, annoyed face, etc.
    • Sorry for weird ASCII art lovers
  • I removed the hard-coded stats as they’re pretty useless right now.

ClementineCharacterPortrait-Blink-x4
I think it’ll make more interesting dialogs. Also she blinks!

2020-05-20 - Portrait
Eyes blinking too!

Upcoming things

  • Skippable, General Introduction before the Title Screen.
    • For explaining what’s going on in this Universe mostly.
    • Skippable with a single button press!
  • Workplace Chief makes his appearance.
  • New Game Introduction.
    • About putting the story into motion!

A little side note

Also, I wanted to talk about something that annoyed me a few times but I couldn’t pinpoint it why until now.

When someone throws me tech/art/gameplay help I didn’t ask for, it’s actually removing 90% of the fun I have with coding and game making. That’s because of how I see game making/coding - solving problems, much like a puzzle. It doesn’t matter if it’s about a tiny piece or the whole puzzle.

Think of it as someone spoiling you a movie. Sure you friend won’t have to see it and you might have saved them a couple of hours AND bucks, but was that what they really wanted?

I know you meant well when you did so! Just keep in mind that not all help is welcome, especially when it’s unsolicited. If it’s something that really itches you, please ask before helping.

To be fair, I’ve also been doing that in the past, and I didn’t knew why some people frowned at me, until now.

6 Likes

Day 2, 3, 4 - 2020-05-21, 2020-05-22, 2020-05-24

Making an introduction!

  • I formalized a bit more the background of the game.
    • Basically, an exotic substance that contaminate the lands, killing most life on it.
    • A device which can destroy said substance.
    • Walled, shielded cities where the surviving population remains.
    • A corrupted government that doesn’t want to change the state of things.
  • I made an introduction, which plays right after the game starts.
    • It’s split into multiple screens, sometimes with illustrations.
    • A allows advancing the current screen.
    • B skips to the Main Menu.
    • I’ll rework it a bit later (especially the timing, the wording and to move it to SD), but I’m pretty happy with it right now.

2020-05-24 - ARIAT Intro
The whole introduction.

Thoughts

  • It seems silly to make the introduction before the game. That’s pretty much why I couldn’t make it for the jam :stuck_out_tongue:.
  • However, having a proper intro allows me to more easily project the rest of the game.
    • If any of you sees it as a teaser, it’s pretty much what’s going on on my own head when I’m playing it.
  • It also forced me to formalize the timeline and context of the game, which is important later for the levels/maps, stories and characters.

Upcoming things

  • WorkShop Chief.
  • Shell Icon when inside the Tank to reflect the Fire action (A).
  • Tiny Introduction (more about the Character this time) when starting the game.
7 Likes

Day 5 - 2020-05-25

The Workshop Chief makes its appearance.

  • I spent my time drawing that character, portrait and field sprite.
    • I tested it by replacing temporarily the main character.
  • The Chief is your boss, and will give you your “delivery” missions.
  • The last name is Lagrange. Given name is unknown, usually called Boss anyway.

WorkshopChiefCharacterPortrait
Aka “Snoopy” according to @FManga. A strict boss, but not necessarily always cold.

2020-05-25 - Chief Lagrange
Temporarily controlling the Chief for testing purpose is giving me a couple of interesting ideas.

Notes

  • Coop could be done by borrowing another character.
  • It could also be fun to alternatively control two characters in order to solve some kind of puzzle, much like FFVI/FFII (US) did.

Upcoming things

  • Improving the WorkShop map.
  • New Game Introduction Sequence.
8 Likes

2020-06-10

(I’m too lazy to track the numbers of days)

Quite the huge devlog, but it’s a great building block for all the scripting I want to make in the game.

  • I commited THE sin and created a simple script language, simply called ARIAT Script.
    • It’s a purely procedural language which roughly looks like JS, C or C++ (see below for an example).
    • ARIAT Script is primarly focused on size and scripting as in “Movie Script”.
      • It is not especially fast nor expressive and doesn’t provide a lot of safeguard either.
      • It is very specialized.
        • E.g. There are instructions to spawn objects such as a Tank, and to drive them to a point.
        • Most instructions expect direct literals and no variables.
      • It also might be used to describe the behavior of some NPCs / Enemies.
      • It doesn’t even have any conditional / code control instructions yet :stuck_out_tongue:.
    • The script is compiled into a bytecode.
      • Instructions takes a single byte + their parameters most of the time.
      • Because of how specialized the instructions are, it is much smaller than generated code.
      • It will be easier to load/stream it from the SD card.
    • The bytecode is executed on a VM Thread.
      • Each thread holds the instruction pointer, 4 registers (rA, rB, rC and rD) and a flag register.
        • rD is currently the short-lived/temporary register, used for return results and also to hold some internal state for yielding instructions.
      • Some instructions can “yield” the execution.
        • Yielding means in this case that the VM will pause the instruction and execute it again on the next run.
  • The Cinematic Script is executed-until-yield once per update, before any Game/UI/Rendering update code happens.
    • An update occurring every 10ms in the Engine, so yielding will effectively delay the Script by 10ms.
    • Non-yielding instructions are executed on the same run, so timing can be ensured, unless the Engine is overloaded.
    • The Cinematic Script can take advantage of its “first strike ability” to place objects / prepare the UI before any kind of interaction or rendering happens.
  • I added the Script Converter which will now compiles any standalone ARIAT Script.
    • Currently got no use besides testing the language itself.
  • The Place Converter will now generates and compiles an ARIAT Script out of the pieces of code held inside the various objects.
  • I added a “windowing” feature for the game objects’ rendition.
    • Cheap transitions.
    • Movie-like black bars for cinematics.
    • Also helps gain back a few FPS for everything being rendered under the UI.
  • I started creating what I call the “New Game Sequence”.
    • It introduces the main character, Clementine, who drives their tank into the Workshop.
    • Later they’ll receive their first mission from their boss.

2020-06-07 - New Game Intro Partial
The Tank driving instruction acts like some waypoint. Also, transition

// Step 1 - Chapter.

// We do not want the game scene to appear yet. 0 = instant effect.
gscreen.transitionWithStyle(TransitionStyle.collapseMiddle, 0);
// Yields execution until it's finished doing.
ui.displayChapterText("Chapter 1", "Clementine's First Delivery");
ui.clear(0, 0);

// Step 2 - Situation text.

// Changes the bounding box / cursor so the text can cover the whole screen.
ui.setCursorBoundingBoxStyle(BoundingBoxStyle.fullScreen);

// Displays text in a progressive manner, by yielding until it's done.
ui.displayProgressiveText("2160, March 10rd, Monday\n");
ui.displayProgressiveText("Lagrange Workshop, Larger West District of Amethyst City.");

// Step 3 - Opening the show.

// Adds a tank.
game.addTank({184,136}, 0.5);
// addTank sets rD to hold the reference of the created tank.
// However, rD is always used as the temporary register, so it'll be overwritten.
// So we'll use rA instead to keep it.
rA = rD;
// Another transition - we open from the middle into cinematic mode - aka black bars.
gscreen.transitionWithStyle(TransitionStyle.cinematic, 400);
// At this point, rD isn't anymore holding the tank ref.


// Step 4 - Driving the tank around.

// driveTankTo expects rD to hold a reference to the tank, so we restore it.
rD = rA;
// driveTankTo will drive the tank until it reaches the given location.
// Such location can be conveniently generated by the PlaceConverter by using objects on the TMX file.
game.driveTankTo({160, 136});
// Another point to drive to.
game.driveTankTo({152, 128});
// Etc...

Some ARIAT Script, describing what’s happening in the gif above.

Upcoming things

  • Convert the general introduction to ARIAT Script.
  • Decide on a strategy about the main Palette.
  • Making the Workshop a bit more interesting with more props.
  • Being able to pause a Cinematic to exit to the title screen (maybe skip it as well).
  • Continue the introduction:
    • Clementine getting out of the tank.
    • Clementine seeking the Boss.
    • Ensuing dialog, being given a delivery mission.
6 Likes