Showing posts with label Atari ST. Show all posts
Showing posts with label Atari ST. Show all posts

Wednesday, 10 December 2014

Programming - Elite Dangerous Tools in C++

Update: You can now support this project at Patreon!

I'm back at work, and very busy, we're still waiting on the house sale... But I've got my man lab, roughly, back together... In fact I've got a little improvement in things as I'm back to a single room with shelves all around me so I can turn from my work, pick a DVD and play it whilst working!

This has meant I've re-watched the entire Black Adder series, I'm in the middle of re-watching the Lord of the Rings (yes the special extended edition)...

But, what am I working on?... Well, I'm still playing WarThunder, but I'm also playing Elite Dangerous, and I've some history with Elite, specifically Frontier.  Where I ran "The Frontier Club" later the "Frontier Users Group"... More about which later...

But as part of the club I created a series of tools, in Pascal, on which you could record your kills and document the systems visited, this was really clunky basically you noted things down on paper then when you'd finished playing the game you rebooted your Atari ST to run the tools and insert your new found knowledge, building something which I later would call a data-sheet... A database come spreadsheet hybrid... But which you could print out from the computer, making everything look dead neat and tidy.

I used to have reels of system information and lists of kills counted on the wall, and each weekend after playing Frontier, I'd laboriously enter new information, run a tally and print out my new score sheet and pin it on the wall... I don't know if any of the club members did this, but I remember getting some feedback from users asking for the source code... Though what seemed to amaze most club members was my using "Timeworks" desktop publisher on my ST and from my Citizen 120D+ 9 pin printer producing real looking news paper style news letters... I think I actually got more requests as to how I did that, and proof with photographs requested, than I did requests for save games!

Anyway, I remember that, let me know if any readers were club members!  And I remember the frustration of noting stuff down and then manually updating the system... This was a limitation of the Atari ST, which apart from limited TSR programs you could only run one application at a time, there was no process switching at all.

Of course on a current PC with Elite Dangerous running we can process switch, we run tens, dozens, even perhaps hundreds of processes at the same time as you're playing the game on your machine.

And we could just hook into the memory of Elite Dangerous from another process and scrap out any information we wanted, however, Frontier Development have kindly asked that tools not do this, and that they not wiretap the network connection and capture information from it... Because doing either of these techniques one could, and some tools did, scrap out the market data to optimise peoples play experience; just like us old veterans did with the original titles "back in the day".

So, if we can't scrap the memory or intercept the transmissions, and of course paper and pen are too labourious, what can we do?  Well, I started out with Open Office, a spreadsheet open and created a tab for each system I visited I noted down for each station the basic goods available and I have dozens of tabs, hundreds of trade goods, multiple resource extraction sites listed and even combat sites listed... And it's totally inaccessible, it's very hard to update, slowly goes out of date as the markets change in game, and it take almost as much time to generate this information by hand as spend playing the actual game.

It does give me a great advantage, and starting a new game I soon jumped from 1000 credits to three new ships and a healthy 500,000 credit bank balance... Is this useful... Most certainly... Is it worth the effort?... No.

I'm a busy married man, I work all day, I try to enjoy the limited game time I get and updating a massive amount of spreadsheets seems a bit more like hard work than entertainment... If you think that spreadsheets might be entertaining, you have my sincere condolences.

Locked out of accessing the client or it's network traffic is there some way in which we could scrap data out of the game then?  Well, we humans do it all the time, we simply read the screen... So I set about writing a first tool, this was a very simple took which hooked into the windows keyboard controller at the lowest level and if I pressed a key (even in a fullscreen client) the tool took a screenshot and stored it...

I could therefore capture the market data as I landed at each station.  But I again had to manually enter the station and system name... Adding these images to a series of tabs I had a quick way to switch between images of market data... But it had some problems... One problem (and a persisting problem) is that on my screen at 1680x1440 I could only see part of the market listing at a time, I had to scroll down and take two images to see the whole market, meaning I needed to write another toll to stitch the two images together to get a complete listing... This image stitching became the focus of another of my forays into Image Processing.

Next I wanted to uniformly present the text, so I used previous code I'd created (in C#) ported it to C++ and so was able to drop out the colours... In grey scale the markets looked nicer.

This then lead to a mini-eureka moment... With this complete market list, in black and white, could we apply the Sobel operation I've previously looked at and so give ma a crisp edge to the text?

Yes, I could... And did... So now, could I find an OCR tool to read this text for me?

And this is where I wanted to start to talk about the development, the image processing to this point has been plenty of code to get to grips with, both the windows code to gather the raw image, then stitch and prepare the greyscale copy and apply the sobel mask is a big piece of code and making it pretty code was also a challenge as you're always trying to get things done rather than make code others, or even yourself, can come back to later.

But OCR... Making code to read the text... That's a huge new challenge for me, something I've touched on before, but never put my teeth into.

You can buy off the shelf OCR solutions, but I don't, and I'm pretty sure not many of my readers have the $6000 odd dollars they're asking for.  We could use the Microsoft Office OCR plug-ins... But, this locks us to Microsoft, locks us to using Office and paying a license fee... I don't own office and don't want to make a tool, which others might use, that is subject to such a fee.

What options for OCR are there for me?.. Well I could look up and implement some Neural Network stuff... but I've never really understood Neural Networks, those that know about them tend to spout al-sorts of mathematics and never present code, where code is presented it either doesn't work or is uncompilable.

What have the open source community got?... Well there is a series of tools around, one called Tesseract caught my eye, but it was wholly unwieldy, it didn't want to compile on windows and it relied on several dozen other libraries each of which had to be pre-built or would not build on windows.

Hows about simpler OCR?... Pattern matching?... Yes, these are options as well...

This series of developments will form the focus of my next few programming posts, so stick around.

Monday, 11 August 2014

Gaming Update - Atari ST - Heroes and Generals

Its been a long weekend, and a busy weekend, first things first, the main man lab now has a new floor laid - the last one I'm doing in the whole house - someone else can lay a new stair and landing carpet, I'm done!

I've also put up two new wardrobes from Ikea, sorted the garage out and also moved the guineapig into a new hutch.  These last two items were related to the rat issue, no sign of any rats I clearly scared that sucker off... But there were other things living in there... The first things I found were frogs, I don't mind frogs and I gave them a lift out in my hands and set them loose in the lilly pands at the bottom of the garden... They looked well happy... The wife however was horrified I'd pick up a frog and ran for it... Frogs are silky smooth very nice to hold... Not slimey and not cold - least not when the atmosphere is not cold... But she'd have none of it.

Anyway, with them moved we took up the old run the rat had got into, and I hung it on the wall as a kind of giant basket for stuff and filled it with a bunch of things, I stacked and piled things and since the last floor had been laid I now knew I could rid myself of the excess packs of Laminate flooring, so they went back to the shop... I'm yet to get a refund, but they went back...  So lots more space in the already spacious garage... Yay.

I also got some time with an Atari ST... yes, I got one down and I played a few games, notably Verminator... Blood Money... and Escape from the Planet of the Robot Monsters... Lovely.

The wife also picked out a film from pay-per-view... Devil's Due... Utter shit, avoid it at all costs.  I'm staggered such a bad, low tech, inconsequential film was made for 7 million bucks, and made over 38 million at the box office... The film was so bad I was more bothered what happened to their pet labrador then the people, and the film didn't even let you know what happened to the dog.  Terrible, utterly stupid, film with so many dead ends, bad camera work passed off as POV filming, just rubbish.  So avoid that sucker.

Finally, I did get a little time Saturday night playing Heroes and Generals, I was pleasently surprised to see they had a free premium weekend, so I got to play a few missions with premium bonus... And you know what... It was not that helpful... I was making between 5 and 8k  credits per game... and with premium bonus I made between 6 and 9... Nothing to write home about.

But I did have a massive "ahaha I told you so" moment in there... I've been playing with the G43, and complaining about it... and the god damn huge prices for upgrading it for so little return... Anyway, in a mission I pretty much spend my time trying to scround a bolt action rifle... And I found one and had a 14/2 K:D mission... Totally validating my thoughts on the G43, where I can't get anywhere near that without sitting on my ass camping rather than actively playing.

Later on of course I was sent back to a G43... And instantly annoyed as shit at coming face to face with an opponent, putting 4 shells into him... 4 hits... in the torso... and he just turned around and shot me in the face... IN THE FACE PEOPLE... It so unbalanced!

And this ends my rant for the week... Heroes and Generals... I like it, it could be so much better, it needs balancing... Guys over there, go play Day of Defeat for some weapon balance ideas... Oh and weapon sounds, cus the ones currently in game are crap.

Tuesday, 29 July 2014

Atari on XBOX - ET Game Documentary

I'm an Atari guy, there I said it... This doesn't mean I've not been around the block, my first computer was a Commodore, but my first LOVE was an Atari.

An Atari 520 ST FM to be precise, and here I am 36 years old, married, with two houses, two cars and a busy life, but I still love that Atari.

So, seeing news of an Atari centric documentary I took a look:


Good stuff, except, its on XBOX?... I have no interest in XBOX, and I had read recently how Microsoft was winding down original programming on XBOX... GG Microsoft, GG...


Original article:

Monday, 28 July 2014

Imperial Conquest - Atari ST - My Version Pt 1

Some of you out there will know of my background as a war-gamer, yes I started out playing online games - and games with other people - as grand table top strategy games...

I've played many, from way back on the Atari ST with my favourite, and first, strategy games (like Carrier Command and then Imperial Conquest).

I particularly likes Imperial Conquest, it was written in STOS (a dialect of basic) and featured on the cover disk of STFormat.  And I wrote off with £5 of my pocket money to buy a real copy - which came back as a diskette - no box, it was a proper indy game!

The idea of Imperial Conquest was you had a world view, well a Europe high view, which showed the cities and armies and fleets as just dots... You could then click and see a smaller snap shot of the land... If you got it clicked on the wrong spot, you just had to go back up a level and go back down; there was no scrolling...

You held cities, and from them each turn you got income, a turn being a month, and then you paid from your income for armies/units you controlled, and you moved these army counters around to take other cities.

Very basic, but very addictive...

So, my next personal project is going to be an Imperial Conquest clone, this is to a) get me back into coding and playing war games, and b) to teach me some more platform portable 2D OpenGl Code.


 The first thing I did was trace an outline of Europe, using Red for Land, Blue for sea and orange for rivers.  These will be my terrain types for now... And I wrote a C# program to parse this image into a raw map, the map can be any size, I've tried everything from 640x480 to 4096x3096.

This is the top level, as per the original game, and you click on it and it'll zoom the view in...


This is where I've been adding configuration, I'm not sure what size to make this tactical level view, so it renders the terrain square as just a solid colour type for the moment... I've already plans for texturing this and adding coast lines, but I'm working on pure mechanics for now... Too many games rush to add visuals before making it work solidly....

So, I added an XML configuration:


Which lets me set the number of squares to render on this tactical view, and how big these squares are... I then played about





Before settling on quite a large view, to match what was given in the original game:


Now, this level of XML control is also extended into most all parts of the system, so this is more a war game visual representer engine than a game at present... But it works how I want it to.

The next Item I needed were some counters I could throw into the screen... So I went with an icon for Infantry, one for cavalry, and an engineer to help bridge those rivers:


I'm going to be keeping this very simple, and perhaps even may publish the code as a tutorial into using SDL and OpenGL.  Its also aiming to be cross platform, so you will see this on Linux soon.

Friday, 6 December 2013

STress

My first computer was a Commodore 16, but my second computer, and the first one I really programmed on (in Pascal) was my Atari ST, and I love the story of how the ST came together... I wish there were a book, or a documentary about it, as there are for the Amiga 1000.

But anyway, one source of the history of the ST is Dad Hacker...

On the first part of his ST History posts he makes this statement:

Stress: A number of us learned how to juggle. One of the DRI people had a nervous tick in the form of a "quacking" sound, and this spread through the group (a year later some of us were still doing it a little). The word "fine" became a pejorative: "Don’t worry, everything will work out just fine." How are you feeling? Fine, okay?

And it had me thinking, I worked in a particularly stressful place during my degree, and I developed a nervous Coooing...

Like a pigeon, I'm sure if Paul, Leon or Dave are reading this they'll remember me cooing.  They took the piss, but I really could not help it at times, sometimes I was totally oblivious that I was doing it.

I think I developed it out of a kind of mental juggling act I was carrying out thinking about the servers being looked after, stressing if the phone would ring to make me have to drop whatever I was doing and do an IT support run, or just the incessant clatter of the mechanical machines knitting on the factory floor, from which we were separated only by a 1.5 inch plaster board wall.

Whatever it was, I didn't quack, I cooed... And really well, I'm cured now, and can't impersonate a pigeon at all, so where my brain came up not only with that sound, but the ability to do that sound, is beyond me.

Saturday, 17 August 2013

Long and Fraught

It has been a long and frightfully fraught day, tomorrow can only get better... We're off out to sort out a new mortgage for a house we're buying... which will be fun.

But, for entertainment this evening, I've left off with my World of Tanks kicker, and I've played a couple of rounds of war thunder... I'm not sold on the whole plane upgrades thing (yet) but I'm so happy to see the oft remarked about broken economy get a fix.


And as ever even on my terrible 260 GTX graphics card on this machine that game looks gorgeous.

However, its not as gorgeous as the other game I've been playing this week...


No folks, don't adjust your sets, that is the graphics, this is actually the best graphics you'll ever likely see in this particular game, for this is Elite II Frontier - the best game ever - but this is amazingly the Atari ST version, decompiled and then stripped of ST hardware called and then converted to using OpenGL on the PC to render... an amazing piece of programming which I can barely get my head around - despite having downloaded the code and had a look - and also an amazing way to re-enjoy this most classic of games.

Not a lot of people know this, but I was so taken with this game that I tried to start a club around it, long before the internet, and before BBS's were buzzing about this game I send a missive off to the late great ST Format and said I'm here talk to me as the Frontier Club.  My parents went mental about this when my little brother showed them in the magazine.

They thought I would need a license or pay tax on whatever I had, so they made me turn it into a free users group, which promptly flopped.

But for a short time I made my first ever bit of cash from these computers, and that little bit of cash I made was turned into a few news letters, envelopes and stamps to mail people their disks back and forth, I had five regular commentators, and for their £5 each "member" of the original list got a couple of news letters, planned to be quarterly, they got some fan fiction, and the exchange of saved games from other players in the club.

My parents killed it tho, my little brother also, to this day - despite my working as a software engineer - they don't seem to realise how much they held me back when I was at the forefront of something popular and amazing, and making money...

Monday, 24 December 2012

Nerd Porn

http://www.ebay.co.uk/itm/VT-100-Terminal-Emulator-Cartrige-Atari-ST-STE-New-Box-/130823670482?pt=US_Vintage_Computers_Mainframes&hash=item1e75b2cad2

I wish I had this for xmas... But I don[t know why... I think I'd try it and then just leave it on a shelf, but I would have it.