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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rockerdanmatt

Pages: [1]
1
Graphics / Help with tile map adventure game.
« on: August 12, 2012, 03:43:14 pm »
Hey I've recently started using SFML to construct a new 2D adventure game, nothing fancy but somewhere to start.

However I need to understand how I am going to represent each map segment. My screen size is 600 by 400 and each 10 by 10 pixels should be an image, whether it be the player or a wall or just some dirt on the floor. This means I will need 2400 objects per map segment (60 x 40).

The world will be split up into around 10 map segments for now, however this is most likely irrelevant.

My issue is that I'm not sure how to make the most of SFML by using the right objects for the job, I have a single Image file which represents the 10 by 10 entities in the game and I'll be using Sprite.SetSubRect to select which ones. I'm wondering how to represent each of my 2400 objects per map segment. What would the best course of action be, 2400 sprite objects in an array?

Thanks for reading and thanks for any replies!  ;D

Pages: [1]
anything