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

Author Topic: Scrolling World for 2D Games.  (Read 1438 times)

0 Members and 1 Guest are viewing this topic.

Roose Bolton of the Dreadfort

  • Full Member
  • ***
  • Posts: 113
  • Full-time Procrastinator, Part-time programmer.
    • View Profile
    • Personal Portfolio/Website/Blog
Scrolling World for 2D Games.
« on: March 11, 2012, 02:39:12 am »
Hey guys,

I am fairly proficient in c++ and general game structures.

Something I haven't learnt is the general concept of a tiled scrolling world, the sort of world you have in a Mario type game.

I'd imagine its a 2 dimensional array displaying the map like

[11100]
[11101]
[00101]

but I'm not sure how to handle the scrolling when the player moves or adding NPC's etc..

I was wondering if someone could point me to some documentation or example code/conceptions which show the general theory/implementation behind it.

I kinda understand how it would work, but I would like to do it the correct way allowing me to expand on it and not get any issues.

Cheers,

Matt
Trying so very hard to finish at-least one project.

Watch out for the RAII police, they will get you.

www.bantersaurus-games.com

mateandmetal

  • Full Member
  • ***
  • Posts: 171
  • The bird is the word
    • View Profile
    • my blog
Scrolling World for 2D Games.
« Reply #1 on: March 11, 2012, 09:00:29 am »
- Mate (beverage) addict
- Heavy metal addict _lml
- SFML 2 addict
- My first (and free) game: BichingISH!