gles.js - a lightweight WebGL renderer for Android

Discussion and feedback on Construct 2

Post » Thu Apr 02, 2015 2:02 pm

@Chupup Games (not sure the alert works with the space)

There are indeed lack of web tech support (like webGL not being availiable), and user mistakes, I do wonder though how to make them less problematic.

I mean for the web tech, there are not a lot we can do (unless someone here can contribute to the development of browsers and wrappers).

But for user mistakes and issues, maybe there are ways to make them less easy to do, as it has been said, it is easy to use wasteful ressources in C2, or to add behaviors that are not made to be compatible between them, etc..
All of this makes me believe that, while C2 is not a direct culprit, the user does not feel he is doing something wrong, meanwhile, sometimes weird uses can feel wrong but are actually correct (like not using behaviors at all).
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
51
S
22
G
18
Posts: 2,122
Reputation: 17,068

Post » Thu Apr 02, 2015 2:02 pm

@Chupup Games

Agreed, there are limits to the amount of heavy-hitter stuff that can be used, and that will apply in any engine, but we also have taken them into account and avoided using them for the majority of cases, especially physics which does not get used at all.

I like that you blame user code, both of us devs on our game ( which isn't little ;) http://store.steampowered.com/app/334190/ ) are coders outside of C2. In fact, that reminds me that nesting is completely broken in C2 and most code that we would do in programming has to be extremely dumbed down and expanded into more events/conditions. That's a nice "gotcha!" to run into :P

I'm not crazy enough to expect C2 to even be able to run the title screen on mobile, just desktop performance is what I want :) Mobile is a whole different beast to tame and cram stuff into.
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
111
S
38
G
17
Posts: 2,175
Reputation: 19,045

Post » Thu Apr 02, 2015 9:32 pm

I'd be interested to know how nesting is broke. I know some things are all chicken, and egg as far as who made who goes.
Also Aurel's workaround with is overlapping sounds interesting, but I think there should be some other way to do that.
You have to keep in mind that that is one of the "gotcha's" of frame rate independance.
Is overlapping is bound to be more expensive, I will say that much. Plus trigger once is a little iffy, a better solution may be an instance variable.
Image ImageImage
B
167
S
50
G
159
Posts: 8,168
Reputation: 102,932

Post » Fri Apr 03, 2015 12:26 am

Jayjay wrote:are coders outside of C2. In fact, that reminds me that nesting is completely broken in C2 and most code that we would do in programming has to be extremely dumbed down and expanded into more events/conditions. That's a nice "gotcha!" to run into :P


I'd love to hear an example of that, since I've only ever used the Scirra/Clickteam style of coding.
B
143
S
72
G
19
Posts: 1,777
Reputation: 21,702

Post » Fri Apr 03, 2015 3:33 am

@newt The overlapping work around does indeed work for the most part. I've had to do it for most of the game to rectify the lesser lurching. Bullets not making contact etc. Platforming however was a different beast. I got around that too. The worst offender was the vertically moving platform vs player gravity which I fixed by pushing the player back out of the moving object with something like if sprite is overlapping at y + (number) then set sprite y - (correct distance to top of sprite etc.).

It does work and since it's doubling the detection code, I'm sure it's taxing.
B
47
S
12
G
7
Posts: 341
Reputation: 7,953

Post » Fri Apr 03, 2015 4:25 am

I think I remember something about getting some expressions for line intersections, no idea if that's still in the works. It might help, but probably only if it can work with collision cells.
There are other methods as well like a percent to hit.
Image ImageImage
B
167
S
50
G
159
Posts: 8,168
Reputation: 102,932

Post » Mon Apr 06, 2015 6:02 am

@newt It's mostly when you want to prevent duplicating conditions/events by using sub-events, and then also using loops/for loops within those sub-events, hard to say an exact case from memory but I might be able to make one in future.

Also, I wonder if non-circle and non-box type collision/overlapping (so, convex shapes) is currently done by using a method like this : http://www.dyn4j.org/2010/01/sat/

(also another example here: http://www.metanetsoftware.com/technique/tutorialA.html )

@alspal Sure, I'll update this post when I get some time with examples, hopefully by the weekend.
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
111
S
38
G
17
Posts: 2,175
Reputation: 19,045

Post » Mon Apr 06, 2015 1:48 pm

It would be nice to know what methods C2 uses, and perhaps see if there isn't something better.
It claims to use the latest tech, might as well keep the the insides updated as well.
Image ImageImage
B
167
S
50
G
159
Posts: 8,168
Reputation: 102,932

Post » Mon Apr 06, 2015 4:57 pm

C2 uses SAT and convex decomposition for it's collisions. There's not really anything better for 2D, i don't feel like GJK would offer any performance gains in a 2D environment. What perplexes me is the lack of more primitives, especially circles, since these would be the fastest and most general collision bodies to have, as well as dead simply to implement.
B
74
S
13
G
8
Posts: 1,972
Reputation: 9,816

Post » Mon Apr 06, 2015 5:46 pm

I was pretty sure SAT isn't used in C2. Just checked and no it's not. It does the collision detection with either bounding box overlap tests, which are very fast or "line intersection" and "point in polygon" tests for polygons. Collisions are resolved in most (all except physics) behaviors using the runtime's pushout functions which basically are loops that check for an overlap, move a bit and check again until not overlapping. The function used to push out in the nearest direction uses a spiral scan pattern to find a free space.
B
91
S
31
G
98
Posts: 5,192
Reputation: 65,170

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest