Firefox = slow (?)
September 08, 2021
16 bit inspired paint program inside the browser
HyperPyxel is a pixel paint program right in your (Chromium) browser.
It's simplistic by design. It does not try to mimic or battle with the giants like Photoshop, and so on. It tries to mimic the experience of paint programs of simpler times.

It draws inspiration from the paint programs that were popular on the Commodore Amiga home computer, such as Deluxe Paint, Brilliance, Personal Paint, and others.
But Hyper Pyxel is not a Deluxe Paint or Brilliance clone, but will try to give you a similar experience. It resembles mostly Brilliance in the way that it presents the paint tools GUI, but it shares a lot of similarities with DPaint as well.
It is not based on any engine, framework, or library, all code is pure javascript, as the goal is to learn javascript and browser capabilities, and not learning a third party library. (That I will surely do, but not as part of this project)
HyperPyxel is hosted >>here<<. The code is on github >>here<<.
This is not a commercial product. As paint programs go, today it's probably rather clumsy to use for most people.
I have done some work with it, but I can tolerate the clumsiness, maybe you can't, and that is fine. To me making the program is most of the fun. If I or someone else uses it for something, that is just a bonus. Thanks for reading this and checking this out nevertheless ? And if you have any good ideas to improve, maybe I implement them.
Note: This has only originally been tested on a modern Chrome Browser for windows. Recently I accidentally opened it in Firefox, and it seems to work just fine. Don't try to run in old Internet Explorer though. Also Edge may have severe slowness issues, running this program. (The Undo calculations especially)
Tip: To make it work well, you need to turn on your browser setting “Ask where to save each file before downloading” (or similar). Otherwise all your saved pictures will get default names in your download folder.
The idea to make a paint program, has been with me for a very long time, but I never really succeeded, in the low level languages like C or C++, probably due to me taking a wrong turn in the beginning of the attempt or so.
The largest motifator comes from a long time ago, when I transitioned from the Commodore Amiga to the PC / Windows. I was looking something to replace DeluxePaint, but could not find anything as easy to use, and yet so powerfull. MSPaint was a severe disappointment since it's limitations were so many. I tried Paint Shop Pro, and even if it's very powerfull, it was not at all good, at creating pixel graphics from scratch. So I kept an eye on commodore Amiga emulator in the meantime.
Time went by, and good alternatives came by, like ProMotion, and nowadays you can do very good pixel painting in PhotoShop.
But the idea that “I should be able to create a paint program, how difficult can it be”, stuck with me, as an itch, and one day in 2020, when there Corona Virus had bound me to home, I fiddled with Javascript on Chrome, and noticed I could actually make a decent load and save mechanism for pictures made in a Canvas. The rest is history.
If you use HyperPyxel for the very first time, and are not comfortable with it, it might be (beside my bad UI design), the fact that the way of working very strongly evolves around brushes.
Brushes in HyperPyxel, and indeed DeluxePaint/Brilliance, is not really the same as the brush concept in modern paint programs. In HyperPyxel, you select a part of the screen, and this is then what you paint with your brush. There are a few standard brushes, but not that many. After you selected a brush or part of the screen to be your brush, you can do “many” operations on the brush. For example, you can outline it, you can inline it, you can colorize it, make it more transparent, rotate it, resize it, etc.
Another big feature of HyperPyxel is that the zoom, is realtime. This means, whatever operations you do on your picture, the zoom, will show that operation close up, as it would look like. This is in contrast to for example, paint, which shows you in the zoom view, only a preview of your operation, and you need to do the operation, in order to see what it looks like zoomed.
Just for those who are wondering, what is the complexity of creating a paint program, below I list a (incomplete) list of features you probably need to build to make a paint program.
Imagine that for each of these options you need to create between 3 and 40 lines of code to implement. (This depends heavily on what library you use, or if you make, for example, the floodfill algiritm from scratch for learning purposes)
Added are the resources you need for the project, if you have a GUI, buttons need images, and somewhere you need to obtain them, or make them from scratch. In case of HyperPyxel, all button images have been created from within HyperPyxel, except for the early placeholders, when HyperPyxel did not have enough code to draw anything half decent.
You may not find the undo button in HyperPyxel. This is because there is none such. There is instead an Oops buttons, and instead of Redo, there is UnOops.
Why on earth….. You may think, not use the accepted Undo paradigm.
Tile mode is probably mostly useful when creating games. The option allows you to overlay the boundaries of tiles, of self defined size.
“Tile-mode” is handy when creating animations, or tile based 2d games. Like platform games or top down games.
Here are two pictures, I manage to squeeze out of the program, using only the tools inside the program itself, and not cheating, and using Paint Shop Pro or the like to tidy up the pictures.

Space is my test picture of the circle, line, spray and fill tools. Zoom was also used a lot, to double check the lines were beginning and ending on the correct pixel. And for filling in really small areas.
.webp)
Cat is my test picture for testing the stencil tool. This tool lets you see a half transparent picture through your own. So you can trace the lines of the other picture. In this image, I traced an picture of an airplane, and another picture of my cat, and over-laid them on a blue background. Then I added some clouds for effect, with the spray tool.
This project is only made for fun. There is no commercial goal here, or any nifty new technology. Just pure Javascript, in a browser, plenty things can be improved, and if I get feedback, I might actually do just that.
Remember, the more people comment, the more fun it will be.
What feedback do I want?
Comment either here, or on HyperPyxel facebook page.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more
Discussion