ExtremePhysics: all pages

View

Last updated 28 June 2010

ep_view_create

ep_view_create(world_id)

Creates a new view.

Returns the id of the new view.

  • world_id: The id of the world.

ep_view_destroy

ep_view_destroy(world_id, view_id)

Destroys the view.

  • world_id: The id of the world.
  • view_id: The id of the view.

ep_view_exists

ep_view_exists(world_id, view_id)

Returns whether the view with the given id exists.

  • world_id: The id of the world.
  • view_id: The id of the view.

ep_view_set_rectangle

ep_view_set_rectangle(world_id, view_id, x1, y1, x2, y2)

Changes the rectangle of the view.

  • world_id: The id of the world.
  • view_id: The id of the view.
  • x1: The x component of the upper left corner of the rectangle.
  • y1: The y component of the upper left corner of the rectangle.
  • x2: The x component of the lower right corner of the rectangle.
  • y2: The y component of the lower right corner of the rectangle.

ep_view_previous

ep_view_previous(world_id, view_id)

Returns the id of the previous view, or 0 if there is no previous view.

  • world_id: The id of the world.
  • view_id: The id of the view.

ep_view_next

ep_view_next(world_id, view_id)

Returns the id of the next view, or 0 if there is no next view.

  • world_id: The id of the world.
  • view_id: The id of the view.

ep_view_set_uservar

ep_view_set_uservar(world_id, view_id, index, value)

Changes the value of the user variable with the given index.

  • world_id: The id of the world.
  • view_id: The id of the view.
  • index: The index (0-4).
  • value: The new value.

ep_view_get_uservar

ep_view_get_uservar(world_id, view_id, index)

Returns the value of the user variable with the given index.

  • world_id: The id of the world.
  • view_id: The id of the view.
  • index: The index (0-4).

Comments

This page used to have a comment section. It's closed now; what remains are the questions I answered.

1pietras · 16 July 2013, 09:24

Hi, I have small problem with ExtremePhysics

Normally everything works fine, but when I reach player.y (has dynamic body and shape ) equal to 1400 or above, game is freezing and after a few seconds player.y gets weird values, for example 24000 or something like that.

If ExtremePhysics has some limits for x and y coordinates for bodies ?
I need room with width and height equal round 4000

Maarten Baert author · 23 July 2013, 20:23

Quote: 1pietras

Hi, I have small problem with ExtremePhysics

Normally everything works fine, but when I reach player.y (has dynamic body and shape ) equal to 1400 or above, game is freezing and after a few seconds player.y gets weird values, for example 24000 or something like that.

If ExtremePhysics has some limits for x and y coordinates for bodies ?
I need room with width and height equal round 4000

There are some limits due to limited precision, but those are much larger (around 1000000 I think). The big_world.gmk example is also much larger than 1400 pixels, and it works fine, so there must be a different reason.

You posted this under 'view', is this problem related to views?