Skip navigation.

exploreopera

| Help

Sign up | Help

I'll think of a good title later

Posts tagged with "svg"

Ricochet Robots

, , ,

Ricochet Robots is an online puzzle game built with SVG & Javascipt based on The Ricochet Robots Challenge which is in turn based on the German board game Rasende Roboter from Hans im Glück. The Ricochet Robots Challenge is very good, but I wanted a cleaner interface, keyboard controls & more than one puzzle a day!

The object of the game is to move a robot to a target square (indicated in the centre of the board) using as few moves as possible. Each robot can move up, down, left or right but once it starts moving in a given direction it can't stop until it hits a barrier or another robot.

Mouse Controls:

Click on a robot to select it

Click on the selected robot's column or row to move the robot in that direction

Keyboard Controls:

Press enter to cycle through the four robots

Use arrow keys to move the selected robot

U - Undo last move

R - Reset board

N - New puzzle

Share & share alike

It is annoying how obvious other people's better solutions always seem. You can swap links & solutions for individual puzzles very easily.

Click 'Link to this puzzle' & copy the URL in the prompt box. The numbers in the URL are the coordinates of the robots, then the targets then a final number to show which colour is the active robot/target.

Click on the link next to 'Best solution so far:' to copy the route of your best solution to the puzzle.


I may look into generating random board layouts at some point.

Another SVG map, how to cut your Inkscape files down & some more SVG links

, ,

undeuxtroiskid has provided the map (read: hard) work for the latest map based SVG game, see how you fare with the Counties of Michigan.

While I'm at it I might as well share this tip: you can cut Inkscape filesizes by often over a quarter by rounding all the dimensions in the paths from 5 to 1 decimal place without losing any noticeable image quality. I wrote a simple javascript tool to automate this - just copy & paste your paths (as many as you like) into the text area click round, then copy the results back & save.

The UK Office for National Statistics looks like it will be a good source of interesting SVG examples. See the Personal Inflation Calculator & more recently an excellent Interactive pyramid chart of the UK age structure.

Attempts at charting with XML,XSL and SVG

, , , ...

Warning: boring, rambly, techy, geeky post with a remarkably high TLA density.

Read more...

Opera at work

, , , ...

It's been a tough week at work.

Over the past 6 months or so I have been rewriting a new quotes system from scratch to replace the antiquated Foxpro based system. It has been in a usable state (IMO) for the past 3 months but getting this new system adopted has been like 'walking through treacle' to use one of our director's favourite sayings.

This week I have had a number of opportunities to demonstrate just how superior my new system is. One such event involved the biggest quote the company has ever seen (by several orders of magnitude) that had to be ready first thing Thursday morning. It was entered into the old system & consisted of over 14,000 lines each with ~200kb of data & a .bmp image ranging from 580kb to 2mb in size. There wasn't a computer in the building with anywhere near enough ram to print the bloody thing out. It was very late in the day on Wednesday when one of the estimators came up to tell me about this & 3 different directors & the sales rep who needed it all took turns to badger me about when it would be ready, "I don't know, how long are you going to be in my way?" was what I wanted to reply.

I imported the quote into my new system & quickly wrote some code which automated splitting the quote up into chunks to be sent to the printer one by one. At around 6.30 the MD came in to inform me that he had left a message with our consultant informing him to be in at 7.30am the next day to help me out. While feeding the printer with paper I tried to work out how that was going to help me. At 7.30pm I made sure the printer was brimming with paper & had to leave because the cleaning staff had finished & wanted to lock up.

The next day the sales rep & I stood chatting in the car park from 6.30am & waited until 7am when the key holder turned up to unlock the building. As you can imagine we were mightily chuffed.

Our company has recently switched from Xerox to Konica printers, & these new machines have not been seriously tested especially on a high volume run so I was fully expecting to find the machine with its insides clogged up, but was extremely pleased to find that everything had gone through without a problem. There is no way that the Xerox machines we used to have would have been able to print that many pages (>1600) without a fault. Thank you Konica.

At 7.30am our consultant turned up, "Sorted?"

"Yup."

Later the consultant received a phone call from the MD & I only heard one side of it but it was basically, "nope, Jon was here before I was & it was all sorted....no, Jon fixed that...yes, Jon did that too....no we can now split up large quotes into smaller chunks, Jon has written a routine to automate that so it won't happen again..." which was really nice!

We will now be completely moving over to my new quotes system on Monday.

The building industry is not known for its cutting edge use of IT so most of our customers still want printed hard copies of quotes & my new system uses XML+XSL files for this. Thanks to Opera's support of XSL, XSLT, XPath, XYZ etc. & most importantly the css property 'page-break-inside: avoid' it has been chosen (by me :whistle:) to be our company's browser of choice.

Although if the devs could take a look at bug-255599 I would appreciate it!

In recent weeks there have been meetings upon meetings about the layout of quotes. All the estimators, sales & contracts managers all had different opinions on what should be included & how it should look. Then the Sales director comes along & overules the lot of them... Seemingly every piece of information, table, sentence & picture has been moved, altered, restyled, moved again, removed, added back or resized at some point. Then changed back again. & again.

To keep pace with all this using the old Fox-based reports (shudder) or the newer TQuickReport component for Delphi or Crystal reports would've taken me hours upon hours to do. But being in the familiar environment of Opera & using my basic knowledge of XML, XSL, XSLT, XPath & CSS development time for changes both major & minor has been cut down to minutes. During a couple of meetings where I had the program running on a projector screen I was even fixing layout issues during the meeting, it is that easy to do! Thank you Opera.

My new system also allows the estimator to design custom georgian bar & lead layouts & this data is saved in XML format. I am using XSLT to transform this XML data into SVG images & it is hoped that our glass supplier will come on board soon to allow us to order these layouts via XML rather than faxing over CAD drawings.

What gets me though is our consultant person is absolutely agog at the results I've got out of XML, as has one of our glass supplier's IT geeks. But all I've been doing is: ctrl+t, g 'some xsl related search term', click a link, read, copy & paste code, edit it a bit, save, refresh.

Maybe it's just the industry I'm in, but why hasn't XML been more widely adopted?

Yet another Snake game

, , , ...

Presenting my pet Snake.

So what if there are a lots of other snake clones on the net?

Why should you play this one over all the others? Well:

1. The snake looks cute.
2.
3. Profit.

Controls:

Enter to play
Arrow keys to change direction
P to pause.

More Steps with SVG

, , ,

Play Steps!

Steps is a turn based game where you must move the red circle to the red square while avoiding the arrows. You can move 1 square at a time either up, down, left or right using the mouse or the arrow keys. You move first, then each of the arrows will move in turn onto the next available square in the direction they are pointing. When an arrow reaches the edge of the board it will wrap around onto the opposite edge. With each new level the number of arrows increases.

Good luck!

Edit

After a bit of play testing many of my friends complained that the game was too slow & that they didn't like waiting for the arrows. They are wrong, but still never let it be said that I don't listen to feedback.

Steps version 1.1 Changelog:

  • Fixed bug where target repositioned on top of player.

  • Added check box to toggle animation of arrows.

  • Added hip & funky titling to get down with the kids.

Read more...

the United States of SVG

, , , ...

You can now test your knowledge of the United States of America!

This new page uses the exact same code that I used for the world countries page detailed in my last post. All I've done is change the data, the code for choosing random states, highlighting, keeping score etc. is pretty much identical.

Update 21/01/2007:

Thanks to help from Jeff we are now fully functional in IE+ASV as well!

We also have a much smaller Compressed svgz file of the game as well.

Find The Country

, , , ...

My sense of direction is infamous among my friends. However, recently I have been operating with increased international geographical awareness thanks to my very own Find the country game! (thanks to johnnysaucepn for the FireFox friendly code adjustment) After spending the time constructing & playing with it for probably less than 10 minutes I can now immediately picture in my mind the location of pretty much every country on the planet.

Update 21/01/2007:

Thanks to help from Jeff we are now fully functional in IE+ASV as well!

We also have a much smaller Compressed svgz file of the game as well.


For most people that's all you'll be interested in. The rest of this entry is extremely long & probably not that interesting. You have been warned.

Read more...