Wednesday, March 31, 2021

NOT _Fun

 As Le Figaro put it, it is ter repetita on confinement

in France. Back to closing school, and imposing early curfew

and this for the third time. There are presently 5000 people in

 intensive care(4000 Covid-linked) , a nightmare for the hospitals

as this is 90% + capacity.


Things are in crack-down mode here in Quebec as well : regions such as 

Gatineau and Quebec City are going back to being red zones

(while we in Montreal were never anything else). Pandemics are

NOT fun.


Did read a piece on restrictive sadomachochism: some people get

off on being given restricitve commands - like only eat bread for a

week - and get off on it. This from an old piece by Michel Foucault. which

is offered to explain any faint excitement Macron's annoucements might 

be making. Make no mistake; this is no fun.


I've been coming to another view on confienemnt measures. Consider, for a

moment, what life could be like if the government had not mandated wearing masks. 

Only the pandemic woke would be wearing them, and impressing on their

fellow citizens that they were right about it, in any way possible. A speech from

Macron - or Francois Legault - might well be a salutary alternative in this regard.


Not really celebrating Easter, then. I might well be alone on the actual day.

No point in baking anything; I am baked out from a year of YouTube 'you will 

not believe how creamy' cakes. Might buy a candy bar and crumble bits of it in 

fruit salad.


We have here the true heart of the case against food challenges on You Tube.

You buy a $15 steak and it is a nice meal; you buy and consume at a go $15's

worth of Ben and Jerry's and it is a drug experience, because the pleasure is

really from the brain being pumped by feel-good hormones. I, personally, think

it is good fun, to watch in any event. Wouldn't it be nice...Although I do appreciate

why some people find it upsetting that individuals food drug this openly.


So you, Ms Amberlynn Reid, are sticking to chicken sandwich Mukbangs.


While the rest of us hunker down, yet again.



Children and Covid-19

 How some Children are severely affected by Covid-19:


https://www.spiegel.de/international/germany/doctors-warn-of-illness-in-children-triggered-by-covid-19-a-73481e22-c238-4daa-8908-5aa8b9c35b40


Chickees

 Started work on Match-3. The game now opens to this

image...because, why not.



Actually, quite a bit of work. Initially tried to align the chickees manually, but

that soon turns craycray. Then remembered that Inkscaae has a tile clone function,

but had to re-install it becaue I hadn't used it in a very long time, and the Mac

wouldn't open it anymore. 


I might do stuff with the tiles. Indeed, the assignment talks about adding 'shiny'

tiles...



I might change to a symmetrical background; or at least stop it from moving. The

original diamond background was moving behind a static game; this way, the game

is eyeing the chickees. Didn't notice until I finished it.

                                                       *     *     *

Working static background:


                             
                                                         *     *     *

Decided togo with a static chickee ackground, at least for a while:




Tuesday, March 30, 2021

Sequential

 So, what is your money on? Given an uncertain situation, what are 

you counting on? This way of looking at things can prove salutory.Waiting 

for an occurence or hoping to avoid something are not symmetrical.


Let's look at the purest betting situation. one has a deck of playing cards,

and one flips card in a sequence. On any one flip, the odds are

fifty:fifty for showing a black card. But what about flipping a second time after

a black (even having returned black to the deck). The purest will claim

that the odds are ever fifty/fifty on black. Quite true; but the odds on flipping

two black in a row are different. They are actually at 25:75 !! Depending on

whether one wants to see a black show, or whether one wants to avoid seeing a red,

the betting person is facing different odds. And it's purely mathematical; getting that

first black was not a sure thing, any more than the second one. One multiplies the

positive odds of the two events to get the negative.


There are many possible applications to this, but the bottom line is the same.

Repeating risky behaviour sets one up for a misstep. One's money is on a sequence...


                                          *     *     *


Here is where I fess up about the imperfection of my code on the last

part of the breakout assignment, which I conveniently coded

on Breakout7. There remains the possibility that the Key icon - although taken out of

play - could re-appear  and erase one's possibility of hitting the Keybrick.

Indeed, for the code as is, loosing a life would let it re-appear in the

subsequent cycle. This can be fixed with the 'if health == 3' condition.

But it might also re-appear during the same life if one is not quick to hit

the keybrick. Annoying, if anyone has  played this code. Try as I could,

appear after 10, set timer at -10 at the end, try for timer is false (an exception).

There was, to my mind, little to be done.


Marching on, I later realized that the next game in the course - Match 3 -

will center on timer problems, and timers on timers etc. Promising...

I need to get to it.


Monday, March 29, 2021

Disaster

 I need to get clear on this : although it is certainly

true that masks can reduce the transmission of the

Covid-19 virus attached to a moisure droplet, there is no

reason to think an unattached virus could not get through

practically anything. It is all about orders of magnitude.

The Wuhan Lab - in the middle of a crowded urban center - then

becomes an invitation to disaster...


                                                 *     *     *

