Search found 7 matches

by Neithari
January 7th, 2018, 2:07 pm
Forum: Everything
Topic: Variable at construction not always updating
Replies: 18
Views: 8978

Re: Variable at construction not always updating

So UFO is added bugs are fixed and my game is like I want it :-) So I am finished with my first game :mrgreen: :mrgreen: :mrgreen: You can get the compiled Version here: https://www.dropbox.com/s/auct23b0rofvoeo/Space-Invaders.rar?dl=0 And here is my code: https://github.com/Neithari/Space-Invaders
by Neithari
January 6th, 2018, 9:24 pm
Forum: Everything
Topic: Variable at construction not always updating
Replies: 18
Views: 8978

Re: Variable at construction not always updating

If you aren't fully commited to SDL2, I would suggest SFML. I found it easier to use and it's in C++ instead of C. Most discussions I read have a general sdl2>sfml mentality. I saw a good presentation for sdl2 on YouTube and with all the good comments about it I made the decision for it. But maybe ...
by Neithari
January 5th, 2018, 11:13 pm
Forum: Everything
Topic: Variable at construction not always updating
Replies: 18
Views: 8978

Re: Variable at construction not always updating

Hi there! If I understand your problem, I think it happend due to that you only changed the values in the h file. If you then just build the project, because noting changed in the cpp file, the compiler does not make a new obj and does not link in a new exe, so the changes do not get into the game....
by Neithari
January 4th, 2018, 1:19 am
Forum: Everything
Topic: Variable at construction not always updating
Replies: 18
Views: 8978

Re: Variable at construction not always updating

in game.cpp constructor pAlien( new Alien( gfx, alienShotMax, alienShotChance, &alienSpace ) ) move this to the body of the constructor. or init alienSpace before in the constructor instead of the h file. I tried moving it to the body before it was a pointer. However now everything is working as ex...
by Neithari
January 4th, 2018, 12:57 am
Forum: Everything
Topic: Variable at construction not always updating
Replies: 18
Views: 8978

Re: Variable at construction not always updating

I don't see you ever changing alienSpace in gampe.cpp? it's also a const so you can't change it. So what do you mean it's not getting updated? When I am in release mode and I want to make chages to the alienSpace (now called playSpace) to realigne it for example I change a value and compile it but ...
by Neithari
January 3rd, 2018, 10:43 pm
Forum: Everything
Topic: Variable at construction not always updating
Replies: 18
Views: 8978

Re: Variable at construction not always updating

thats a good idea. I changed it but still the same behaviour. The variable does change only with rebuild solution and not with a normal compile. Could it be me sending the variable before it's initialization? Repo is updated to pointer now. Edit: I was in release, behavior is normal in debug. So tha...
by Neithari
January 3rd, 2018, 9:22 pm
Forum: Everything
Topic: Variable at construction not always updating
Replies: 18
Views: 8978

Variable at construction not always updating

Hello guys! this is my first post here after half a year of watching chillies videos. I made a Space Invaders clone and it's working pretty well i think. But when I added a background sprite and realigned my invader starting position I found a wired behaviour. I do set the invader starting position ...