Welcome to the Internet Channel homebrew blog!

Welcome to the newly-designed blog for Internet Channel homebrew. I figured that with the rebirth of many projects at both WiiOperaSDK.com and HullBreachOnline.com, it seemed only fitting that this blog be reborn as well. Enjoy!

Archive for 'Optimization'

Some of the code in HullBreach has been refactored to pull some additional speed, but the big change is how graphics are displayed.  Previously, everything in the pixel range (0,0)-(500,300) was drawn to a page-flipped canvas.  It ran fine on a standard desktop computer but proved to be slow on a Wii.  Now, the starfield background has been moved from within the canvas to a displaced CSS background, greatly increasing the speed.  The overlay map used to be a section of the main canvas and was drawn as several translucent shapes.  This has been changed to a separate canvas with a CSS opacity of 0.5 and solid shapes, allowing a little extra burst of speed in the game.  Overall, I’d estimate HullBreach Online may be running as much as 50% faster. Don’t think it will stop there, though.  I may move the planets and locations from the canvas to be IMG elements inside a clipping DIV (that’s the same size as the canvas), depending no how much speed I can get.  This would leave just the ships inside the canvas, where they will permanently reside, to allow the freedom of rotation.

Mode7 Class Preview

Mode7 Class Preview

An alpha preview of the new Mode7 is available at http://wiioperasdk.com/mode7.html.

Available features from the original goal list are as follows:

  • Per landscape pixel coordinate mapping
    Default tiles for empty locations
  • Variable pixel size Variable strip size (for speed vs. visual clarity optimization)
  • Variable canvas size
  • Controls for motion, turning, strafing
  • Import custom tile maps
  • Import custom tile images

Originally, the class was going to draw landscapes on a per-pixel basis, but that proved to be way too slow for not only playing but just for viewing.  This I’ve taken some shortcuts (in a similar manner to how the SuperNES did) which create a decent, but not mathematically correct, effect for games.

Much of the class is not yet automated in the manner that the 3DFPS one is, and some tweaking to the perspective projection math is required.  Beyond that, it is functionining.  I just need to run some benchmarks on the Wii before creating a game or two.

    Wii Opera SDK Dungeon Editor

    Wii Opera SDK Dungeon Generator



    Wii Opera SDK

    The Wii Opera SDK has been updated in several areas for speed boosts.  These updates include several functions within the 3D math class, the FPS class, and the drawing class.  I haven’t benchmarked the speed increases yet, but they are visibly noticeable for all the demos on the website.  The optimizations have obfuscated some of the code, so it’s more difficult to follow for those who wish to understand how the underlying classes are working.  There have been no functional changes in those cases.

    I’m currently working on a new terrain-generation class that will be available shortly.  It’s based on a combination of the JavaScript raytracer and the raycasting engine with a bit of the 3D math class thrown into it for good measure.

    FPS Dungeon Generator

    An early version of a dungeon generator for creating first-person games is available on the website.  This editor allows the creation of dungeons based on default textures and inserting teleportation zones by typing the coordinates.  While a dungeon is being edited, a real-time preview rotates on the right side of the screen.  Many changes will be made to this editor over time, but I thought a preview release was in order.  Please note that creations cannot be saved at this point.

    The final release of the generator will include the following features:

    • Uploadable textures
    • Uploadable sky and ground textures
    • Drag-and-drop wall editing
    • Drag-and-drop teleportation spots
    • Hyperlinking of teleportation spots
    • Save finished dungeon to the Dungeon Gallery
    • Download text file of final dungeon for use on another website

    There was a bug in mesh generator due to it using an older version of the Wii Opera SDK v2.x. It has now been upgraded to use v3.x, so mesh submissions can continue once again. Also, the code has been cleaned up, so animations are slightly faster.

    I’ve made modifications to the triangle texture mapping functionality of the Wii Opera SDK, incorporating the rotation and scaling calculations by Tangent128 for his 3D globe widget at MyOpera. This eliminated the need for scanline-based rendering and replaced it with single-pass rendering. As one can imagine, this greatly increased the speed of the triangle filling.  Based on trials I’ve done, the speed increase is probably about 20 fold, but it really depends on how big the average triangle is for each mesh. Basically, the boost probably comes down pretty close to scaling linearly with the number of scalines that would’ve been in the triangle with the old rendering method. A demo of the Super Smash Bros. logo is at http://wiioperasdk.com/texturemap.html and a ripple puddle is at http://wiioperasdk.com/ripple3.html.


    Continue reading…