Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: engine design question  (Read 2054 times)

0 Members and 1 Guest are viewing this topic.

section_two

  • Newbie
  • *
  • Posts: 19
    • View Profile
engine design question
« on: June 18, 2011, 12:59:48 am »
Hi, im from argentina.
 
I want to know if someone can explainme the method for detect colision in a large world, tile based, with many objects, but they move in a free way, not in a tile based style.

Looping every object in the world ?? mmm...no.
Maybe split the world in many little worlds, and check the ones in same world piece.

Or.....



Sry if this is not the right forum for ask this.
Sry for my english too.

Thanks.

section_two

  • Newbie
  • *
  • Posts: 19
    • View Profile
engine design question
« Reply #1 on: June 18, 2011, 01:18:55 am »
OR....

In memory, draw every colision object in one color.....red....., and check if it is already a red pixel before it draw.

OR.....

section_two

  • Newbie
  • *
  • Posts: 19
    • View Profile
engine design question
« Reply #2 on: June 18, 2011, 01:25:05 am »
new problem, how i know witch object to draw?

Looping every object position, and see if its in the screen range.


Pd. Im new in this kind of game programming.

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
engine design question
« Reply #3 on: June 18, 2011, 07:51:46 am »
You know you can edit your post, right?
I use the latest build of SFML2

MickeyKnox

  • Newbie
  • *
  • Posts: 43
    • View Profile
engine design question
« Reply #4 on: June 18, 2011, 03:16:16 pm »
Splitting the world into many small worlds should be the right aproach.
Inside those small worlds, you would've to check all objects against each
other.

That also solves the second problem: Keep track of the currently visible
small part of the world. Only draw the objects in that one (and maybe in
adjacent ones).

section_two

  • Newbie
  • *
  • Posts: 19
    • View Profile
engine design question
« Reply #5 on: June 19, 2011, 03:37:10 am »
Thanks MK. I'll try in that way. Hope you reply my future questions. I have a lot.

 

anything