Up to Main Index Up to Journal for May, 2019 JOURNAL FOR MONDAY 13TH MAY, 2019 ______________________________________________________________________________ SUBJECT: Returning to the cottage… DATE: Mon 13 May 17:23:34 BST 2019 Last week when I released the PHP version of ‘The Cottage’ I disappointed a lot of people. At the mention of PHP some people expected a version of ‘The Cottage’ that would run on the web and in a web browser. I knew it would disappoint, and even tried to curb expectations. Seems people still didn’t read the whole entry before trying out the PHP version :( What to do? Dust off the books, a lot of Googling, and some long nights… I spent most of Friday and Saturday writing a third version of ‘The Cottage’. I then spent most of Sunday cleaning up the code, documenting, testing and trying to make it presentable in public. I believe that the third version is the best and most exciting yet. In fact I’m already thinking of enhancing and expanding the initial ‘toy’ into something more. The third version is written in JavaScript. It’s been tested in Chrome, IE11, Edge (both versions), Firefox, Samsung’s browser and even mobile Safari[1]. It has been tested on Linux, Windows 10 Pro, iOS, Android (6,8 and 9) and Chrome OS. It works on the desktop, Chromebooks, tablets and phones. The complete list of testing I have carried out so far is: Linux (Debian) - Google Chrome Windows 10 Pro - Internet Explorer 11 Microsoft Edge Microsoft Edge (Dev — Chromium based) Mozilla Firefox Android¹ - Google Chrome - Samsung web browser (On Samsung devices) Chrome OS² - Google Chrome iOS (iPod touch, 6th gen) - Safari³ ¹For Android testing: Nexus 7 (2013 tablet) - Android 6 (Marshmallow) Moto E - Android 6 (Marshmallow) Nokia 5 - Android 9 (Pie) Samsung Galaxy S7 Edge - Android 8 (Oreo) Samsung Galaxy S8+ and S9 - Android 9 (Pie) ²Acer CB5-132T, tested with physical keyboard and on-screen keyboard. ³There is a known issue with mobile Safari when the on-screen keyboard pops up. However the cottage is still playable. Not to shabby for three days work! :) Why is this version more exciting than the others? Zero installation. You don’t need to install Go or PHP to run the code. Just click a link or open the file in your browser of choice and it just runs. You can right-click, save a link, and have a local copy to tweak and play around with. You already have the development tools right in the browser. With this version of ‘The Cottage’ you can even develop with zero installation. This works on the desktop, Android, ChromeOS and iOS where you can save the file to your downloads, Google Drive, Microsoft OneDrive or Apple iCloud for editing, and then open the file in the browser to test changes. For making changes you can use an editor of your choice, the browser itself — via a browser extension or the browser’s development tools. Google Drive and Microsoft OneDrive have some associated editors that can be used. Not sure if Apple’s iCloud has any editors? The file can be uploaded to any static web hosting service, nothing special required. You can even share your copy with your friends by sharing the file via Google Drive, Microsoft OneDrive or Apple’s iCloud. Especially for children this all comes quite naturally! Us older folks may need to fumble around a bit, but it’s not that difficult… As for the code itself, please go gently — I’ve not written any sizeable JavaScript in a long time. So this has also been a relearning experience for me. The code may not been the greatest, but it’s been tested and works. No frameworks have been used, it’s just plain old JavaScript. I do plan on working on it some more and improving it. Any comments, especially on my JavaScript and how to improve it, would be greatly appreciated: diddymus@wolfmud.org If you have any questions, experience any problems or do something interesting with the code I'd also like to hear about it. Now it’s time to unveil the third, JavaScript, version of ‘The Cottage’: cottage.html Try it out! Just click the link. Everything is in a single file (16kb/5.3kb gzip compressed) and released under a 2-Clause BSD license. If you want your own copy just right-click the link and save. I hope this version of ‘The Cottage’ does not disappoint this time… -- Diddymus [1] Full disclosure, I don’t use Apple products at all. For testing on iOS and Safari I used my daughter’s iPod touch. Thank you! ♥ :) ______________________________________________________________________________ SUBJECT: Feedback already! DATE: Mon 13 May 19:41:10 BST 2019 Wow! Already getting a lot of positive feedback and comments on the JavaScript version of ‘the cottage’ :) Based on this I've made a few tweaks to the source code. Specifically: - Clarified the BSD license used with a SPDX identifier: BSD-2-Clause https://opensource.org/licenses/bsd-license.php - Made the license a separate comment block. - Fixed the description text for the location 'frontdoor'. I’m also working on a new sub-area of the site just for ‘the cottage’ and related material so as to keep it separate from WolfMUD. I'm also looking at adding a separate git repository for ‘the cottage’. These two items will take a little longer to sort out :P I am SO relieved people were not disappointed this time! :) -- Diddymus Up to Main Index Up to Journal for May, 2019