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

Author Topic: I have a game in mind but...  (Read 2898 times)

0 Members and 1 Guest are viewing this topic.

BeautiCode

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
I have a game in mind but...
« on: August 11, 2014, 07:37:45 pm »
I have a game I want to make, in mind.
But I have a few questions.
1. How does one make a game where the character would walk and the map would move as he walks?  (Basically like a top/bottom and side-scroller combined)
2. How does a sprite get affected if I make the sprite a certain size and intend it for full-screen, but then I decide to add a feature that allows the user to resize the window?

Bloob

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: I have a game in mind but...
« Reply #1 on: August 11, 2014, 07:49:02 pm »
I think you might want to read the SFML view tutorials.

http://www.sfml-dev.org/tutorials/2.1/graphics-view.php

BeautiCode

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: I have a game in mind but...
« Reply #2 on: August 11, 2014, 09:02:21 pm »
Thanks, that helps for the first one.

Bloob

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: I have a game in mind but...
« Reply #3 on: August 11, 2014, 09:17:10 pm »
Thanks, that helps for the first one.

Scroll down to "Showing more when the window is resized". Does that answer your question?

BeautiCode

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: I have a game in mind but...
« Reply #4 on: August 12, 2014, 04:49:18 am »
I guess, thanks.
One more question, I wanna make a big map.
Its not just gonna be some patches of land that I can put in a tilemap and set it up as little squares. but an actual map with different size buildings and stuff. How would I set that up? Do I just make the whole map in photoshop and load it as one big sprite, then set custom point boundaries for the buildings and stuff? Or..

Ztormi

  • Jr. Member
  • **
  • Posts: 71
  • Web developer by day. Game developer by night.
    • View Profile
Re: I have a game in mind but...
« Reply #5 on: August 12, 2014, 09:31:08 am »
...
Do I just make the whole map in photoshop and load it as one big sprite, then set custom point boundaries for the buildings and stuff? Or..

That could work, but you would have to split the photoshop image into smaller parts if your texture is exceptionally large. The maximum size of texture you can load depends on the graphics card. I generally avoid having textures larger than 1024x1024. I'd say it's probably not worth the hassle.

If tilemaps are out of the question you'd really want to create the terrain from polygons, either randomly generated or with use of tool capable of creating polygons. Pretty much any 3d modeling software can export into .obj file which are really easy to parse into SFML Vertex arrays. Collidable and all special objects you could handle with sprites.

Here's an interesting read http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/
« Last Edit: August 12, 2014, 09:51:03 am by Ztormi »