Official canvas plugin?

Discussion and feedback on Construct 2

Post » Tue Aug 20, 2013 6:21 pm

I've been working on a few tile-based games in C2 for a while now and performance, after doing every trick in the book, is not very good. This is due to the hefty amount of sprite objects acting as tiles.

We need some sort of canvas plugin to paste tiles into prior to destroying them, converting hundreds if not thousands of objects into a handful of larger images which drastically increases performance.

I used to do this with R0j0hound's canvas plugin but from what I've gathered it's not WebGL compatible and causes memory leaks when doing this. Doesn't look like it'll be fixed any time soon..

@Ashley That said, have you guys ever considered hiring someone to write an official canvas plugin as you did for spritefont? This is only one of the many, many uses for it!
MadFactory2013-08-20 18:22:16
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Tue Aug 20, 2013 6:47 pm

You can avoid the performance hit the canvas object causes with webgl by keeping it invisible, pasting to it at the start of layout, the having a sprite load its image.

However, it's been around long enough and still not gained webgl support that I have to agree - it would be nice to have a webgl compatible canvas plugin.
Moderator
B
94
S
33
G
33
Posts: 3,006
Reputation: 27,749

Post » Tue Aug 20, 2013 6:52 pm

Yeah I did that but there seems to be a memory leak too :T
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Tue Aug 20, 2013 7:01 pm

The problem is a lot of the features <canvas> gives aren't easily implemented into webgl, things like paths, curves etc.
On the other hand some of the functionality you are looking for already exists, but its pretty limited, IE snapshot canvas.

The question is what other functionality is available?
Or is there some happy medium, such as the ability to snapshot certain areas of the screen, and or if we aren't able to draw curves, could we perhaps draw lines, or even just plot pixels like in Construct Classics Canvas?
Image ImageImage
B
168
S
50
G
169
Posts: 8,283
Reputation: 108,195

Post » Tue Aug 20, 2013 8:11 pm

Honestly the drawing stuff is the least useful imo. Not many games use stuff like that, whereas almost every game out there can make use of pasting and the rest. What about an action to bake textures?

>Create tiles
>Bake tiles, omitting special ones
>Destroy tiles
>Aw yiss. 60 fps.MadFactory2013-08-20 20:19:25
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770


Return to Construct 2 General

Who is online

Users browsing this forum: CrudeMik and 3 guests