Hello,
I'm new to SFML and only have a year of experience with programming in general. I'd like to create a grid of sprites to make a graphical roguelike game. However, this is costly on resources, which led me to wanting to use Vertex and VertexArray. I have one large texture with all of my 40x40 sprite graphics. I would like to create a 20x12 grid of simple objects which store a position on this texture sheet, and then draw the whole grid every cycle. However, I don't understand how I would do this... since the vectors only offer position, color and texture position (What does this even do? What texture is it referring to?) I tried reading
this but it confused me. Surely there is a simple way to do what I want to do? I want to be able to call a function like "map[tileX][tileY].set(xOnSpriteSheet,yOnSpriteSheet)".
Thank you in advance for your help, I appreciate it.