Saturday, July 3, 2021

I owe myself for the 1st and the 2nd, so I need three hundred words. Let’s start with a to do list-

  1. Waving flag. Revise my existing flag to appear to move in and out to make it ripple.

  2. Splat out a super simple game engine, revising my peeps code.

  3. Back to my peeps!


Roving clouds and lightning, nice! I’m watching nook play a new sim game, Song of Syx… Make the vertices for my stripe quads and star polygons need to be P3D so that I can change the z depth and get that ripple. Use a sine function based on x and/or y. Things will appear to move in, out and around. The angle I feed into the sine function is based on position and a count. This number gets divided by some constant and multiplied by pi to get the angle in radians, tracing a depth from height to negative height plus width to get my z depth which changes screen x and screen y for the vertex and depending on level of detail should make a smooth waving flag! I’ll take care of the horizontal red and white stripes first, then the blue field and finally the stars.


The super simple game engine is about revising my existing (peeps) code for 3D, including worlds and critter body plans, etc. Init becomes initialize of initStf(), draw becomes dsplStf() and update becomes gmeLoop() (or aniLoop(), or njnLoop()? Hmm… how about chngStf()). I build all the game or engine stuff at once, display that stuff to my canvas and the rest of my screen, and then change what needs changing based on inputs and logic, like clicking on a button outside the canvas or clicking on a point in the canvas. This is the traditional game and animation loop, only pretentiously or aspirationally calling it an engine. 8-P


No comments:

Post a Comment