Hackvision crashes when using for loop to move objects?

Store Forums Hackvision Game Development Hackvision crashes when using for loop to move objects?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #472
    ChubbRck
    Member

    Hi all, was wondering if anyone could tell me why what I’m doing is crashing my hackvision –

    I’m trying to move 5 ‘objects’ or pixels in this case using a for loop. This is being called in my main draw loop.


    for (int i=0; i < 6; i++){
    float static1RelSpeed = – playerSpeed;
    float static1RelSpeedInPixels = static1RelSpeed / 10;
    StaticYs = StaticYs – static1RelSpeed;
    tv.set_pixel(StaticXs
    , StaticYs, 1);
    }

    It’s the fourth line that is causing me problems, even if I set StaticYs to a static number, say 5.0. Is the loop just messing up with the hackvision’s timing? Any hints or tips to get around this would be much appreciated.

    Nick

    #1237
    Michael
    Keymaster

    Are you sure you allocated memory for the array you are trying to write to? If you stomp on memory, results are unpredictable….

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.