User Tag List

Results 1 to 4 of 4

Thread: Fusion 2.5: Ovine Tilemap Widget

  1. #1
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,477
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Post Fusion 2.5: Ovine Tilemap Widget

    Hi everyone and happy new year!

    Ovine Tilemap widget.zip *

    * This widget is for Fusion 2.5 only, it would work on MMF2.0 but I plan to add actors and I need some features only found in Fusion.

    Ovine Tilemap Widget
    One thing I've always wanted to be easier in Fusion is a way to build a game in one level but have different screens or levels. Imagine an flip-screen exploration game like Dizzy, Manic Miner or Jet Set Willy. In these type of games you will have the same game logic covering many levels. In Fusion today you could build such a game easily over many frames, you can copy frames, use globals and event behaviors. Alternatively you can create your own level editor / viewer that runs in a single frame with all your game logic in one place making it easier to maintain, make changes and fix bugs. There are some extensions to help with this, but they are generally limited to specific runtimes. Maybe one day Clickteam will give us some objects to help with this kind of functionality but until then I thought I'd have a go at creating a widget to allow me to display a 'room' or level in one frame which works anywhere and this is what you will find here.

    There are actually three widgets, two are for a basic level editor and a third for use in a game.

    This version is fairly basic but works well on Windows and Android. Should work on iOS but not tested there yet.

    How to use

    The widgets have some alterable values which will be explained below. It also needs two objects

    1) an Array object called TileArray - this stores the map data, ie: What tiles to display in your room. The X and Y dimensions of the array define a grid where each cell defines the tile to display. The Z dimension is to cater for additional 'rooms' or levels.

    2) an Active object called Tileset - this contains tiles in the Stopped-Right animation. I use Fusion's new picture editor import feature that will import a 'sprite sheet' as 'Import as animation' from a tilesheet graphic you create. The first tile in the tilesheet is an invisible tile, it will never be displayed.

    Tilemap Viewer Widget
    This widget will read the data stored in the TileArray and paste as a backdrop the corresponding tiles found in the Tileset active object. It is currently set up to use three tilemap layers and you can choose to paste to different frame layers in Fusion.

    Alterable values:
    * aNumTilesX = the number of tiles in the tilemap on the x axis.
    * bNumTilesY = the number of tiles in the tilemap on the y axis.
    * cTileImageWidth = the width in pixels of each tile.
    * dTileImageHeight = the height in pixels of each tile.
    * eDisplayRoom = the Room (starting at 0) to display.
    * fLayer1 = the Fusion layer to paste the tilemap layer 1 to.
    * gLayer2 = the Fusion layer to paste the tilemap layer 2 to.
    * hLayer3 = the Fusion layer to paste the tilemap layer 3 to.

    Alterable strings:
    * aCommand = The widget will not do anything until you set this to "GO". Set the eDisplayRoom alterable value first, then set this string to "GO" to render that room number.

    I have designed the widget to work each time you start a frame. To start, create an event to set the eDisplayRoom alterable value to the room you wish to display, then set the aCommand string to "GO". Your room will be created as background graphics. To change to another room restart the frame (or jump back to it) - I use a global value (A) to store the current room in the example.


    There are two other widgets to help with building levels:

    Tilemap Editor Widget - this is the editor space.
    Tilemap Selector Widget - this is the object workshelf, the tiles you can pick from.

    Both share a lot of alterable values in common with the viewer widget so I will not cover them again.

    Quick note on how to use the editor: Select a tile from the Selector Widget by clicking on any in the grid. You will see a larger representation of the selected tile above. Now Left click in the Editor Widget area to draw with that tile. Right click in the Editor Widget area to select that tile to draw with (a short cut).

    There are some additional buttons in the Widget-Editor frame that demonstrates how to control the level editor.

    What's next?
    The widgets do provide the functionality I wanted but there are still features to add. I've tried to make them as flexible as possible and if they are useful to you please dive in and use them. If you make any interesting modifications please do share with the community.

    I plan to add 'actors' to the next version of the widgets which will allow for active objects to be set up to be displayed within each room.

    Have fun!

  2. #2
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,224
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    this is good andy . well done

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    SevenT2's Avatar
    Join Date
    Apr 2013
    Location
    Australia
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is fantastic!

  4. #4
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-on
    iamjot's Avatar
    Join Date
    Nov 2008
    Location
    Austria
    Posts
    732
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A really good and simple version of a great working level editor! Very user friendly!

Similar Threads

  1. Tilemap widget for Fusion
    By AndyH in forum Fusion 2.5
    Replies: 1
    Last Post: 2nd January 2014, 08:12 PM
  2. Replies: 5
    Last Post: 29th December 2013, 10:48 PM
  3. Ovine Skin For Fusion 2.5
    By AndyH in forum File Archive
    Replies: 7
    Last Post: 24th December 2013, 04:44 PM
  4. Ovine Lens Shader
    By AndyH in forum Shaders
    Replies: 1
    Last Post: 16th June 2010, 02:52 PM
  5. Sideways scoller / tilemap?
    By RR7 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th March 2007, 12:20 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •