Updating project from 0.99.96 to r2?

For questions about using Classic.

Post » Wed Jan 02, 2013 9:53 am

So,

I'm returning to construct after a lengthy absence... My project was originally developed on Construct 0.99.96. It still seems to be working on THAT version of the program quite well.

But I was hoping to update to R2. Unfortunately, when I try to load my game into R2 (after adding back in the "orbiter" plug-in from my old plugin folder) the game suddenly starts to behave rather strangely.

It's a Space War/Asteroids type game... And in R2 the player ships (which use box physics) move at about 50 times normal speed, turning and flying insanely fast... They also randomly get stuck whenever they're supposed to be wrapping from one side of the screen to the other (I created a simple wrapping event of my own in 0.99.96), and they shoot bullets (which also use physics) that some times move at lighting speed and sometimes don't move at all.

Thinking maybe this was just something that was changed in R2, I tried the project out on Construct Classic 1.2 as well with the exact same results.

So, I have to assume were there changes to the box physics behavior from 0.99.96 to 1.2/R2? If that is the case, is there anywhere these changes are documented so I can made adjustments to my project? If there were no changes, does anyone have any ideas what might be causing these speed up effects when using R2?

Any help greatly appreciated! Thanks!
B
4
S
1
G
2
Posts: 64
Reputation: 980

Post » Wed Jan 02, 2013 5:29 pm

Ah yeah, I remember somewhere between the 0.99's and 1.0's there was a change in the Physics engine (maybe an entire switch from Newton to Box2D?), but it should work the same after you lower your values down.

To move a physics object now as of R1.2 you can store the old X and Y velocity, disable the physics behavior, move the object, then re-enable it and set the X and Y velocity to the previous value.

Also, there is a layout size limit of 20,000 in each direction for the physics engine I think, otherwise the physics objects will just stop.Jayjay2013-01-02 17:31:21
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Wed Jan 02, 2013 10:37 pm

[QUOTE=Jayjay] it should work the same after you lower your values down.[/QUOTE]

I was guessing it might be something like this... Any idea about how much these need to be lowered? I guess I can just play around with the numbers a little.

[QUOTE=Jayjay] To move a physics object now as of R1.2 you can store the old X and Y velocity, disable the physics behavior, move the object, then re-enable it and set the X and Y velocity to the previous value.[/QUOTE]

This part kind of lost me... Did you mean I have to do this in the event sheet? Just lowering the values will not fix my problem?

Could you elaborate a little? I'm really rusty on all this stuff!

Thanks!
B
4
S
1
G
2
Posts: 64
Reputation: 980

Post » Thu Jan 03, 2013 3:47 am

Yes, for "teleporting" objects you'll need to do that in events sorry for the confusion!
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Thu Jan 03, 2013 4:22 am

[QUOTE=Jayjay] Yes, for "teleporting" objects you'll need to do that in events sorry for the confusion![/QUOTE]

Right! Got it! So far, no teleport in the game. But I was thinking of adding it so that helps.

Thanks again, you the man!
B
4
S
1
G
2
Posts: 64
Reputation: 980

Post » Thu Jan 03, 2013 7:00 am

Okay... So this is interesting.

For each of the ships in my project, I have added phycics behavoir. So if I select one of my ships in the layout editor, under the properties tab there is a PHYSICS section under the BEHAVIORS menu.

If I load in my working Construct 99.96 project into Construct R2, all the values in this PHYSICS menu are the same. The MASS value I have for my ship is set to 1.4.

But, as I stated before, the ship moves too fast under Construct R2.

But, it turns out, if I go in an RETYPE the mass value at 1.4 -- I don't even have to change the number, just type it in again -- the ship suddenly flies at the correct speed.

So, clearly something about the 99.96 file format is being read incorrectly by R2.

Now, I still have another problem. I have a simple Edge Wrap event in my project. The idea is if a ship flies off one edge of the screen, it appears on the opposite side (exactly like the game Asteroids.)

There was the WRAP BEHAVIOR back when I was using 99.96 but it didn't work for me because of (I think) the shape of my ships... if you approached an edge slowly, the ship got CAUGHT there -- jerking a little back and fourth but never able to wrap to the other side.

Well, that problem is back with R2... Here is my wrap Event sheet:



Works great in Construct 99.96 but not in R2...

Does this fall under the "Teleport won't work with physics since r1.2" you were talking about jayjay? I'm assuming the WARP BEHAVIOR will also not work with a physics object? Does anyone have code for a PHYSICS WRAP/TELEPORT laying around that I can look at?

Thanks!BluepointVance2013-01-03 07:30:00
B
4
S
1
G
2
Posts: 64
Reputation: 980

Post » Thu Jan 03, 2013 7:47 am

Glad to hear! And here's an image of what I mean to instantly move a physics object as of R1.2 and up:

"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Thu Jan 03, 2013 8:35 am

[QUOTE=Jayjay] Glad to hear! And here's an image of what I mean to instantly move a physics object as of R1.2 and up:

[/QUOTE]

That did it... Project now working in R2! Thanks a million again!!
B
4
S
1
G
2
Posts: 64
Reputation: 980


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests