source: The Guardian
Wednesday, January 6, 2021
Tuesday, January 5, 2021
Shaders!?
Using Love for 2d, one can introduce pixel shaders. These allow one to
do all kinds of color effects by coding directly to the graphics card!?
* * *
Below, the example Shaders code from the Love2d website. It's a 'Climb every
mountain' moment. The shader irself is coded in a language that is not Lua, but
OpenGl.
It is a C-family language (note the colon endings). The portion in orange below
is the stranger in the page: comments, and actual code. It is essentially telling
me that I have color code, and coordinates from a source image, coordinates of the
screen to work with to make my magic. An image - texture - in this context is
a color map!!
Monday, January 4, 2021
Live & Learn
I was overjoyed to find a clean approach to a pause function
in the Breakout game code. My clumsy attempt to define one
in the Flappy Bird assignment left me forced to test for pause
in the update function. The right way to do it - entirely in the
PlayState update - kicks off with paused as true, otherwise return.
Moreover, I had to use 'enter' to go back to the game. Here, a new
tap on 'space' does the trick.
Neat!
* * *
The love2d entry on local function is also worth reading. Comes down
to the fact that global functions are stored in a table while local ones
are in the stack.
Sunday, January 3, 2021
Friday, January 1, 2021
No Illusions
I have no illusions; now that I know how to do this,
the industry is leaps and bounds ahead...🦹♀️
* * *
Wednesday, December 30, 2020
Walker2
I've redone the code on our Walker image, on the model
offered in the tutorial below. It's clear where the parameters are
in the code...
* * *
Tuesday, December 29, 2020
Subscribe to:
Posts (Atom)
