Drawsprite Plugin

0 favourites
  • 14 posts
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • <font size="4">* MY COLS AND ROWS WERE BACKWARDS IN THE PLUGIN FIXED NOW*</font>

    I have created a plugin called Drawsprite.

    you can do the following:

    Create a random maze with 1 event

    Draw a sprite path

    Draw sprite lines at any location

    Draw with 2 different sprites

    You draw with a string that defines what is drawn.

    Drawsprite Plugin

    Example CAPX

    Live demo

  • I forgot to detail how to use the plugin. I will start with the maze options.

    Object = the sprite used for the maze

    Layer = is the layer number or name of the layer

    X & Y Grid size = The size of each section of the maze. How many objects/sprites used per rows and cols.

    Rows and Cols = Defines how many rows and cols make up the maze.

    X and Y postion = define the x,y position of the maze based on the upper left corner.

    Width & Height override = allows you to override the spacing of the sprite.

    Post Exception String = is used to remove part of the maze after it is created. Its like "row,col" which could be "2,3"

  • Awesome! i tested it and it's designed for procedural generation games, i had some problems when i'm trying to create with:

    -Draw Sprite

    -Draw 2 Sprites then i got:

    <img src="http://i.imgur.com/eMJS7.png" border="0" />

    and i'm not sure what does about "Draw Sprite Path"

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Joannesalfa - send me a capx

    draw sprite set string examples:

    "10,10,dul,3" - draw sprite at x=10, y=10, diagonal upper left 3 sprites.

    "10,10,dur,3" - draw sprite at x=10, y=10, diagonal upper right 3 sprites.

    "10,10,dll,3" - draw sprite at x=10, y=10, diagonal lower left 3 sprites.

    "10,10,dlr,3" - draw sprite at x=10, y=10, diagonal lower right 3 sprites.

    "10,10,ulc,3" - draw sprite at x=10, y=10, upper left corner 3 sprites.

    "10,10,urc,3" - draw sprite at x=10, y=10, upper right corner 3 sprites.

    "10,10,llc,3" - draw sprite at x=10, y=10, lower left corner 3 sprites.

    "10,10,lrc,3" - draw sprite at x=10, y=10, lower right corner 3 sprites.

    "10,10,l,3" - draw sprite at x=10, y=10, left 3 sprites.

    "10,10,r,3" - draw sprite at x=10, y=10, right 3 sprites.

    "10,10,u,3" - draw sprite at x=10, y=10, up 3 sprites.

    "10,10,d,3" - draw sprite at x=10, y=10, down 3 sprites.

    You can chain these strings together.

    Another CAPX more examples

  • wow this looks like fun! I will have to give this a go if I ever my Dungeon Crawler.

  • Wow! This is just what i needed!

    Thanks so much for this.

    Can you make an example CAPX that shows off the Post Exception String in action? I've messed around with it, but i'm not sure i understand what it does (i can't really see any parts of the maze being destroyed)

  • Yanen

    * MY COLS AND ROWS ARE BACKWARDS IN THE PLUGIN *

    Here is a live demo show what the post exception string can do.

    Live demo

    CAPX

    The post exception string for this maze is "0,3,8,5,0,1,8,3,2,5,5,4"

    3 numbers seperated by commas make up one exception. The first number represents col. The second number represents row. The third number represents the wall of the maze cell to remove. Think of the cell as a box with 4 sides. The top side is defined as 1, right side as 2, bottom side as 4, and the left side as 8.

    Also note that this maze dimension is 6x9 and when you reference a cell its done like you do an array, (0,0) is the upper left corner and (5,8) is the lower right corner.

  • Ohh ok i get ya.

    Thanks for that example, that clears it up

  • Joannesalfa

    <img src="http://www.jenpop.com/demos/draw2sprite1.png" border="0" />

    This is how you used the plugin. The format for the set string is (x,y,direction(l,r,u,d),distance).

    <img src="http://www.jenpop.com/demos/draw2sprite2.png" border="0" />

    Here is a example of it working.

    I guess i need to put some error checking into the string parsing part of my plugin.

  • Thanks! this is an useful plugin :)

  • rfisher, is there a way to make this plugin use a random seed so that it will recreate the same levels everytime??

    As it is now it will keep generating random levels so for example level 16 will be different on a different day and a player cannot try to tackle the same level again, instead he gets a new random level.

  • this is a god send. But rfisher can i request for you to somehow integrate it with Tilemap object? There are not many user-friendly dungeon generators, yours are is one of few if not even the ONLY one. But because it uses sprites - it creates hell load of objects which is a killer if you have mobile games in mind. Sure it can be mixed with Tilemap Object even now (using Drawmaze and then mapping the Tilemap based on the maze generated, and destrying the sprites afterward) but it adds few needless, from technical point of view, steps in order to be used proparly.

    From what i understand the Drawmaze generates a an array and creates sprites/objects in a pattern based of that array. Now if we could somehow have access to that array alone - we would be able to use it elsewhere. E.g load our tilemap based of that array.

    Being able to save the create/generated array data and paste it into json or array format... you would really make day.

  • rfisher

    Is it possible to get the seed? Great pluging thumbs up!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)