Blog Image

Schwartz Engine

About This

I develop Apps and Games. I play board games and I am an experienced GM in Warhammer Fantasy Role Play (1st and 2nd Ed). I am also painting and sculpting miniatures.
Yes that's right I am a freak - No mistake there, I even exercise Ju-Jitsu three times a week too. I am using this media to track my work and organize it a little.

Cheating Leoric, The Undead King

Apps an' Mobiles Posted on Sep 23, 2019 18:01

What can I say! I am a sucker for Retro Games. I have just been playing Diablo I via Windows XP running in Virtual Box, and I found a little cheat action you could some extra gold and experience from. I have reached King Leoric’s Tomb, and by Luring the King forward to the Closed Gates, I can get him to raise more Undead Minions by pacing back and forth in front of the Gates.

This is a great little trick, that allows me to:

  • Get more experience points by killing the raised minions
  • Get more Gold and Items (that more often than normal are magic) when the minions drop some thing as the are killed
  • Have fun ‘cheating’ the King

Great hilarious stuff and probably the next step towards being an Über Geek πŸ˜‰

And you can get a lot of minions raised by teasing the King:



Burning the Midnight Oil

Apps an' Mobiles Posted on Sep 03, 2019 09:51

Be careful when starting to code in the evening, when you get in deep you forget the time. I had an intention of just wrapping up a few loose ends in my attempt to port my take on the 1979 Asteroids arcade game from Type Script to Rust. I just wanted to control a space ship and see some asteroids in the game view, no collision detection and no nothing.

But I ended op implementing all the default collision detection I needed, the destruction of the asteroids when they where hit by space ship bullets, the mass based collision handling of asteroids, the destructive asteroid to space ship collision on screen and finally the animation of space ship and asteroid obliteration. I went to bed around 2 am. My code still panicked when I destroyed to many of the smallest asteroids.

Next morning I found the bug I has made that classic mistake of looping a collection and removing elements from it inside the loop. It just goes to show that if you code when you are tired you start making mistakes, so think of that when you believe you can save the day by putting in extra hours πŸ™‚

As an aside! I now have a functional Rust based Asteroids game with HiScore and all! πŸ˜‰



Now I have a custom font too!

Apps an' Mobiles Posted on Aug 27, 2019 23:37

Yep, that right!

I have ported the font i made for my typescript Asteriods Clone to Rust. I have also moved all the essential files for making vector games and the font into a library or as the Rusteans call it a crate. This has made the foot print of the triangle collision demo much smaller and easier to prepare for a good template example, if you want a gtk based game loop using Rust.


Also I put both the crate and the triangle demo in git, so that I have control over the changes. And I have added some test code, which is relatively easy in Rust where the test framework comes out of the box, much more seamless than in so many other languages. After this I can recommend trying out the language. I could also not help my self and added functionality for increasing or reducing the number of triangles on screen using the ‘+’ and ‘-‘ keys on the keyboard – Great fun πŸ™‚



Recreational Weekend Coding

Apps an' Mobiles Posted on Aug 19, 2019 08:40

Yep That’s Right!

I have read about a new coding language called Rust. I have used a lot of the weekend porting my triangle collision demo to this language. Kind of hard to learn a new language for an old fart like me but I succeeded in porting a decent solution using the gtk library for Rust to display the triangles. I is a language that forces you to code to avoid race conditions in your code, the compiler analysis your work and punished with errors if you have made some code that has potential race conditions embedded into it. Tough to work with and understand to from scratch, but a great help once you get the hang of it.


And the compiler is also very helpful, once you get into trouble. It will deliver help texts along the lines of consider adding this or doing that which often hits the mark or gives you a good idea of what you need to do leading you in a constructive direction. I do not know if this system language as they call it will be as popular as to be used all over the industry, but I’m in on this! Highly recommended and unit testing is also relatively easy to start using to thumbs up!

And it was also great relaxation therapy coding along, porting one of my old projects changing and refactoring it to fit the mindset of Rust and improving it at the same time, highly recommended I say. πŸ™‚



I’m an old fart :-)

Life Posted on Jul 15, 2019 13:46

Yep, that’s right!

I have had some problems with my back the last couple of years and overstretched it during Ju Jitsu practice a couple of months ago. It made me wonder if I should stop practicing Martial Arts entirely.

But luckily one of the guys from the Ju Jitsu Club made me change my mind to change to the Tachi Ryu School of Ju Jitsu where you not throw people but fight standing using kicks, fists, pain points, strangulations and locks. My problem is that I can handle being thrown and also do some of the throws, but I have reached a level where the throws in that higher category are to taxing on my back. So luckily the club has a standing version of self defence I can attend instead.

In that connection I have gotten som training videos and by coincidence started drawing some of the poses the other night, It has been a while since I last did sketching but it was really fun. I find it highly relaxing to sketch stuff even though I have to figth a little drawing hands and feet and getting the proportions right, I guess more practice will make improve that. Highly recommended, it’s an old habit of mine which I intend to do more of in the future πŸ™‚



Yesss! Now my Android Phone Lives Yet Some Years Again…

Apps an' Mobiles Posted on Mar 08, 2019 16:36

Yep that’s right!

I just added some more life to my OnePlus One Android device.

As of late I have noticed that my phone’s battery performance have dropped significantly. So what to do? I looked for a OnePlus 6 on Ebay and you can easily get one for some $550 since it is last years top model in this range.

But then I tried to see if it was feasible to buy a new battery and replace it myself, low and behold the guys at IFIXIT have a nice guide on how to do this, so I ordered a battery at around $60, included in this package was a kit to do the replacement with 9 free tools as an extra.


I received the package and one afternoon I did the moves to replace the battery. The guide from IFIXIT made it for me. It was easy enough to get the back panel of the phone with the included plastic tool and then loosen the screws.


Then it started to get a little difficult. The battery is glued on the back side so you have apply some controlled force as you loosen it. But of it went and I inserted the new battery, mounted the screws back in and put on the back panel. I turned on the phone to check out the battery status, the phone booted but into a recovery menu, and I had some anxious moments because the #$!??! phone kept returning to this menu. Luckily I noticed that the back panel not was put back on all the way and that this held the volume button down, and surely enough as I clicked the panel in place the phone booted as normal.

I have given my phone some more years spending $60 and some sweat and saved some $500 in the process. I still baffles me in this hysterical climate debate and save the earth alarmist age, that you are unable to buy a new battery and replace it without having to take your phone apart in a difficult way. I am lucky that this phone only requires loosening of the back panel and some screws, other phones you need to heat up to disassemble with a higher risk of ruining your device. Some years ago it was easy take of the back panel and slide the battery out and put in the new battery. A waste of resources, that this causes a lot of people to buy a new phone after 2-3 years, and not very friendly towards the environment, but we don’t talk about that do we?

BTW: To read about the unscientific climate debate I recommend reading Climate of Extremes: Global Warming Science They Don’t Want You to Know by Patrick J. Michaels and Robert Balling Jr. A book on how Climatologist was told to shut up about the truth about the climate because it not fits with the alarmist narrative πŸ™‚



Updating how hard can it get…

Life Posted on Oct 17, 2018 22:27

Yep that’s right I just updated from Ubuntu 16.04 LTS to 18.04 LTS. A dialog has been popping up asking me to update for a while, I have chosen to ‘Ask me later‘ for a while too, since I felt the risk of loosing my setup was to high. But the other day I gave it a go since I have backup of everything including my text recipe for installing the most used development tools and utilities I need…


What can I say everything works as it did before, even Wine that gave me troubles when I tried to install it on a previous test installation of 18.04 LTS I had made on another machine. So What’s not to like. And the process was relatively fast also, yes I am still not looking back to use Windows again this is a keeper!

as an aside; I had some short moments of almost anxiety when the tilde character ‘~’ showed up as ‘-‘ in the terminal window when I checked if Git still was running as expected. It turned out that thew font I had chosen used this to display the tilde character and that is still worked. I have now changed the font to something that displays the character properly. πŸ˜‰



Creating a Central GIT Repo from Scratch

Apps an' Mobiles Posted on Oct 03, 2018 22:06

Achtung-Achtung! Nerdy GIT article yet again – You have been warned

Alas I discovered that I had forgot to put my TypeScript Code under wraps in a repository, so away I went to make a new repo, so I after some attempts I made a new repo using this command:

git –bare init –shared TypeScriptCode.git

This created a ready bare repository I intended to use as my central repository.

Next step was to create a place where I could work with my code. So:

cd ~/Work
git clone file:///home/carsten/GitOrigins/TypeScriptCode
cd TypeScriptCode/

Then I copied the code from where I had the original directories from my typescript work on amongst other things the Asteroids Clone, and after that started to add stuff:

echo ‘*/built/*’ > .gitignore
git add .gitignore
git add AsteroidsGame/*.js
git add AsteroidsGame/*.ts
git add AsteroidsGame/*.html
git add AsteroidsGame/*.json
git add AsteroidsGame/resources/
git add AsteroidsGame/sound
git add CommonLib/*.ts
git commit -m “Initial Checkin”
git push

And then I was started, I added the rest and after some testing, now I have a central repository for my typescript code…



Next »