Hi everyone reading!,
Since this is my first post let me start by introducing myself real quick. My name is Will and I am a pretty new dad to two awesome little baby boys. I've spent my entire life just about on a computer whether it be playing PC games, binging YouTube Videos or tinkering with topics concerning computer science. I'm completely self taught when it comes to programming & their respective languages. I've spent more time with AutoIt than anything starting off with macros and working my way up to GUI programming with the built in functions and recently with Windows API. I've dabbled in both JAVA and C++ but have settled on C because i've always wanted to create my own 2D rpg. Now this is where my question comes in...
I'm learning how to use SDL 2 right now and so far it's easy enough to create a window/renderer and load images to the screen as well as introducing keyboard input. I'm wandering 1) What would the best option be for programming with 2D and even 3D graphics in the future. 2) Is the a native library that handles graphics and 3) How difficult is it to create your own?
Thank you guys for your time reading/answering my novice question. Have a wonderful weekend!!!
(I have done some research of my own and found libraries made for C++ Graphics Programming but my understanding is limited and I always enjoy hearing what others have to say)
TBH, I would suggest you settle on C++ rather than C.
C has very few exclusive domains that C++ can't compete with, and graphics programming on a desktop isn't one of them.
Plus, if you're not totally comfortable with C, it will take a long time (months) to get to grips with all the micro management you have to do, and it sucks time away from you getting what you want done.
Hey Salem C,
First, thank you for the swift and friendly reply! This is my first post on this forum and you've given me hope that it isn't filled with too many snobby, narcissistic members that look down on or attempt to drive away newcomers.
Anyhow, I am glad to hear your opinion on both my good decision on C++ & SDL as well as your warning to stay away from C due to the micromanaging requirements.
Not to ask you too many questions but I'm going to ask you a few questions! lol.
1) Is SDL the more popular option for 2D and 3D Graphics Programming? Is there one the majority prefers more?
2) Do you or Have you done any Graphic Programming? If so, was it with C++ & SDL or did you prefer another Language/Library?
3) Do you know if it's better (more efficient/less strain) in a 2D Top Down Game Map to use the same Texture, let's say for an Indoor Map that has a border of Wall Textures, for each side of the room by rotating the Wall Texture depending on the side it's on...
|| OR ||
Just make a Texture for each individual side and load/draw them all in?
I would assume it would save RAM but use more CPU to rotate the Textures and
have the reverse effect of using more RAM but save the CPU if you create/load/draw a Texture for each side.
Sorry if this is an inappropriate reply or post in general. I'm not big on using Forums for actually posting unless it's a question I can actually answer. If you would want to chat more on random programming topics, computer science, PC gaming or Youtube/Meme binging just let me know and what you'd like to use to chat. I have Discord if that helps! lol.
Again, thank you for your reply Salem. I love getting other people's genuine feedback and perspectives especially because it's the leading cause of my epiphanies and educational advancements.
GPU processing to do simple things like rotate/flip/mirror/etc is insignificant. Graphics card memory is scarce for large games. Prefer to reuse textures as much as you can, but overdoing that will eventually lead to a cookie cutter loop or meta patterns that are not pleasing to look at, and even flip/rotate/etc tricks only get you so far. You need a mix of reuse and multiples, but favor reuse while watching out for bad effects of it as you build your world.