Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Monday, 6 June 2022

Programming Projects, where are they?

 

I think it must be a common situation for any person who creates things that you start a whole lot more projects than you actually complete. I've been messing around with programming projects for a significant fraction of my life and have lost count of the number that have reached a certain amount of progress and just... stop.

Even among the projects that enjoy good progress and reach a point where I want to share them there can be issues in terms of what form to share them in. There can be quite a lot of work involved in uploading and presenting projects online. Often the impulse can be it throw them up on the likes of itch.io and be done with them.

I, uh, should probably have mentioned sometime in the last couple of years that I have an itch.io page with projects on it... https://alexmulkerrin.itch.io/


So many fine projects that have never gotten a dedicated blog post are there.

Having been posting about programming projects online for about a decade now the form of how I've uploaded them to be shared has changed over time:

  •  Initially I would just put the JavaScript inline on the page to be rendered into an html element which was neat but it did run into issues when more than one projects code was on the page at once and there were variable name collisions. 
  • I could alleviate that somewhat by making it so only the intro to a post appeared on the blog homepage and you had to click through to see the running program. The issue then became when I wanted to write bigger projects and the code became too big to have all in one html file.
  • I could split my code into dedicated script files if I had someplace to host them. Initially there was such a hosting functionality built into Google Drive that let you not only host files publicly but also embed JavaScript projects directly in another webpage.
  • Alas this was only provided for a short time, then discontinued leaving mysterious Google error messages on the pages that used it, such as my initial post here about Swarmlord. Looking for an alternative I came across rawgit that let you host projects from a repository on Github. I already had a GitHub account so it was an excuse to be a more dilligent developer and use git as part of my development process.
  • Sadly last time I checked a rawgit link it wasn't working either. At that point itch.io had become a thing so I eventually moved to hosting projects on that including old and recent Ludum Dare entries, another thing I have been neglecting to blog about!
Long story short, from now only any programming projects I share will be hosted on my itch.io page where, hopefully, they will remain accessible and continue to work.

I would also like to get back into the habit of posting on here about projects I am currently working on. Even going so far as to provide links to in development projects not 'officially' visible on itch.io. For example this:


It's a world map generator which lets you zoom in super close just like Google Maps :D
Super secret link here

There's a whole lot of work to do on this but the essential algorithm to allow you to zoom in and out focused on the mouse cursor's position is solid. For now I simply adapted the Civilization terrain generation algorithm and tile types. It's crazy to think that on a properly scaled planet each tile is 500km across :o

Sunday, 5 March 2017

PocketCiv: Prototype



Time to once again resurrect my blog after far too long an absence! :D

Haha, but it hasn't really been that long considering I've been in training for proper software development and hadn't really stopped blogging during that time. As mentioned in my last blogpost as part of the training course we were called upon to do some personal blogging, documenting our time at QA's Academy. Link: QA Trainee Blog

Although half of that blog was personal posts about what we've been up to (spoilers, mine involved Dungeons and Dragons and boardgames :P ) we were also asked to write some technical articles about areas of technology that interested us. A real opportunity for me as I've been posting about things in computing that I find interesting here on this blog for years :D It hardly felt like an obligation at all!

My topic of choice for these technical blog posts was Procedural Generation, something that I have dabbled in several times (check the tag for it!) Seeing as I had previous experience with creating interactive examples of procedural content generation I decided a big feature of my technical blogpost would be such little, interactive web apps :D So many of them!

This was probably a bit of a tall order and I found it damn difficult to keep up with the intended, weekly publishing schedule (alternating from personal to technical). This was on top of our training too so I frequently finished posts off the weekend after the Friday they were due :P I'm quite pleased with the first couple of technical blogposts I did which you can see links for below:
Each of those pages has ~3 interactive web applets on the same page to mess around with, I'm pretty pleased with how they came out in terms of aesthetics and how well they integrate into the text. I can see myself revisiting the concept in the future and making some more article/demo combinations :o

