Search Results (9 posts found):
After a few months of not looking at it, I've recently been working on making a few old-school improvements to Barkout, namely a continue code-style save game mechanism, and a new power up in the form of a multi-ball bonus, common in most other Arkanoid clones.
Above, the multi-ball powerup in action.
Below, using the Continue screen to enter a code.
The purpose of Barkout all along has simply been to get some practice in C programming. Initially, it was so I could help a family member who had started a C programming course at university, but it then evolved into doing it just because I enjoyed it. C is a great language to program in. It's also just a nostalgia trip for me; trying to program the sorts of games that I played on my first computer in the 80s: an Amstrad CPC6128.
Anyway, the fruit of my effort is that Barkout version 1.2.0 has now been released and can be found by following the "Free Games!" icon in the top menu.
This week I released a new game: Barkout!
It's a very vaguely dog-themed Arkanoid / Breakout clone coded in C making use of SDL for graphics, sound, and input.
If you've played Arkanoid, you know what to expect: balls, bricks, bonuses and baddies.
Why make a 2D game in 2024? Well, I like to make the sorts of games I used to play as a child in the 80s and 90s, and Arkanoid was one of my favourites, and one of the few I actually owned a genuine copy of for my Amstrad CPC6128.
Barkout is available in source code form, as well as a Windows 64 bit installer, from the game homepage which can be found by following the "Free Games!" link in the top menu or right
here
Almost four years after its debut on the app store, Help Hannah's Horse has returned.
It was removed for repeatedly failing the Google ads policy, which was ludicrous as the app rating and ad content ratings are both determined by Google themselves.
Anyway, if anyone is interested, Help Hannah's Horse is now completely ad-free and can be found
HereI recently needed to implement RSA cryptography in Delphi, sticking to a few requirements of my own choosing:
1. The library used should be free
2. The library license should be permissive enough that I can use the library in a commercial application
3. The library should have as few extra files to include as possible
I looked initially at LockBox, but it came with a multitude of files to either copy to my source folder or include in my library path. I don't want other developers in my team to have to add yet more third party libraries, so I gave this a miss. Additionally, the documentation wasn't great and finding example online was quite tricky.
I then tried PGPCrypt, but could only find a version of that for Lazarus, the free Delphi compiler.
Next was the TMS Cryptography pack, but this isn't free, so again a non-starter.
Then I thought about OpenSSL. We already use OpenSSL as a DLL for a different, but related, purpose so the file is already present in our source and program folder. What we don't have are function headers as we're calling the DLL functions by importing them directly (we only use three at present), but RSA is more complicated and uses a particular structure that would need replicating in Delphi. I thought this might mean OpenSSL was also a non-starter, but after much searching online I came across the Delphi-OpenSSL project at https://github.com/UniGe/delphiopenssl/ which consists really of only three .pas files, only one of which is necessary for what I'm trying to implement: RSA encryption and decryption. For this purpose I need use only the LibEAY32.pas file coupled with the LibEAY32.dll file. We're using version 1.0.2 of this, and the Delphi-OpenSSL project is compatible with that. Great!
I needed to make a few minor changes, as despite the programmers' best efforts it seemed confused about the difference between Char and AnsiChar in Delphi 2009, but the changes were minimal and consisted, almost entirely, of me replacing references to PChar or PCharacter with PAnsiChar.
The next challenge was to see if I could use an existing key to encrypt a file.
I added my modulus, public exponent and private exponent (not needed for encryption) as Base64 encoded string constants and used:
_rsa = RSA_New();
to create a new RSA structure to populate with the key information. This actually returns a pointer to an RSA object, so it needs both dereferencing and casting when used. The properties we're interested in are the modulus, n; the public exponent, e; and the private exponent, d (when decrypting, later).
These properties take the form of BigNum objects as they can be sometimes thousands of bits long. The BigNums need to be created before being used:
RSA(_rsa^).n := BN_New();
RSA(_rsa^).e := BN_New();
The Base64 values were then decoded and altered, one byte at a time, to hex using IntToHex (which returns a string) and then BN_HexToBN was used to set the RSA record's properties accordingly:
BN_HexToBN(RSA(_rsa^).n, ansistring(public_modulus));
BN_HexToBN(RSA(_rsa^).e, ansistring(public_exponent));
The input string can then be encrypted by calling:
enc_in := SysUtils.TEncoding.ASCII.GetBytes(string(input_text));
to get the string character values as a byte array, followed by:
RSA_Public_Encrypt(length(enc_in),PAnsiChar(enc_in), PAnsiChar(@textout),_rsa,RSA_PKCS1_PADDING);
to do the actual encryption. The output cypher text is held in textout. This will look like garbage but can be converted to a Base64 string for convenient storage.
And that's it.
Two caveats:
I had to add an extra property to the RSA record to match the version of OpenSSL we're using. This was:
engine: pointer;
below the meth property.
And I had to initialise the SSL library by calling:
SSLEay_version(_SSLEAY_VERSION);
before making any calls to encryption or decryption routines. There's probably a better way to do this, but this did the trick.
I put this information here in the hope that it helps someone else who struggled as much as I did to implement this!
As one would expect, YouTube has myriad resources for the Welsh learner, ranging from brief clickbait like "An American tries to speak Welsh" to full episodes of educational programmes and everything in between.
The first port of call, really before going any further, is to watch the Welsh Plus series which go into great detail about how to pronounce the letters of the Welsh alphabet, both individually and in common combinations. They also touch on the mutations. Welsh Plus's playlist can be found
here.
When I started learning Welsh, and before I'd discovered the Say Something in Welsh website, I discovered a series of videos called "Learn Welsh with Will" in which Will Huw, an Englishman living in Wales, disseminates his own Welsh knowledge as he goes about learning it. I liked Will's videos as he comes across as non-judgemental and very amiable. You can see Will's playlists, which include more than just Learn Welsh With Will,
here.
Another series of videos I happened upon are aimed at adult learners from the 1990s, Now You're Talking (conveniently mis-spelled as "Now Your Talking" by whomever uploaded them!). These are presented by the likeable Elin Rhys in a variety of very early 90s outfits! There are 36 full half-hour episodes covering a variety of topics and gradually building vocabulary. I enjoy these videos as they present a chance to hear simple conversations in Welsh and learn everyday vocabulary. My only criticisms are that the programmes are now quite dates, the language is in some places a little too old-fashioned, and the pace of the lessons is a little slow for my liking. There's also not a great focus on grammar, so you'll need other resources to accompany these. You can find all 36 videos
here.
Much more recent, are Margaret Hall's wonderful videos. Margaret is a Welsh learner and as part of her learning process she's created a series of videos in which she explores various places in Wales. Margaret speaks very clearly and uses a great vocabulary for the upper-beginner or intermediate Welsh learner. I find I can understand a lot of what she says, but not everything. That's due to limitations in my Welsh, though, not any problems with her speaking. Margaret's channel is
here.
Finally, the Easy Languages series have several videos in Welsh. These are largely conversations with Welsh speakers in towns and establishments around Wales, conducted entirely in Welsh. The videos are subtitled in both English and Welsh, which is both a blessing and a curse, as you can find yourself reading the English subtitles rather than understanding the spoken Welsh. The ease of understanding the spoken Welsh depends largely on the speaker. Some interviewees are fluent speakers, some only beginners, but the most encouraging thing I took from these videos is that, actually, Welsh is very fluid, Welsh speakers are very forgiving of mistakes and, in reality, things like mutations are not nearly as stuck-to as online guides may lead you to believe. You can find those videos
here.
There are plenty more besides, but these are the video series that I've found most useful and most enjoyable while learning Welsh. Feel free to comment if you feel I've missed anything important!
Da bo am y tro!
(This has nothing to do with Welsh)
About
Around 12 years ago I wrote and released a small PC game called "Help Hannah's Horse". It was essentially a variation on Pacman - collect the coins scattered about the maze while avoiding the ghosts and gathering the moving carrots and the powerups that appear from time to time. A few people played it and it got included in the Debian Linux repositories.
Recently I got thinking about that game again and thought it would be nice to give it a bit more polish and change the music. The music particularly has always niggled me; not because it's bad (it's great!) but because I found it online and just used it. I never credited the composer and never checked if it was free for non-commercial use. I have no idea where I found it, so unfortunately I can't correct this now. I don't even know the name of the piece as I renamed the file to just "bgm1.ogg". I needed to either find royalty-free music that fit the mood of the game, or write a piece myself. I took the latter approach.
Anyway, after a couple of weeks of tidying code, fixing bugs, composing music and redrawing some graphics, I have released version 1.2 of the game!
Screenshot
Here's Hannah merrily running around level 1 collecting the gold coins and moving carrots and avoiding the ghosts. The green potion makes Hannah invulnerable for a short time if she collects it.
Download
It's available on my Sourceforge page (
http://hannah.sourceforge.net) for Windows and in source code form for other platforms, if you're so inclined. There's a Makefile for Linux included.

If you're spending more time at home at the moment than perhaps you'd like, one of the ways to avoid going mad and to use the time productively is to learn a skill. Learn to paint, learn photography, learn an instrument, or... learn a language!
With so many resources for so many languages available online for free, now is a great time to start learning whatever language takes your fancy.
Obviously I would suggest Welsh, but learning any language is fun and often helps improve your understanding and appreciation of your own, native language.
So... if you're bored being at home and need something to do, that's my suggestion.
Regular visitors (just me then) will have noticed a change to the design of RetroJunkies.co.uk.
The right-hand panel containing the recent posts, search, blurb and links has been moved to the left-hand side, and the main content is now to the right.
I've also changed the title font to Hand Drawn Objects, a free web font I found online, and the main font to the brilliantly named "Aaargh". It just makes the whole place look a little more polished.
To that end, I've also taken the opportunity to learn a bit about responsive web design. That is, making pages fit the device on which they're being viewed. In this case, I've changed the site so that when viewed on a small screen (like a mobile phone) the left panel is reduced and, as with the main panel, appears the whole width of the screen.
I've also improved my own logging-in facility for when I make posts. It turns out I'd been forgetting to actually validate the username entered at login. It's a wonder I haven't been hacked yet.
There's method to my madness. I've been attending university open days for my partner's son, and I've realised that some of my skills are absent or falling by the wayside a little. Among them my web design (css, javascript) and PHP abilities, so I'm using this site as practice for those skills.
Any comments on the look are gratefully received.
Five months or so ago, I embarked on a language learning adventure. I decided to learn Welsh. I'm not Welsh, I don't live in Wales, and I'm not planning on moving to Wales any time soon. Not that Wales isn't a lovely place, but it's not currently part of my plans.
It started as a bit of a joke. My partner's daughter, Lulu, started at Cardiff University last autumn and has the option of taking free Welsh lessons as part of her course. She scoffed at the idea, "Everyone speaks English! Why would I need to learn Welsh?". I explained that it might not be necessary, but why not take advantage of a free route to learning another language, but to no avail.
I can't say I blame her; I'd always been dismissive of the minority languages of the United Kingdom: Welsh, Gaelic, Cornish. They're dying out, aren't they?
Well, yes and no. Cornish is down to just a few scores of speakers and Gaelic has only around 50,000. But Welsh is a bit different. Welsh is still used. And it's still used by young people, for some of whom it's both a native and a first language. In fact, following a decline in the first half of the 20th century, Welsh is actually thriving somewhat, with the aim set by the Welsh Assembly to get one million speakers by 2050.
So back to Lulu. Every time we spoke following her enrollment at university I would ask her "Learning Welsh yet?" and every time she'd say "no", getting increasingly fed up with me asking, until one day she snapped, "If you love Welsh so much, why don't you bloody learn it?!". I saw that as a challenge and tentatively started looking for resources online.
My first port of call was Babbel, which I'd used in an aborted attempt to learn Spanish before, but alas they offer no Welsh course. I then found some excellent YouTube videos from WelshPlus, but they focussed entirely on familiarisation with the Welsh alphabet and pronunciation. Then someone suggested DuoLingo. DuoLingo courses are run by volunteers, who use the DuoLingo platform tools to create content to teach others. And DuoLingo has a Welsh course. And it's free. I signed up and dived into Cymraeg!
So, I'm now a Welsh learner, or Dysgwr Cymraeg, and I intend to chart my Welsh odyssey here.