mailto: blog -at- heyrick -dot- eu

Advent 2021 day 6

Oops, the camera was in 1080p mode by mistake. So it's better looking (but not as nice as 2160p) but a much larger file size. So... it took a while to upload. <sigh>

 

Pension - reality

I spoke to somebody at work who told me that France has about as many different pension regimes as there are people collecting pensions, and that looking at random sites won't be any use. Instead, I should go to the government site "infoRetraite".

Which I did. It invited me to connect using "FranceConnect", where I can sign in as for the tax office, or the social security... it's intended as a way to have one sign in for all the different government portals.

Once in, it provided me with a full breakdown of my pension rights, how many trimesters I need (157, I think?) and how many I have (50), and how much everything would come to according to two primary criteria. The first being that I continue in full time work until I retire, and the second being that the current legislation is still in force at the time of my retirement.

Here's my breakdown.

My pension rights
My pension rights.

My legal age of retirement is 62, and if I decide to retire at 62 then I will be paid €613 brut per month. They whack off about 10.5% in "social charges", so it's about €550 a month. That will be an option to consider if I feel like rocking the old British State Pension amount (it's not far off what they gave mom).

Because I was in my early-mid thirties when I started work in France, I don't actually have enough trimesters (pension credits) to claim a full pension until I reach the age of 67. At that point, I can claim a full pension of €984 brut (that's about €880 net).

Should I decide to work an additional year, it's a gamble. I am betting on living long enough to make it worthwhile, and they are betting on me not living long enough that they lose. However, should I decide to work an additional year, they'll bump up the pension by around 10%, to be €1092 brut (about €975 net) per month.
It's certainly something to consider - but (and this is a big but) - it is something to consider when I'm 67, not now.

I felt turning 42-43. I don't have as much energy, I'm always tired. I would say my concentration is shot, but I've always had a level of concentration akin to that of a goldfish. And I've noticed in the past couple of years that my eyes aren't as good. I used to have to take my glasses off to read the monitor (just a bit beyond arm's length away), but now I keep my glasses on as it's blurry otherwise. Instead, I take my glasses off to read my phone, or ingredients in food.
There's definitely been a change in the past few years.

Plus, twenty years is a long time. Will I be gaga by then (well, proper gaga, not like I am already)? It's a fairly physical job, will I be up to it? Will I need to try to juggle a vacuum cleaner and a zimmer frame? Will I be on chemo? Will I still be using RISC OS? Will France have done something incredibly dumb like elect a right wing nutter as President? Will we be at war with the [Arabs|Chinese|Russians|etc] (delete as per your thoughts)? Will we all have died of the next pandemic (when Covid meets HIV)? Will we have found a purpose for blockchain that doesn't involve criminals coining it? Will x86 finally be consigned to history? Will ARM? Will we have suffered a Kepler Event? Yup, twenty years is a long time.

It's a little depressing, and perhaps a cautionary tale of the unintended consequence of switching countries as an adult.
Not that I begrudge it, I'd rather try to live on €550/month than think of "going back". I put that in quotes as I see Britain as where I'm from. But it's not home. It hasn't been for twenty years. Mom and I got ourselves a one-way ticket. I have no plans to move. I have a home (not a house, a home), a job, and something that vaguely resembles a life.

Now, every cloud is supposed to have a silver lining, right? Well, the way I can look at this is that it's going to be damn hard to save anything with a small pension whether it be 550, 880, or 975. So that would give me an extra five years to stash banknotes into a mattress, right?

I'm not going to work out how many thousands a hundred a month works out to be, because reality isn't like that. I'll need another car, I don't imagine I'll get twenty years out of Caoimhe as that would be, like, two hundred thousand kilometres only going to work and back! (so make that cars plural then) Not to mention all this crap about doing away with dead-dino cars, even though battery technology is absolutely nowhere near capable of replacing a simple combusion engine, not to mention full of stuff that's probably a hell of a lot nastier than dead dino juice.
Plus, there will surely be other things that crop up too. The roof might need replaced or...
So no, having savings like that is an aspiration. Something to try to aim for, in amidst all the other stuff.

Of course, I could win the hundred and forty something million on offer tomorrow. Or I could be hit by a bus. Sadly, the bus is statistically a lot more likely. In fact, I'm probably more likely to be killed by a head impact from a cat falling from an airplane than winning the lottery. But I play, because while there's a pretty good chance that I won't win the jackpot, if I don't play then then it's not a pretty good chance, it's dead certain.
Besides, you gotta hope for something, right?

So, my target retirement dates are either January 2041, or January 2042. Because, unless inflation is horrible and those values are worthless, they aren't bad. Granted, they aren't good, but it won't be too great an adjustment to live on ~€975. It's certainly an improvement over the €645 figure that I discovered yesterday. And if that's brut, it would be around €575 a month.

Final comment on this. I can't complain too much. I was taking about this with a woman at work. She's maybe five years or so younger than me. Because she's below the somewhat arbitrary cutoff, she thinks her retirement will be at the age of 67. It might be a little before (as she has children and that alters things - like I said, French pension regimes are complicated) but it's not 62.
The women going on retirement now are leaving at sixty. The young'uns who are just starting out, at the moment it's 67 but that may be deferred even later in their lifetime, depending on the political situation. I just happen to be old and crusty enough that I could take retirement at 62, but not over here long enough to have sufficient pension credits to do it until I'm 67. I guess I'm lucky I managed to scrape that in.

So... twenty more years of the madhouse.
Or, alternately, they have to put up with a weirdo introvert that has a really bizarre accent for another twenty years.
I wonder who gets the worse end of the stick? ☺

 

Mamie Fletcher's House 6

Creating the Ghosts

In order to have something for Lucy to do, she needed an antagonist. Something she can dispatch (I carefully avoid the word 'kill'), and something that can hurt her.

Ghosts.

The first design I came up with was the naff looking "Ood" thing that you saw in the mockups. It was never intended to be an actual character, it was just something I drew in, like, thirty seconds.

For the game, though, I needed a ghost. Which meant thinking about what a ghost should look like. It had to be representative of a ghost, and fairly easy to draw.

 

Ghost designs

I've never seen a ghost. I doubt you have either. They may well not even exist.
In fiction, ghosts come in many forms. From ephemeral fuzziness to, well, somebody wearing a bedsheet over their head.

The first design was a rather stereotypical ghost, kersopping (that means "with its arms up"):

Ghost type 1
Ghost - type 1.

That design was rejected due to being a bit too cliché. It looked... silly. Like you'd want the game to have an option where Lucy can run up and slap a "KICK ME" sticker to its back.

Type 1B was me just playing around. You can probably guess why this design was rejected.

Ghost type 1B
Ghost - type 1B.

The next idea was more abstract. It had the eyes and a body, but ditched any other distinguishing feature, like arms.

Ghost type 2
Ghost - type 2.

The third design, I quite liked. It took the idea of ghosts being a sort of energy, and removed the reliance on having a humanoid form.

Ghost type 3
Ghost - type 3.

This was, sadly, rejected as being "damn near impossible to animate in any meaningful way" (exact quote).

The final design was basically pulled straight from Kara no Kyōkai.

Ghost type 4
Ghost - type 4.

While this might have made a better ghost (it would have randomly floated in the air), it was drawn face-on. I wasn't sure it would work when seen side-on. Plus, stringy-haired-ghost-girl might not make so much sense to people unfamiliar with Japanese culture (those who never saw films like Ring, Pulse, and The Grudge ... and I don't mean the crappy western remakes).

 

Drawing the normal ghost

Ghost type 2 was selected, and it was refined into something that could be easily drawn. For animation, it was going to 'shimmer' slightly.

The final version was actually pretty easy to plot. A line of overlapping dark blue circles were drawn for the outer border. Slightly smaller lighter blue circles were drawn within to make the border an actual border. The shade of blue for the ghost body was chosen in order that it would be drawn with an ECF pattern, rather than be a flat colour.
A rectangle filled in the middle, and two eyes were plotted as black circles.

Animation, the shimmer effect, was simply altering the centre points of the outer circles slightly.

The blue (normal) ghost
The blue (normal) ghost.

Why was the ghost designed as blue? Two reasons. The first is that manifestations of electricity are blue, whether that is (I can feel) St. Elmo's Fire (burnin' in me, burnin' in me) or sparks large enough to clearly see.
The second reason is Pac Man. There were four ghosts in Pac Man. The red was an aggressive chaser, the pink would try to ambush you, and the orange didn't seem to realise that it was supposed to chase the little yellow dude and generally stayed out of the way. These were fairly predictable behaviours.
Blue, on the other hand, seemed to like to patrol a specific area of the screen, but was rather unpredictable. I know now, thanks to people dissecting the game code, that the blue ghost (Inky) is the only one that doesn't use the player's position when working out how to move. It uses Pac Man's postion and the position of the Red ghost. I know that now. I didn't know that as an eight year old, and couldn't figure out what logic the blue ghost was actually using, which made it really hard to know how to avoid it.

So, bluer ghost in Pac Man, and going back to the idea of ghosts being electrical discharges (a nod to ghost type 3), it seemed that blue would be the right colour.

 

Drawing the Mega Ghost

An additional ghost was added as an enhanced adversary. There isn't really that much in the way of necessary tactics when you just pop up near a ghost and take a photo.
So I wanted a ghost that would not only move a little faster, but will require more than one photo to dispatch.

The Mega Ghost.

It seemed that a complimentary colour for this enhanced ghost would be green, a little shout out to Slimer there. And to make sure that you know there's something different about this one, the eyes are dark red, with bright red pupils. This one is not your bestie.
Otherwise, the drawing is the same method.

The green (Mega) ghost
The green (Mega) ghost.

 

Damage and recovery

That's not all. The Mega Ghost, when hurt by a photo, can regenerate itself. It isn't fast, so a quick player can fire off enough photos in succession to get rid of this ghost, but dawdle and you'll have wasted a photo. Oh, and this is the point when you'll need to keep an eye on your film!

The next question was to think about how to show this damage. I tried different shades of green, but it didn't look right. I tried an alternating mesh of transparent pixels, and it was better but still not right. Getting a bit frustrated by not knowing exactly how I wanted damage to appear, but knowing what I didn't think was right, I threw together some code to just draw bright green circles on top of the ghost (bright green gets made transparent, remember).
Bingo! That was it. A grid of circles, lined up with the eyes for extra creepiness, the circles getting larger according to how 'hurt' the ghost is.
Funny, isn't it, how sometimes the simplest thing can be the most effective.

The hurting the Mega Ghost
The hurting the Mega Ghost.

 

Ghost deaths

I had various ideas about how to do a ghost death, like draw the ghost frame getting narrower until it's gone. But in the end I decided that such things would likely affect gameplay. Just make the ghost cease to exist, that's all that is important.

 

Ghost movement

When the game starts and the ghost array is initialised, the ghosts will all begin from their assigned positions, however whether they begin moving to the left or the right is randomised, so each time the level starts, the ghosts will not be in exactly the same position as they were previously after 'n' seconds.

The ghost speed depends upon the ghost type, skill level, and how far along in the game you are.

Lucy can move at a speed of '3'. You don't need to worry about 3 what, just know that Lucy's speed is three.

The game is broken into three sections. The number of levels (22 in the release game) is divided by three. This gives the value '7', as it is calculated as an integer. The current level is then divided by this value (7). If the result is less than 1 (the first six levels), the result is altered to be 1.

This means the normal ghosts move slowly (1 unit) for roughly the first half of the game (levels 1-13). For the next seven levels (up to level 20), they will move 2 units. For the final two levels, they will move 3 units (the same speed as Lucy).

The Mega ghosts all move 1 faster than the normal ghosts. That means in the latter levels, they will outpace Lucy.

Finally, adjustments are made according to skill level. For normal skill, the above is what applies.
If we're playing the easy (mommy!) skill, all of the ghosts are slowed down one unit.
And, of course, if we're playing on nightmare skill, they're all sped up one unit.

Here's a table to make this clearer:

Part of gameEasyNormalNightmare
First half of game1 / 21 / 22 / 3
Most of rest of game1 / 22 / 33 / 4
Final levels2 / 33 / 44 / 5
Speeds are normal / mega
(note, Lucy's speed is 3)

This means that for much of Nightmare skill, the Mega ghosts can move faster than Lucy, and at the end even the normal ghosts can too. There's a reason it's called Nightmare!

 

Ghost behaviour

Normally, a ghost (either type) can move around floor tiles and past ladders, but will be stopped by doors, holes, walls, and steps.

If Lucy's current fear level is 50% or more, the ghosts will be able to pass holes and steps (but not doors, emptiness, and walls).

If Lucy's current fear level is 85% or more, the ghosts will move freely, only constrained by the edges of the play area.

In Nightmare skill, it doesn't use Lucy's current fear level, it uses the maximum fear Lucy has felt in the game. Which means if she has died falling, then that'll be 100% (even if her actual current fear is 0%). Which means that ghosts will appear from the walls and fly around stopped by nothing except the physical boundaries. There's a reason it's called Nightmare!

 

How the ghosts are implemented

Internally, there is an array that can hold up to ten ghosts. When a level is loaded, the ghost starting positions are read out of the level definition and written to the appropriate array, along with a marker of what sort of ghost it is.
A starting direction is randomly chosen, and a "shimmer state" is also randomly chosen (so the ghosts are not all shimmering in the same way at the same time).

From that point on, the ghosts run autonomously. Every screen redraw, the function ghost_draw_and_move() is called. This will check to see what ghosts are actually currently visible, and will plot them to the screen. It will then tentatively move each ghost along their current trajectory, and then validates the move. If the move is okay, that's it. If the move is not okay, it will undo the move and reverse the ghost's direction of travel.

 

Touching a ghost

Every frame draw, a bounding box is calculated for Lucy, and for each ghost that is visible on the screen. If any ghost overlaps Lucy, then she's been touched by a ghost.
The ghost touch registers once, and is then blocked for a second. This is so she doesn't have her fear wiped out by not getting out of the way of a ghost. It's also useful if there are multiple ghosts together. She'll only be hit for whatever amount of fear the ghost noted as touching her dispenses once every second, regardless of how many ghosts are touching her.
My advice? Don't test this, just run. ☺
Ghost bounding box
Ghost bounding box.
By the way, the missing bit at the bottom of the ghost is so that Lucy can jump (and partial head into the floor above) without this registering as a ghost hit.

 

Touching calculations

The calculations for the touching is actually pretty simple. You need to think outside the box a little and instead of trying to work out if the two rectangles are colliding, instead check if they are not.
This means that it can be boiled down to a fairly simple:
  • If A's left is greater than B's right
or:
  • If A's right is less than B's left
or:
  • If A's bottom is greater than B's top
or:
  • If A's top is less than B's bottom
then we've determined that A is respectively to the right of, to the left of, above, or below B.
We do this as an OR test, because we only need one of these conditions to be true to prevent an overlap. We're dealing with rectangles, so if - say - A is to the left of B then we don't need to concern ourselves with any of the other tests as there's no way it can be to the left of but overlapping at the top.

In terms of code, it's simply:

   // Does this ghost box intersect with Lucy's box?
   touching = TRUE;
   if (  ( lucybox.min.x > ghostbox.max.x /* Lucy is to the right of the ghost */ ) ||
         ( lucybox.max.x < ghostbox.min.x /* Lucy is to the left of the ghost */  ) ||
         ( lucybox.min.y > ghostbox.max.y /* Lucy is above the ghost */           ) ||
         ( lucybox.max.y < ghostbox.min.y /* Lucy is below the ghost */           ) )
      touching = FALSE; // no overlap so not touching

 

Stuck ghosts?

This happens when a ghost moves in a way that is more than usual (through steps, across emptiness, etc) due to Lucy being afraid, and then is suddenly no longer permitted to perform that action if she drinks tea and calms down.

There is some special code that will allow ghosts to pass through opposing walls (in other words, if it is moving left, it can pass through a right wall) as well as travel along nothingness, in order to allow the ghosts to return to playable areas, that Lucy can reach in order to take a photo of them.

Within the playable areas, the ghosts may also be stuck on or behind steps, or over holes in the floor. Technically the ghost is moving, but it is moving in the context of "hmm, can't go left so let's go right, hmm, can't go right to let's go left, hmm, can't...".
There is no special handling to allow a ghost to extricate itself. It'll just appear to be frozen in place, easy pickings for a girl armed with a camera, right?

 

Tomorrow, we'll look at the camera flash effect, with some juicy assembler to read!

 

 

Your comments:

Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺ ADDING COMMENTS DOES NOT WORK IF READING TRANSLATED VERSIONS.
 
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.

Rick, 6th December 2021, 20:27
These are not fixed amounts, note, as pensions are re-evaluated yearly to adjust them for inflation. Not by much, this year the base pension is going up 1.1%, and the Agirc-Arrco top-up is only going up 1% (I think inflation is closer to 2%?) but it does imply that in twenty years time these figures will have been adjusted to be slightly more useful. 
As it is, things are "about 36%" more expensive than they were when I first came to France, and petrol, oh my god, it was something like 80 centimes a litre. It's gone up about 200% or so! Makes me thankful my little lawnmower engine only has two cylinders. I don't spend that much on fuel. 
Frank, 7th December 2021, 07:54
Never really realised how well off we are in NL, pension wise... 
You were in your thirties when you started work in France. How about when you worked in Britain? Surely you must have built up some pension rights there?
Rick, 7th December 2021, 08:26
That's what I'm currently investigating, but I don't know if there's any portability between countries (UK rights counting on France) or if Brexit messed that up. 
 
As for claiming a pension from the UK, without a full working history you get heavily penalised - see the chart of the French estimates. It's literally a 50% difference in just five years.
David Boddie, 7th December 2021, 14:24
https://www.gov.uk/guidance/benefits-and-pensions-for-uk-nationa ls-in-the-eea-or-switzerland 
 
More specifically: 
https://www.gov.uk/guidance/living-in-france#pensio ns
J.G.Harston, 12th December 2021, 12:13
And if you moved to France in your 30s, you're dangerously close to not having the minimum 10 years UK NI contributions to be able to get anything at all. 
 
However, you shouldn't need to have a full working history, they should have it from the record of NI contributions received. When I checked my details online I found they'd remembered more employment I'd done than I remembered. Must've been those six weeks at Watford Electronics that I purged from my memory. ;)
Rick, 12th December 2021, 12:49
Yeah, I rather imagine I might fall under the ten year amount, as some of the work I did was... let's just say one of the employers never bothered to pay PAYE or NI. The tax man was not amused. 
 
I don't have (or remember) my work history, but as you say they ought to have it. 
 
Annoyingly their info line is open from 8.30pm to 3.30pm, so I guess I'll need to call from work when on break. 
Oh, crap, no I can't, that'll be an international rate call from my mobile (free on landline). 
 
Okay, I'll have to try during winter holiday and hope somebody is around on, say, the 28th...

Add a comment (v0.10b) [help?] . . . try the comment feed!
Your name
Your email (optional)
Validation Are you real? Please type 68581 backwards.
Your comment
French flagSpanish flagJapanese flag
Calendar
«   December 2021   »
MonTueWedThuFriSatSun
  
17
  

(Felicity? Marte? Find out!)

Last 5 entries

List all b.log entries

Return to the site index

Geekery

Search

Search Rick's b.log!

PS: Don't try to be clever.
It's a simple substring match.

Etc...

Thank you:
  • Fred
  • Bernard
  • Michael
  • David

Last read at 04:44 on 2022/07/05.

QR code


Valid HTML 4.01 Transitional
Valid CSS
Valid RSS 2.0

 

© 2021 Rick Murray
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.

 

Have you noticed the watermarks on pictures?
Next entry - 2021/12/07
Return to top of page