2
« on: March 13, 2017, 07:58:41 pm »
Hey,
I'm learning C++ in school(I already know i/o, decision making, loops, arrays, structs, strings, and functions), but I wanted to go a little far and learn how to create 2d graphics, I found SFML and it's going fine.
I'm trying to replicate a Space Invaders game using this video(it's a long video, you don't need to watch), but it is in JavaScript so I'm translating it to C++. But I'm stuck creating the aliens (shapes), because I don't know how to create an array of them. Do I make a struct and each time I call alien.show() it creates a new one, or should I create them outside the struct and then make it appear (by setting its position)?
Sorry if this kind of question appears here very often, or I did not explain myself very good but I'm new to the forum and English is not my main language.
Any help appreciated!