(Third technical blogpost on pseudorandom number generation and procedural textures is buggy and unfinished. the fourth one; potentially on 3D mesh generation, exists only in my head in draft form :S )

It was great fun and I can see myself revisiting that series of technical blogposts in order to polish them up and post them here some day...

Wait wasn't this a blog post about a Prototype?

Yep it is! I just wanted to write an introduction to what I've been up to, maybe it should have been a separate post but the reason I'm posting again on my personal blog is to share my progress on a new Hobby project: PocketCiv!

It's so nice to be making one of these things again, my programming tasks of late have been very practical and focused on learning to use particular software tools. Extremely useful stuff and I feel like a much more competent programmer when it comes to proper serious software applications and serverside programming. Highly useful skills.

I still enjoy making my own brand of browser based toys/games and have some free time at the moment to put towards one. I'm going back to my computer gaming roots, all the way back to the original Civilization from 1991(!). The game has changed so much over the decades since then but I've always had fond memories of that neat, little DOS strategy game. It's graphics were so delightfully minimalist and clean, as it had to be due to the lack of power in PCs at the time.

So, PocketCiv is my attempt to take the basic, initial gameplay of that title and create a browser based app that has the core game loop of an early 4x Strategy game. :) It won't be complex but that's the point! Just a simple, quick experience that has you exploring a procedural world :3

I've created a prototype to stand as something of a Minimal Viable Product, the barest of essentials in simulation, display and controls. Settle on a single island, uncover the fog of war and fight other, computer-controlled factions. Victory is only by conquest at the moment and can be quite the arduous task if the starting continent is large and well populated. Sometimes you'll start on a tiny island alone too, rather extreme opposites!

The prototype can be played through a link on the PocketCiv Github repository I linked above.Read the instructions and give it a play for 10 minutes or so. It shouldn't be too tough to win a war against the AI, taking a whole island might be a challenge :P 
I'm sorry that the graphics are the most basic they can be and the controls are keyboard only. Not to mention the graphical bugs....

I can show you what I'm planning on getting the game to look like though :D A spin on the venerable, classic art style of the original Civ:


With any luck, version 0.1 of PocketCiv will look very much like this mock-up screenshot :)

Sunday, 29 May 2016

Voxel Editor Version 0.3


As mentioned last week I've been working away at the Voxel Editor program. Been adding so many new features that it's high time I shared them here to get feedback from people. As always the program can be found at the bottom of this post :P

Friday, 20 May 2016

Update of Progress on Voxel Editor

Now that I've mostly recovered I have been getting into some proper improvements to the Voxel Editing project, behold!


There have been some pretty big changes in the programs capabilities :D

Friday, 29 April 2016

JavaScript SynthPiano

I have been Experimenting with the Audio Context web API as of late. It lets you create sounds in JavaScript programs using sound wave primitives. This combined with a basic piano keyboard layout means I have made a pretty basic synthesizer.

Sunday, 10 April 2016

Procedural Pokedex

Seeded Pseudorandom Pokedex


I believe I mentioned this project some weeks ago and a recent foray into Cascading Style Sheets seemed like a good time to pretty this project up in order to post it. I have mixed feelings about using CSS to do styling. Sure it is going to work correctly on more browsers and is probably more efficient but I enjoy doing everything with JavaScript; that way I can pretend to be coding a native executable instead of a web app :P

Friday, 26 February 2016

Voxel Editor Version 0.2



I've been working away at improving the Voxel Editor program and have gotten the next prototype into a tidy enough format to post. It has a proper interface now as well as a much nicer program structure!

Only a short explanation today, as before find the embedded program at the bottom of the post :)

Friday, 5 February 2016

Voxel Editor


This week I completed a very neat tool; a browser based voxel editor. This is the first proper programming project post of this year, happily it's a really neat one :)

Click through for an explanation of what the tool does, some example voxel models made with it and finally the running program itself.

Friday, 15 January 2016

