Hello all,
I've been trying to make a program that would simulate star movement. The source is included, although I doubt anyone will want to go through the whole thing. The program pretty much works fine, except for one thing, that being that almost every single time it's run, it crashes. I couldn't find any reason for it; sometimes it would crash right away, sometimes in the first second, sometimes in the second second, and sometimes (albeit rarely) it would run without any problems, but it wouldn't work as it was supposed to. I managed to find out that the error is located when the program generates the values for "velX" and "velY"; usually they're fine, but from time to time on a completely random basis the value of one "object" goes completely wrong....you'll find out what I'm talking about when you try it out. I have no idea what's going on with it, so I hope one of you do :-). Oh, before I forget, I'm using CodeBlocks, so that means the MiniGW compiler.
While I'm at it, I also wanted to ask; as you can see, I had to use period signs and spaces to display the stars on the screen, which makes it very inelegant-looking and also limits the space. I was wondering, is there any way I can use single pixels for this job? I spent most of one day trying to find a solution; I tried SetPixel(), but when linking the compiler gave the error "Undefined reference to _SePixel@16". I tried installing SDL, which ended catastrophically, due to my inability to figure out how to install a library. I tried all the examples/links (except Alegro, which I think would end the same way SDL did) in this and other threads. I tried VGA. None of them worked. Any tips...?
Thanks in advance for any help,
G4B3