And then there was awesome!
I know I've been forgetting to post updates here for a while, but I hope that this image will make up for it. As you can see, not only are images implemented but there is also alpha - so the images further from your mouse cursor will appear semi-transparent! Also, the text you see in the bottom right changes sides depending on where your mouse is so that it never obscures the image you're looking at.
What I'm now working on is the full-size image viewer - when you click an image, it will scale up to fill the screen and you can then pan and zoom all around it. However, this is currently proving somewhat... impossible. So I may take a while with this...
I've developed the SSSSSS (Sepcialised System for Super-Shiny Square Scaling) algorithm further, and it can now handle scrolling! To celebrate, I implemented scrolling in the original demo. So now, with the mouse on the far right of the screen you'll see the images on that side, and as you move the mouse left the grid will scroll to reveal those on the left!
As promised, the equation thingy has increased in complexity somewhat. In fact, it could probably do with a bit of tidying up. But here it is anyway, for your viewing pleasure:
You're probably best viewing this one full-size. Just click as always.
Tomorrow I intend to make this work with actual images (insert exclamation of shock here), so keep refreshing this page every few seconds!
Or I suppose you could just come back and check tomorrow.
Today, I present to you the result of much mathematical fiddling and error-induced pain. I have been working on the image gallery program I fell short of properly describing in the last post, and have created a system that displays a grid of images (white squares at the moment) which scale up as your mouse approaches. In the final program, the grid of images will also scroll with your mouse cursor, but that will be added later. For now, bask in the awesomeness of the algorithm I like to call "SSSSSS" (Specialised System for Super-Shiny Square Scaling):
If you like, you can take a look at the source code for this at http://pasteall.org/2333/python. However, it must be noted that the code is uncommented and incredibly messy, so I wouldn't advise trying to understand it.
The basic scaling algorithm is as follows:
Mx = Mouse x-positionMy = Mouse y-positionCx = Centre of the tile (x-axis)
Cy = Centre of the tile (y-axis)Tx = Tile size (x-axis)
Ty = Tile size (y-axis)
Click on the image to view it full-size as always.
As you can see, the scale factor must be in range 1.0 <= x <= 2.0, so it's necessary to also add code that clips the scale factor at these values.
This is probably going to get a lot more complicated when I add scrolling...
Anyway, that's all for this update. Watch this space for more soon!
Try not to jump in fright at this, but this is a new post.
Yes. Really.
It's been a while, hasn't it? Well, allow me to explain the post-nuclear-blast-esque silence. You may remember that I was being constantly attacked from all sides by the dreaded exams as I wrote my last post. Well, they got worse, and I was soon spending a steadily increasing proportion of my time revising every day. Ultimately, all my non-school-related projects were all but forgotten, and Slipslide 2 was but a distant memory.
Thankfully, my revision was not in vain, as I got a 1 for every subject (1 = A, for those of you unfamiliar with our system)! However, Slipslide was left to gather dust for months, and it wasn't until I stumbled onto this page again a while ago that I remembered about it. In the time that passed between the hellish onslaught and my fateful rediscovery of the long-lost relic that is this blog, many events have taken place. Some were exciting, some were intriguing, and some were nifty, and if you continue reading I shall elaborate on the most significant of them.
Firstly, I have begun learning C++, which is probably around 50 times more confusing than Python (yet 50 times more powerful at the same time). I've come some way with it, but it's unlikely I'll be doing anything spiffy with it for a good while as there's a massive amount still to learn.
Back in the world of Python, a few friends and I recently started what seemed like an incredibly simple project - a program that lets you make text adventure games in Python using a node-based system - but has grown in complexity as all the little things that you normally take for granted (text boxes, for example) have proven near-impossible to code properly, and the code structure (originally completely modal, with GUI elements designed to be usable by other programs) has melted together to form a big ugly monstrosity that will soon be near-impossible to safely edit. So we're going to have to consider redesigning the whole thing, possibly coding GUI elements completely separately and adding them in when the whole thing's finished. Whatever approach we take, it's definitely going to involve a friggin' massive flowchart.
Now, while this project is being semi-restarted, I have started on a little side-project - a Python-based image gallery program not unlike the Firefox PicLe
ns extension, but in 2D and with file info display and a full-size image viewer (with zooming and panning). It's proving to be challenging so far, but I have managed to get it to load images, resize them to fit into tiles, draw them to the screen in a grid pattern and display the details for whichever image you hover the mouse cursor over. Next comes some spiffy mouse-driven scrolling and scaling effects which can't really be described through text but are illustrated in my crude drawing on the right (click to view it properly). Admittedly, it doesn't do much better at conveying what I mean. But all will become clear when I post screenshots if it in action when I get it working!
I only just noticed how old the last post here actually is; the update-rate seems to have decreased exponentially now that exams have taken over. However, for now at least, all that is going to change. After an epic silence, I have finally returned from the Pit of Procrastination bearing news!
First, Slipslide 2. In the last post you may have noticed that it had reached a brick wall of sorts, in that it was running like Windows Vista on an Apple II. Luckily, illume was able to show me how to fix it:
"if you're on windows pygame now uses the windib (GDI) driver instead of the directx one by default.
We had to do this for compatibility with, funnily enough, vista :)
You can do the following, and it should become similar to before...
import os
os.environ['SDL_VIDEO_DRIVER'] = 'directx' "
So as a result, Slipslide is now running as it did before - well, visually at least. The sound still crackles and pops constantly, but apparently there is a fix for it:
"I think some nice people have found and fixed the sound crackling...
You can try it out with the development builds of pygame here:
http://thorbrian.com/pygame/builds.php"
I intend to try this out when I have time, hopefully it should solve the problem.
Meanwhile, a few folders away from Slipslide 2, I have been working on getting my music on the Internet. My new site, which is mostly finished now, can be found at purevolume.com/animatinator. Feel free to have a listen, although the sound quality isn't perfect due to downsampling by purevolume.com (so the files don't take up too much bandwidth).