Karl's public fiddles
-
Platform Slopes Demo
Test development for implementation of slopes into a platform game.
-
Download Javascript Matrix
Download the content of a Matrix into a csv file.
-
Quadrilateral "contains" function
Practical function "contains" to detect a point inside common quadrilaterals such as squares, rectangles and diamonds. Squares and rectangles are widely used on many elements, like in-game objects and buttons. Square diamonds are quite practical for screen buttons that need to be together in diagonals, such as virtual D-pads. Large diamonds are wide used on isometric tile-based games.
-
Find the pairs
Simple "find the pairs" game made with canvas.
-
Snowball cannon
Demo that illustrates how to achieve a cannon functionality with aiming.
-
Image transition (CSS3) (3/3)
Animated transition between images using CSS3 transitions. This uses even less CPU and is way easier to implement.
-
Image transition (RequestAnimationFrame) (2/3)
Animated transition between images using requestAnimationFrame. This uses less CPU and lets you mess up with animation timing.
-
Image transition (OldSchool) (1/3)
Animated transition between images at oldschool style with setTimeout.
-
CSS3 image transition
Animated transition between two images using CSS3 transition property and a little Javascript
-
Platform Game Demo
Basic code from blog.jugaa.me, teaching the basis to make a platform game with HTML5 Canvas + Javascript.