Ludum Dare 34 Post Mortem


Early December I posted about the 34th Ludum Dare and my desire to compete in it Here
While I did take part I did not succeed in producing a finished game out of it :/ Probably due to attempting a 3D game having never done one before and exhausting myself before deciding on the gameplay fundamentals.

Since then I have had a good Christmas break and had a poke around at the concepts that I didn't manage to suss out back then. Even though I didn't have a completed game to show for my efforts I don't feel they were in vain. Details below the fold...

Thursday, 19 November 2015

Seeded Map Generation

Seeded Map Generation









Been messing around with various hobby projects. The latest one, a Seeded Map Generator, I'm overjoyed to have implemented. There are a whole wealth of ideas I want to try out with this :D
One sentence summary: I can use this code to produce nice looking random maps of varying levels of detail with each map produced being connected to a fixed seed value, if you know the seed you can recreate the entire map!

A quick explanation of the techniques involved and an interactive demo are below the fold...

Sunday, 25 October 2015

Cellular Automata Sim v0.2

Been too long since I last posted an update here. Progress on the user interface for the Cellular Automata Sim has been fantastic :D Been a whole lot of fun to prototype the layout and then implement it in code. It now does so many neat things I feel a UI should be capable of; zooming, panning, fit to screen. Hell I even got a fullscreen button in there.

Tuesday, 13 October 2015

Javascript Cellular Automata Editor

After spending time learning to save and load text then images I have now moved onto creating save files for more complex objects. This program allows you to create schematics for a kind of Cellular Automata which follows rules similar to logic gates. The rules are a mix of the Von Neumann cellular automata I was experimenting with previously and some of the thoughts I had after playing the excellent Infinifactory.

Sorry that the program is light on instructions, you can select tools from the top menu:

Thursday, 8 October 2015

Prototype Character Generator

Character Generator Been chatting to a friend of mine about procedural content generation in games, got to talking about creating characters in such a manner for Dungeons and Dragons. The idea would be to play the role of the leader of an adventuring guild sending parties of random adventurers into similarly random dungeons :)

I do so enjoy creating procedural programs so I said I'd be happy to help out. We'll probably explore this idea in a pen and paper format but I went and coded a prototype of a browser-based character generator. The results are very simplistic but its oddly compelling to see what the program will produce.

If you come across an amusing combination do let me know!

DnD Character Generator (prototype)


Friday, 11 September 2015

Javascript Image Editor

Javascript Image Editor This is a natural continuation of that code for a text editor running in Javascript. I switched the save, load code to expect images and have now got a proof-of-concept image editor running! Like the last experiment use the buttons to open an image file and then save it. The mouse can be used to crudely paint onto the image :P

Javascript Image Editor

Image :

HTML5 canvas goes here

Save As :

Thursday, 3 September 2015

Ludum Dare 33: Swarmlord!

Its been two weeks since the competition and I didn't post my completed game here. Still need to work on getting things done promptly clearly :/

As for the contest itself it went really well and I was able to submit a team effort this time!

The entry is a real time strategy game where you play as a space monster. Looks like my last post here the embed link still works but the game is displayed at a much nicer size on the Ludum Dare entry page (linked through the banner)


I also documented the whole development process on the website which can be seen by checking my profile on the site: link

Saturday, 8 August 2015

Javascript Text Editor

Many of my coding project have been Javascript based for the simple fact that nothing is better for click and play function and ease of source code sharing. One thing it lacks though is easy file read/write access. This is for the extremely sensible reason of not allowing any arbitrary script edit the contents of your hard-drive when you load a page, that would be chaos!

Files can be saved and loaded by the user though so with significant help from the example script on the blog This Could Be Better I've made a proof-of-concept file loader and editor. This opens up all kinds of exciting prospects for projects which are more than little toys. There are several things I experimented with in Java which would benefit from such functionality if ported to Javascript. :D

Javascript Text Editor
File : Save as :

I could even write code in this browser based editor :3