Basics of how internals of Construct work

New releases and general discussions.

Post » Tue Apr 12, 2011 10:44 pm

Well, as long as I can get it to destroy itself upon startup, I'll be fine. Thanks.
B
1
G
1
Posts: 8
Reputation: 441

Post » Wed Apr 13, 2011 7:50 am

You also can create any object existing in your game on any layout from another layout via single eventsheet. Add new eventsheet and you will have access to all objects in game, then include eventsheet to layout you want.
E.g. you have 2 layouts. There's SpriteA on first layout and no Sprite's instances on second. Add new eventsheet, add "<some event>-> create object SpriteA at x,y", include the eventsheet to second layout - now you can create SpriteA's instance on second layout
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Wed Apr 13, 2011 4:47 pm

[quote="DtrQ":d27yktms]You also can create any object existing in your game on any layout from another layout via single eventsheet. Add new eventsheet and you will have access to all objects in game, then include eventsheet to layout you want.
E.g. you have 2 layouts. There's SpriteA on first layout and no Sprite's instances on second. Add new eventsheet, add "<some event>-> create object SpriteA at x,y", include the eventsheet to second layout - now you can create SpriteA's instance on second layout[/quote:d27yktms]

Thanks for that. So it would be possible to have a layout that simply has a bunch of objects that would be usable on any layout, and not have the game ever actually go to that layout?

The other thing I'm curious about is this. How much overhead is there for objects? I remember with Game Maker, objects have a certain amount of overhead for each instance whether it actually did anything or was just visual. But Game Maker the alternative in the for of tiles, which had much less overhead and were purely visible. I see in the tutorials that recommend you to create pretty objects, and then simple "tileable" objects that aren't pretty, but are the real colliders for the levels. That makes since, and is exactly what Game Maker tuts did, using tiles for visuals and actual objects for collisions. Do objects only get overhead for what they actually do? Also, if they have to have overhead like Game Maker for speed, direction, all of those internal variables, then is Construct simply fast enough that you can have tons of object instances without too much slowdown.

Since I'm posting again, I'll ask this one as well. What is usually the biggest bottleneck for Construct? With Game Maker, it was either too many object instances, or the gml scripting that was just too slow as it gets interpreted. Ashley posted above that usually events etc... process faster than the rendering. Is that pretty always the case, or are there certain things/functions in events that cause a specific slowdown outside of the norm?
B
1
G
1
Posts: 8
Reputation: 441

Post » Wed Apr 13, 2011 5:09 pm

[quote="kburkhart84":167sxy25]The other thing I'm curious about is this. How much overhead is there for objects?[/quote:167sxy25]
There is actually very little overhead for objects - even fully animated sprites. Reducing overhead is something we spent some time specifically working on.

If you have hundreds of individual tiles, though, the overheads do add up. If you use a Tiled Background instead of grids of sprites, that should be a lot more efficient.

[quote:167sxy25]What is usually the biggest bottleneck for Construct?[/quote:167sxy25]
I'd say most often shaders, because they're really intense on graphics cards (but look very cool!). Apart from that, inappropriate uses of objects like RTS movement's pathfinding can burn CPU cycles. Usually there are workarounds and more efficient ways of doing that though.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed Apr 13, 2011 6:17 pm

So the tiling object is more efficient than the sprite object. I would assume that is due to the lack of animation of the first object. Even so, you have to have a lot for it to be noticable.

And so the speed is most likely to be bottlenecked by the shaders/rendering. Besides the path-finding issue(which is a fault in the designer, not the tool, if you are using it wrong), are there any other things that I need to watch out for as far as being CPU intensive??
B
1
G
1
Posts: 8
Reputation: 441

Post » Wed Apr 13, 2011 6:23 pm

Not really. I've never ran into any performance problems until I got to the point where it was several thousand commands running per frame, or several thousand objects.

Edit:oh yeah, and the tiled background is faster because there's only one of them for a large area. Where as a sprite would take many for the same space. If you're wondering, yes, you can distort the uv of a sprite to make it look like a tiled background, and use it in its place. Tiled background just simplifies the process
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Apr 13, 2011 6:40 pm

Well, I guess I'm going to dive in to Construct then. I'll make a few small things, to get the hang of it, to make sure it will work for me before I get into anything big. I will post anything I make, including if I need to make any plugins(likely a new sound plugin).

Thanks for the help guys.
B
1
G
1
Posts: 8
Reputation: 441

Post » Wed Apr 13, 2011 10:46 pm

New plug developers are always welcome, but I'm not so sure a new sound plug is warranted.
Granted its use is less than straight forward, but it has most of the functionality you described.
Not sure exactly what you mean by 3d sound, but the positioned sounds should enable you to replicate that.

Now if you were to do a full blown sound system, something that did synthesis, as well as playback...
That would be well received I'm sure. :)

Also on the RTS, to me that's more of a documentation issue rather than bad planning, as it can be avoided by simply using a different expression.
There is a point where you have to choose between functionality, and ease of use. That falls in a gray area... somewhat.

Anyway, welcome to the board, and happy Constructing.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Previous

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests