Results 1 to 7 of 7

Thread: RejKaster - a raycasting example.

  1. #1

    Question RejKaster - a raycasting example.

    Hello.
    This is my first project with SDL. I tried to port it to Dos with standard graph library,
    but I have some optimization problems. Any suggestions?

    https://github.com/pan-te/RejKaster3

    Screenshot_2017-05-30_16-27-11.jpgScreenshot_2017-05-30_16-26-51.jpg
    Last edited by pan-te; 30-05-2017 at 02:27 PM. Reason: Screenshots added

  2. #2
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    287
    Compiled it fine on Fedora 25 x64, but when you run it and it asks for level map, I enter test.map and it crashes with runtime error 100.
    Existence is pain

  3. #3
    Quote Originally Posted by de_jean_7777 View Post
    Compiled it fine on Fedora 25 x64, but when you run it and it asks for level map, I enter test.map and it crashes with runtime error 100.
    Hmm... interesting. I can't reproduce this error, but it looks like problem with file handling.

  4. #4
    I've just created some workaround- map is hard-coded with engine. It's branch called nomapread.
    https://github.com/pan-te/RejKaster3/tree/nomapread
    Last edited by pan-te; 26-05-2017 at 02:00 PM.

  5. #5
    The numbers in test.map are shortints (2 byte), you are reading it as a file of integer - integer is 4 bytes on 32bit systems.

    Edit:
    It crashes on division by zero in rendering on this line: draw_yoffset2:= (halfheight*12/ray_draw)-1;
    Also, a lot of out of bounds access on map array -> crashes a lot.
    Otherwise it runs, Freepascal 3.0 64bit at about 50% cpu load.

    btw.probably include the SDL units in the sources as well?
    Last edited by imcold; 26-05-2017 at 08:09 PM.

  6. #6
    Quote Originally Posted by imcold View Post
    The numbers in test.map are shortints (2 byte), you are reading it as a file of integer - integer is 4 bytes on 32bit systems.

    Edit:
    It crashes on division by zero in rendering on this line: draw_yoffset2:= (halfheight*12/ray_draw)-1;
    Also, a lot of out of bounds access on map array -> crashes a lot.
    Otherwise it runs, Freepascal 3.0 64bit at about 50% cpu load.

    btw.probably include the SDL units in the sources as well?
    Thanks. I'll repair it with next commit.

  7. #7
    You have any screenshots etc?

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
  •