Page 5 of 5 FirstFirst ... 345
Results 41 to 43 of 43

Thread: 2D using OpenGL

  1. #41

    2D using OpenGL

    [pascal]uses Classes
    ...
    Error: string;
    ...
    function LoadFromVrgFile(filename:string):TMySaveRecord;
    var
    myStream : TFileStream;
    i:integer;
    begin
    i := 0;
    Error:= '';
    while i < 20 do
    Try
    myStream:=TFileStream.Create(filename, fmOpenRead, fmShareDenyWrite);
    myStream.Read(Result, SizeOf(Result));
    myStream.Free;
    Exit;
    Except
    inc (i);
    Error:=(ExceptObject as Exception).Message;
    Sleep(100);
    End;
    end;[/pascal]

    ...as you can see, streams and exceptions are immensely more elegant that the pre-historic methods you employed.

  2. #42

    2D using OpenGL

    Hehe, I couldn't agree more.

    This "prehistoric" piece of code is based on something I got off the internet. I found some basic code and copy-pasted it in my program.

    The comments on it helped me understand what it does and I thought "don't mock it if it works". Well, appearantly it doesn't so you're right to mock it

    I'll implement this code next thursday.
    Have to do this report on the project for my school and I have to make sure that people with only basic programming knowledge can understand this.
    I even have to explain what a polygon is. Or a term like platform-game.

    I'll let you know how this code turns out, but I have this feeling it will work
    Huhuhu

  3. #43

    2D using OpenGL

    Sorry for testing this a week to late. Been ill and some other bugs came up. But I'm glad your sollution worked. I've tested this game with 5 people playing on the same network and it all performed without a single glitch.

    Don't know exactly why your sollution worked, but it did, and for that I'm grateful.

    I have one month left on this project now and just about every bug is fixed (some minor ones left, but I know how to solve those).

    I'll post some more screenshots when it's finished.
    Huhuhu

Page 5 of 5 FirstFirst ... 345

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •