Pixel Per Second and Multiplayer

Discussion and feedback on Construct 2

Post » Sat Apr 14, 2012 4:13 pm

Just a though experiment..

I saw that for example the speed 8Direction Movement is running on Pixels per Second.


Wouldn't this mean that if i have a button to adjust window size, that it would also change the movement speed of the player who changes his window size?
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Sat Apr 14, 2012 4:16 pm

I don't get the question, i think you mean if the window size changes.. but the most used way to keep the same movement Speed is (multiply)* per Delta Time.

Example : speed * deltaTime;


Hope this works for you.
:)
B
23
S
5
G
2
Posts: 17
Reputation: 3,521

Post » Sat Apr 14, 2012 5:34 pm

I don't understand it fully but when you resize a window you aren't adding (or subtracting in your case) pixels to make it move slower or faster. So it shouldn't affect the speed if someone resizes the window.

Hopefully this makes sense and I understood what you're trying to say.
B
7
S
2
G
3
Posts: 10
Reputation: 2,279

Post » Sat Apr 14, 2012 8:01 pm

when you resize a window the size of the world inside that window isnt changing only your view of it
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Sat Apr 14, 2012 8:14 pm

@Schoening
I'm interested to know why you have 'Multiplayer' in the topic title. Are you thinking of the situation where a player adjusts his/her window size independently of other players?

Even in that situation, there could not be any effect on the movement speed of his/her own player.

The reason is that play is taking place within the canvas/layout, which itself is within the browser window, whose resizing necessarily has no effect on the predetermined size of the canvas/layout within it.
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Sat Apr 14, 2012 9:24 pm

Nothing happens, the speed is the same no matter what
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Sat Apr 14, 2012 11:45 pm

I think he wants to make a cut in the middle of the screen and make a double view or something.
B
23
S
5
G
2
Posts: 17
Reputation: 3,521

Post » Sun Apr 15, 2012 12:37 am

@Schoening, I think you're possibly confusing the speed on your screen vs. the speed in the "game world" (layout co-ordinates). The size of the window has no effect on how fast objects are moving in layout co-ordinates. If you play a game on an iPhone, then get some super-powered mega-laser and project the entire game on to the surface of the moon (how cool would that be?) - possibly the biggest screen imaginable - you'd still be moving at exactly the same speed in the game. It's just displayed bigger!
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Sun Apr 15, 2012 11:30 am

@Velojet

I'm interested to know why you have 'Multiplayer' in the topic title. Are you thinking of the situation where a player adjusts his/her window size independently of other players?

Yes that was the idea!

@all the rest, also thx

I don't know why it didn't occur to me that it is just resizing the game, and still uses the pixels from the "game world" like Ashley said..

Perhaps i got confused because I've read that if you don't use
* Delta Time, Different Framerates will change the tick speed.
(yeah that's probably it..)

Thx all :p, was just a thought though xD, but a Zoom Function could be interesting for my game..Schoening2012-04-15 11:31:36
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Sun Apr 15, 2012 12:19 pm

C2 most certainly has a zoom function... A few options, actually...
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests