I am not Looking Back II!

Recently I read on OMG!UBUNTU! that a tech contributor from online magazine Forbes.com had ditched Windows and tried using Ubuntu for two weeks, the guy did try another Linux distribution first but dropped it since the installation ‘couldn’t find a drive to install the OS to.‘. He had the same issues as me with Windows even though he had used it for decades. After the experience he will continue using Ubuntu for his tech writing: ‘ this is absolutely my new daily driver for writing, working, communicating, browsing and media consumption‘. Read the article by Following this link.


As a conclusion on my part, I still do not see that Windows is improving as It is the company OS at the business where I work. In fact it has gotten worse with updates and all. Linux however stays the same and is fast and pleasant to work with, I have never once had a nagging doubt after ditching Windows. The advantages you get by dropping the stagnating OS are many, amongst a lot of other things not mentioned here, you will get a system that:

– Always boots in 30 seconds or less
– Always shuts down in 5 seconds or less
– Not forces you to update, but allows you to select when
– Not degrades in performance over time
– Has a free office suite (Libre Office)
– Not has a slowly corrupting registry
– Runs significantly faster than Windows
– Not has an ugly tile based user Interface, who ever made that brain fart I do not know…

Note that this is not a commercial, I am not getting money from a sponsor to say this, I am simply recommending a good product.

I know Microsoft is trying with a valiant effort to make the company look like an open source advocate, but I am not convinced. And I am not getting money to not recommend them either.. 🙂

Holiday At last, refactoring as therapy…

After a period in and out of the job market I have finally landed a job at a company I hope is more credible/stable than the other jobs I have had in the last year. So now I am on official Vacation at last and gathering strength at home with the family.

So I just sat down to look at my Asteroids Clone and discovered some things that could be improved in the code. To many hard coded values and a slight little problem where the spaceship could be smashed up even before the game started.

Try the new improved Asteroid Clone!

It is satisfying to be able to clean up and make corrections to the code relatively fast event though I have not touched it for a while.

As I say, Good Code is defined by answering this question:

Would you give the guy who wrote this a beer after maintaining it?

Beware of The Mysterious Manor!

Since I am a dedicated board game player I really have to discipline myself. I have participated in the Kick Starter Campaign for Vast the Crystal Caverns, and now they are putting out a new and improved version called The Mysterious Manor.


It’s really tough!

This version is so much better and more grittier than the first version. This is one of those new games with an asymmetric game play, meaning that depending on your role in the game you play in different ways towards different goals to win the game. Beware of starting on the Kick Starter Path, I have participated in to many campaigns causing a storage problem at home and it is expensive too! 🙂

PS! follow up!

I unfortunately fell in but, it is not as expensive as I first thought. Never the less I am starting to sell some of the games that I not am playing. They simply take up to much space…

Not Big Enough I Say!

I did it again, as I was driving home in my car I wondered why the hugest of the asteroids in my clone of the Atari Asteroids Game from 1979 not just pushed the smaller Asteriods out of the way on impact, I had a revelation!

The mass of an Asteriod is not based of a one dimensional diameter length like metric or a two dimensional area like metric for that matter. Mass is mass and it is volume based, so away I went an added a cubicSize member to my asteroid class which is size*size*size, where size is the diameter of the smallest circle surrounding the center of mass of the asteroid. And behold it looks more like the effect i was after, try it out:

https://schwartzengine.com/AsteroidClone/index.html

What a bummer! Using a one dimensional measure for volume, I must have been to eager to see the results of the collision algorithm when I implemented it. A typical trait when you make graphical software. It also goes to show that the human mind works in mysterious ways when it comes to trouble shooting and problem solving 🙂

Software development is still a young craft and not easy 😉

Is This Remnants from Half-Life 2

As I was cleaning up in the garage yesterday I encountered some ‘vintage’ boxes containing beverages in plastic bottles. They where so old that most of them contained colorless fluid, except the colas of course.


When placed on the worn concrete floor of the garage it looked like something out of the apocalyptic HλLF-LIFE series. Besides having fun with old memories of past gaming experiences I did clean up the garage and shaped up the garden with my lovely wife. All in all a great sunny day.

Recommended I say! A day like yesterday brings you new energy makes you wonder, get new takes on stuff you have been doing/ are doing currently 🙂

As an aside I have discovered that Steam runs flawlesly on Ubuntu, so I am in the process of replaying good old HλLF-LIFE again, a great nostalgic trip! 🙂

Reclaiming my Unit Testing!

This evening I had to make a new unit test for one of the classes in my A DUNGEON HORROR DEED editor, for a while Eclipse had spat some kind of IDE NULL pointer exception in my face every time I tried to run a test. I have not done anything about since the classes under test not have changed.

But now it was urgent, so away I went to the web and was lucky to find a couple of good suggestions on a Stack Overflow entry. I used this one that specified what to do in the Eclipse IDE:

– Go to help
– Select: Install New Software
– In the Work with text box type: Juno
– Expand Programming languages in the tree view
– Select: Install Eclipse Java Development Tools
– Install it
– Restart

And it worked in first try:


So now I can make my testing count again!

As an aside I can mention that the Dice class that have methods I have used since 1989 when I made a program for rolling new Characters for Warhammer Fantasy Roleplay have a method for rolling a specific range from (and including) a minimum integer value to a maximum. I have never tried what happens if you give the method a minimum that is larger than the maximum. So of course I made a test where I tried this. I expected the method to switch the two parameters and still deliver a range roll from (and including) the lowest to the highest of the two values.


And of course it crashed, away I went an refactored the method to switch the values if the minimum was largest and now the test succeeds. And then I added some explanatory java doc as well:

Enhancement of the ADHD Level editor

Last night it occurred to me that the editor I have made for A DUNGEON HORROR DEED not is quite up to speed regarding communicating that the map you are editing has changed…

So the gloves went of and I implemented the classic ‘hasChanged‘ flag used to indicate if your document/map has changed by adding an asterisk after the title of the editor window.

I also remembered that I had made a back door to mod the ADHD game. If you make a set of maps where one of them is named Gobbo Town and make a world map file from these called ADHDFakeMaps and copy that to where your save the progress of the game, then you will start in that map when starting a new game. I sat and used the Editor to create a little fake map level to use the back door and realized the the editor is well suited for this work, but the game will act a little strange if you try to load a save game from the original embedded map when you use the back door. So I have to remember that if I am modding. 😉

As an aside I had to make a little extra features regarding saving. The Save… menu item worked as a Save As…, so I have implemented a true Save that saves with out questions. Also an opt to overwrite if an existing file is selected during Save As… was needed to make a proper editor, but I think it is OK now.. 🙂

This is also added as part of the Game manual on schwartzengine.com, download the editor here.

A classic Mistake!

I just implemented a classic elastic collision formula to get a semi realistic collision modeling amongst the asteroids in my take of the 1979 Asteroids game.


This is the formula where the u vectors are the speeds before the collision, the v vectors the speeds after the collision and the m numbers are the masses.

I had implemented this correctly, but just made a tiny little mistake, the distance needed between two objects for them not to touch was calculated a little to small, causing the asteroids to linger almost on top of each other when colliding. After fixing this it looks a little better. Try it out HERE! 🙂