From today's Journal de Montreal:



Fun Time

 Final clean-up on my Breakout Assignment files.

I've got the timer changing paddle size at a given interval.

Fun at a lower level, but might be frustrating when

there is a lot of clearing to do...👧 Maybe score should

move faster with a smaller paddle!?




Sunday, March 28, 2021

Got It!

 At framerate in the 40s, but still, the code works:



Saturday, March 27, 2021

The Tour

 Success on the code front: I now have my key and keybrick combo

working as specified, le tout on Breakout7. My recording

problem is solved: one has to start from the desktop and call the game 

while recording.Only problem, I can't seem to play it through to demonstrate it.

Maybe if I rest a while...


Here's the grand tour of the code:

On PlayState:










FromServeState:



From Util.lua:



From Keybrick.lua

From Powerup.lua:



From main.lua



From dependencied.lua:




Seems straightforward, now that I look at it dispassionately...

Geo Moment

 Hoorah for Geography! I feel better informed having watched the

two YouTubes below:


The first made me realize that the one continent was the original

emergent land mass on the planet, forming and reforming over

an active core...


The second - hold onto your hat - points out that it is as a result of

COLD that we have large tundra and desert areas on the planet, because

there is less moisture around when  temperatures go down...


Friday, March 26, 2021

Framerate

 Made a video of gameplay that shows my working brick

code (on Breakout7, with no frills). Small problem, the framerate

seems down from having a recorder on top of the game.😒



*     *     *
A bit of a namegame muddle: keybrich is now called keybrick and is a class

instance; key icon is a powerup...😀

In any event, the icon now appears on a timer after 5 seconds!





Thursday, March 25, 2021

Easy

 Had something of a coding victory, today: added - to PlayState - the brick

collision code in a version amenable to the keybrick. With precisely the result

I wanted. The keybrick gets hit, the score goes up by 1000, the keybrick disappears.

Just need to put a condition on it: the score should only go up once the

key icon has been acquired by player. Tomorrow's problem...


What was nice here: just changed references from brick to self.powerup. Brick is

one of ipairs whereas powerup is unique.  Also dropped the Brick:hi() function.




That was easy! 👵

Wednesday, March 24, 2021

Separate

 After much trying things out, ended up seeing

the wisdom of coding for keybrick separately from briks.

Below, I am asking ServeState to tell me the number of

bricks in play, and 14 includes Kbrick while 10 doesn't:






Thus, this involves not having powerup in the bricks array.



Another aspect to be watched ofr: having the powerup params appear in

the game state calls. 

Ball doesn't appear when entering servestate - because a new ball is created -

but powerup needs to.

ServeState:



PlayState:



                                                                *     *     *

I did get Powerup to use the utilities quad for rendering:






Grateful

 Got my first Pfizer jab, this morning. There is a bit

of a kick to it: after 15 minutes, felt slightly dizzy. This lasted

about 30 minutes. 


I am now back to my old self, albeit with a bit of a warmer 

body temp.


Very grateful. This nasty little pandemic is going to end...👩‍🦳

                                          *     *     *

I was vaccinated at 11 am. 7 pm and the fever is down!

Monday, March 22, 2021

Nil

 So what have I accompished in my day so far!?

I have plaved one little 'nil'. The result: it makes a random

brick disappear.





                                                                  *     *     *

Voilà, with the powerup icon. Still need to write behaviour code for it!








Sunday, March 21, 2021

Craziness

 Just found where the action happens on those brick tiers.

In effect, I was suffering from false concreteness. imagining 

bricks on top of one another. Below, the diffrence in code between

Bricks.lus from Breakout6 and that from Breakout7.




Levelmaker was innocent all along; the B7 code just changes the draw

parameters.

Holes

 I've returned my levelmaker code to its original form; it

will not show the keybrick, which is tier6.


Below, a random level32. How could I get one key brick

into one of the free spaces, and not have anything underneath...




Saturday, March 20, 2021

Keybrick


Swallowed my pride and consulted the documentation 😎

A spritesheet that is spliced is ordered in a new table based

on certain specifications. Looking at utilities.lua, one can

cretae a table with new members. Here a perfectly symmetrical

one for use in levelmaker.


A few adjustments, and one can test for the appearance of the

keybrick.


Below, in PaddleSelectState:



Problem is, when keybrick does appear, it is in a pattern and as a normal brick 

on top of the others...

Voilà!

 The end to the Breakout saga is in sight. Should

have a usable game, with the assignment changes incorporated

by the end of the week-end.


Wanted to reward player with a poem for finishing a level. 

This involves changing the font; here's how.


Download the typeface of choice, and move the chosen

version to the game's font file.

Add a reference in main's load function:


Good to go, in PlayState:


Here, integrated with CheckVictory:


The result!



                                                         *     *     *


source: https://www.poetica.fr/








Thursday, March 18, 2021

Funny!

 

source: CNN


                                                     *     *     *

WHY?