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

Author Topic: Sprite Efficiency  (Read 22762 times)

0 Members and 1 Guest are viewing this topic.

Elias Daler

  • Hero Member
  • *****
  • Posts: 599
    • View Profile
    • Blog
    • Email
Re: Sprite Efficiency
« Reply #30 on: February 06, 2013, 10:59:55 am »
FRex, I've seen those before, I was just wondering if what tutorials from this list you were reffering to
It's 16x16 on 240x320 than scaled to 2x. I'm making NES-like game, so it's okay for now ;)

krzat, there's no trouble with your code, I was just interested in exploring more methods so I can come up with mine.
Tomb Painter, Re:creation dev (abandoned, doing other things) | edw.is | @EliasDaler

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Sprite Efficiency
« Reply #31 on: February 06, 2013, 11:02:09 am »
Shader one and krzat's, scrap the 'basic' one, it's too 'basic'.
Yeah, the basic one and shader one are mine(+idea and glsl code to start off of from dbug).
I'm so promoting myself right now. :P
https://github.com/SFML/SFML/wiki/Source%3A-ShaderTileMap
That's for 32x32 but it can be changed easily to whatever sizes, unlike the example glsl from dbug, because I've written it from scratch.
« Last Edit: February 06, 2013, 11:06:50 am by FRex »
Back to C++ gamedev with SFML in May 2023

Elias Daler

  • Hero Member
  • *****
  • Posts: 599
    • View Profile
    • Blog
    • Email
Re: Sprite Efficiency
« Reply #32 on: February 06, 2013, 11:08:22 am »
Thanks again, I'll try to come up with something later. :)
Tomb Painter, Re:creation dev (abandoned, doing other things) | edw.is | @EliasDaler

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Sprite Efficiency
« Reply #33 on: February 06, 2013, 11:29:01 am »
If your number of tiles exactly fill the window, why do you need to check which tiles are visible at all (they are all always visible)?
Laurent Gomila - SFML developer

Elias Daler

  • Hero Member
  • *****
  • Posts: 599
    • View Profile
    • Blog
    • Email
Re: Sprite Efficiency
« Reply #34 on: February 06, 2013, 11:38:19 am »
Laurent, it's because of scrolling. Level is much bigger that what's on screen
Tomb Painter, Re:creation dev (abandoned, doing other things) | edw.is | @EliasDaler

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Sprite Efficiency
« Reply #35 on: February 06, 2013, 11:42:21 am »
Yeah... what I wanted to know is the total size of the map, of course ;)
Laurent Gomila - SFML developer

Elias Daler

  • Hero Member
  • *****
  • Posts: 599
    • View Profile
    • Blog
    • Email
Re: Sprite Efficiency
« Reply #36 on: February 06, 2013, 11:50:16 am »
Well, I'm not really sure about that. Right now I just use 276 * 15 tiles map. This is the size of first Super Mario Bros 3. level(excluding vectical scrolling). I think my maps will be even bigger
Tomb Painter, Re:creation dev (abandoned, doing other things) | edw.is | @EliasDaler

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Sprite Efficiency
« Reply #37 on: February 06, 2013, 12:04:53 pm »
So, what's the problem with the quadtree?
Laurent Gomila - SFML developer

Elias Daler

  • Hero Member
  • *****
  • Posts: 599
    • View Profile
    • Blog
    • Email
Re: Sprite Efficiency
« Reply #38 on: February 06, 2013, 12:14:28 pm »
I don't see a problem, I just don't really know how to use them in my situation :)
Tomb Painter, Re:creation dev (abandoned, doing other things) | edw.is | @EliasDaler

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Sprite Efficiency
« Reply #39 on: February 06, 2013, 12:16:42 pm »
Well... then read some tutorials ;)

And don't hesitate to come back if you have more specific problems with it.
Laurent Gomila - SFML developer

Elias Daler

  • Hero Member
  • *****
  • Posts: 599
    • View Profile
    • Blog
    • Email
Re: Sprite Efficiency
« Reply #40 on: February 06, 2013, 12:31:47 pm »
Well, okay.  ;D

It's nice to see such a nice community on forums. Thanks, Laurent.  ;)
Tomb Painter, Re:creation dev (abandoned, doing other things) | edw.is | @EliasDaler

albert_lazaro

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • Email
Re: Sprite Efficiency
« Reply #41 on: May 03, 2021, 07:44:10 pm »
Hi,

it must be strange that an old post receives a new comment. I'm designing the tilemap for the game and I wanted to know what did you implement at the end: Did you used a tileset based on an array of sprites or did you build it with a VertexArray?