Hi, I am playing around and trying to create a simple 2d game using OpenGL and C#. I am doing this for education so I am interested in getting small simple things to work by coding them by hand.
So far I am able to draw simple rectangles, apply portion of sprite sheet texture, and periodically update the portion of the texture that is used to give the illusion of animation.
I have 2 questions which are related:
- I have this sprite sheet with a given character. There are multiple animations: walk, attack, idle, etc.. The issue is that all spritesheets are 33 pixels tall but one of them is 34 pixels, and the difference is noticeable. How do I handle this? Do I resize the sheets offline? Do I resize them dynamically when I am loading assets for the game? Do I adjust the size of the OpenGL rectangle I am mapping them to based on the texture size?
- As a generalization of the first question, what is the typical technique when dealing with assets coming from different sources and potentially not matching perfectly in size? Do I need to edit them before using them, or should I process them dynamically as I am loading them?
Hope that makes sense and that's not too stupid as questions. If people have learning resources that match this level of knowledge and goal, please feel free to share.
Thanks in advance