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

Author Topic: Problems with drawing map  (Read 1160 times)

0 Members and 1 Guest are viewing this topic.

Jeckie

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • Email
Problems with drawing map
« on: July 28, 2013, 10:49:52 am »
I'm trying to make a game but I have problem with graphics.
I don't know the name of the game but it's the one with paddle and ball where you need to destroy the bricks.
I made the paddle and ball moving and now I don't know how to make the bricks.
If you need pictures or code comment please.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Problems with drawing map
« Reply #1 on: July 28, 2013, 10:53:57 am »
Breakout?

You can store the bricks in a container, and test them separately for collision with the ball. Since they're very few, it's hardly worth to optimize here; iterating through all of them won't be a big issue.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Jeckie

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • Email
Re: Problems with drawing map
« Reply #2 on: July 28, 2013, 11:05:47 am »
Yes, it's the breakout game.

How do you mean store them in a container?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Problems with drawing map
« Reply #3 on: July 28, 2013, 11:08:52 am »
In a STL container such as std::vector.

If you haven't heard this term before, I strongly recommend to read a good C++ book, because the STL is basic knowledge which is very important in C++. It's probably the most often used part of the standard library.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: