[PLUGIN] Canvas

Post your completed addons to share with the community

Post » Wed Aug 10, 2016 5:54 pm

Hello everyone! I'm using the canvas plug-in to create a picture-in-picture Metroid style mini map (without an array) and I've been pretty successful so far. It needs one or two more tweaks before it acts exactly like Super Metroid. Here's the capx and a gif. I've commented as best I can.

https://www.dropbox.com/s/81tgl80ukskhk ... .capx?dl=0

Image

It need some polish. If you stand between two tiles, both turn yellow. The mini map jumping along with the player is weird. I'm trying to get the map to scroll like this.

Image

I had this idea. Instead of the canvas mini map following the playerIndicator, it would follow whichever blackMapTile is currently playing the "playerOccupied" animation. Would something like this be possible because I can't get it to work.
B
25
S
13
G
21
Posts: 174
Reputation: 13,363

Post » Wed Aug 10, 2016 7:52 pm

haha! New capx and gif ya'll. That was quick. I implemented a Metroid-style scrolling. Now I just need to fix the issue that happens when you're overlapping and highlighting two tiles at once. I need to somehow make the game check what tile the player is overlapping with "more" and highlight just that tile. There's also a small that's bug not noticeable in the gif. When the player moves to a new tile, that new tile quickly flashes on and off before turning. And that repeats.

https://www.dropbox.com/s/fa1bsrv7ns2ey ... .capx?dl=0

Image
B
25
S
13
G
21
Posts: 174
Reputation: 13,363

Post » Sun Aug 14, 2016 4:00 pm

SOLVED, solution in Edit at bottom post.

Hey, can anybody help me? I've managed to use this plugin in my game, it works really well. But for what seems like no reason whatsoever, the shadow casters (the 'p' sprites from the example) aren't being moved to the object's corners. It's really weird and annoying, can anyone help?

Image
Image
Image

I just copied the events and actions across from the example and changed the objects to what they need to be. It finds the right object, finds generally the right corners but then just doesn't move the shadow casters ('p') to them. It's almost like the math within the actions is just a little off, but it works fine in the example and this is the same everything as that! If anyone can spot what is wrong, that would be super helpful.

EDIT: I figured it out, it's because the sprite's only image point was in the Top-Left. This breaks it, it has to be in the centre unless you want to play around with the actions and fix it. To fix it is fairly simple, when it spawns the ShadowCasters ('p' from the example) it spawns them at the sprite's 0 image point. So just make another image point on your sprite and set it to centre, then where it says "Image Point:" in the settings for "Spawn another object" put the number of the new image point.
----------

If you need a hand with anything, just drop me a PM.
B
8
S
2
Posts: 29
Reputation: 560

Post » Wed Aug 24, 2016 5:59 pm

Thanks for this Rojo!
ImageImage
B
31
S
9
Posts: 212
Reputation: 4,065

Post » Wed Aug 24, 2016 10:58 pm

Thanks for this tutorial and demonstration.
B
38
S
22
G
6
Posts: 85
Reputation: 6,547

Post » Tue Aug 30, 2016 3:39 am

Does this work for iOS? (Using Cordova and Intel XDK)
I made a Jigsaw Puzzle using this plugin but when i export it to iOS the pieces (canvas') don't appear.

If so, how do I have to export it?
B
3
Posts: 2
Reputation: 179

Post » Tue Aug 30, 2016 4:07 am

@TimeMachine
It should, i've never tested it. You could try turning webgl off in the project properties because this plugin doesn't perform well with webgl. Maybe that will correct something. Other than that it uses an html5 canvas internally which should just work on any html5 export.
B
79
S
24
G
54
Posts: 4,741
Reputation: 40,745

Post » Sun Sep 11, 2016 4:49 pm

Exactly what I'm looking for Thank A Lot :D

If someone interested I use it like this :
https://www.mediafire.com/?5sx1wo0wp1cvdri
B
3
Posts: 6
Reputation: 179

Post » Sun Sep 18, 2016 6:36 pm

Is that an option to make the canvas transparent ?
B
5
Posts: 2
Reputation: 235

Post » Sun Sep 18, 2016 6:46 pm

@Gutogordo
The clear canvas action?
B
79
S
24
G
54
Posts: 4,741
Reputation: 40,745

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: brklipel, dark1994 and 1 guest