#how to make basic graphics

59 messages · Page 1 of 1 (latest)

solemn kite
#

clang++

bold violetBOT
#

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.

compact ether
#

Eerrr?
Can you be any less specific?

#

With that vague of a question the answer would be: Don't use C++

solemn kite
#

i mena like litterally just draw something to the screen so that i can make pong

compact ether
#

For what OS?

solemn kite
#

mac

compact ether
#

Simply setting it up on e.g. Python is super easy compared to C++, let alone the coding.

solemn kite
#

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

compact ether
#

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).

solemn kite
#

so ur basically saying u dont know a libary

#

also i can write clean code

compact ether
#

Yes, and that I wouldn't recommend a game with a GUI to get into C++

solemn kite
#

it 2 rectabgles and a circle

#

how hard could it be (jk)

#

but also not

compact ether
#

Aaah, but that's apparently Windows only :/

solemn kite
#

yh cz graphics.h is windows only

#

it think it outdated now

#

even for windows

compact ether
#

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

solemn kite
#

yh

proven aspen
#

@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"

proven aspen
#

what do you mean by that?

solemn kite
#

oh

#

there

proven aspen
#

so 0 experience?

#

then what other languages do you know?

solemn kite
#

pyhton

proven aspen
#

how far have you gone with python?

solemn kite
#

what u call far

proven aspen
#

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

solemn kite
#

i made like an ai with like minimal libaries cz i count be bothered to learn pandas or like numpy

proven aspen
#

any graphics related stuff? Object Oriented Programming? data structures?

solemn kite
#

i have done some oop and datastrucs

proven aspen
#

if you have 0 experience with C++, but you already know how to code stuff, at least basic stuff

solemn kite
#

yh

proven aspen
solemn kite
#

ty

proven aspen
#

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)

solemn kite
#

a pointer like just a variable that points to were some data is stored in memory right

proven aspen
#

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

solemn kite
#

k ty cyl

#

!solved

bold violetBOT
#

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