#how to make basic graphics
59 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
Eerrr?
Can you be any less specific?
With that vague of a question the answer would be: Don't use C++
i mena like litterally just draw something to the screen so that i can make pong
For what OS?
mac
Honestly another language like Python or JavaScript/Typescript with a respective graphics library would be much easier.
I honestly don't know what graphics libraries there are for C++ Mac.
Doing such a thing without a graphics library is basically impossible and these graphics libraries are basically always 3rd party libraries.
Simply setting it up on e.g. Python is super easy compared to C++, let alone the coding.
im doing it in c++ so i can learn c++ cz tbh i hate having little control of what actually is happening in python
and im nto going to shy away from it that easily
A game is a particularly bad way to get used to lower-level programming as for game development you almost always prefer readability over performance.
If you want to learn C++ and not just a graphics library (which is already something rather abstract) then I would recommend you to dabble with lower level stuff.
For example to get used to memory management you could try to implement your own version of a std::vector (for example for the underlying data array you can use a std::unique_ptr<T[]>).
Hint: Make sure to avoid copying the elements when resizing, but properly use std::move.
Then you can go and implement your own hashmap (make a chained one and one that uses open addressing).
Then look into trees. Start with the basic binary search tree, then try a more complex one, like e.g. an AVL tree or a R+-tree (R+ is better and easier to implement than R).
Yes, and that I wouldn't recommend a game with a GUI to get into C++
Actually yeah, you might be right.
https://dev.to/aryankoundal/computer-graphics-program-to-draw-graphics-objects-using-built-in-c-functions-2m1e
This looks pretty simple
Aaah, but that's apparently Windows only :/
I mean you could try to make it a console game, so then you don't need a GUI
But even if possible that's probably more annoying than easy to implement
yh
@solemn kite what is it that you are expecting exactly? what do you mean by Graphics? how much experience do you have with C++?
the easiest for someone understanding classes and polymoprhism would be SFML, easy to extend in functionality
older mainly for C would be SDL2, harder to grasp at first, library and extensions are split and maintained separetly from what I know but has many built in renderer types, uses structures so no polymorphism, and is full of global functions so it's easier to create your own framework with SDL as a "backend"
like 0
what do you mean by that?
pyhton
how far have you gone with python?
what u call far
how much experience do you have with it, what was your biggest project?
from what I remember python has some kind of pseudo classes
with self as first argument
i made like an ai with like minimal libaries cz i count be bothered to learn pandas or like numpy
any graphics related stuff? Object Oriented Programming? data structures?
i have done some oop and datastrucs
if you have 0 experience with C++, but you already know how to code stuff, at least basic stuff
yh
should be easy to go through this course:
https://www.learncpp.com/
ty
so you get at least to pointers and structures
best if to classes
with polymorphism
and then pick either SDL2 (without classes, must know basics, structures, unions, enums and functions and basic types)
a pointer like just a variable that points to were some data is stored in memory right
or SFML (all of that but also classes, inheritance and polymophism), this ones easier to grasp but you have to have more knowledge
ye ye, so you might soar through this C++ tutorial, do some projects along the way to make it all easier to remember, and if you have problems then just come back here
Thank you and let us know if you have any more questions!
This thread is now set to auto-hide after an hour of inactivity