Autor Tema: Raycasting without .dll's  (Leído 20376 veces)

theosk

  • Newbie
  • *
  • Mensajes: 49
  • Karma: 3
    • molamucho
Re:Raycasting without .dll's
« Respuesta #30 en: Diciembre 31, 2012, 12:02:15 am »
I don't know if this issue was addressed in bennu:
There are some lines like this in my code:
Código: [Seleccionar]
if(rayDirX==0.0)rayDirX=0.00000000001;end
that's because floating numbers should allow division by zero in c++ (there's an IEEE code for infinite), but fenix segfaulted anyway, so I had to do that in order to avoid divisions by zero. Sorry for the massive offtopic, but I didn't feel like a new thread was worth for this alone :/

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12624
  • Karma: 371
Re:Raycasting without .dll's
« Respuesta #31 en: Diciembre 31, 2012, 12:03:44 am »
float divisions by zero in bennugd give you infinite....
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

theosk

  • Newbie
  • *
  • Mensajes: 49
  • Karma: 3
    • molamucho
Re:Raycasting without .dll's
« Respuesta #32 en: Diciembre 31, 2012, 12:09:09 am »
Woah, that was fast. Thanks, then the code should run without all these lines now :)

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12624
  • Karma: 371
Re:Raycasting without .dll's
« Respuesta #33 en: Diciembre 31, 2012, 12:58:03 am »
Woah, that was fast. Thanks, then the code should run without all these lines now :)

well, without these lines, in 320x200, without scale2x and replace all fabs by abs... it give me to up 110-180fps... depend what need render on screen... oh, I remove the draws functions too.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

theosk

  • Newbie
  • *
  • Mensajes: 49
  • Karma: 3
    • molamucho
Re:Raycasting without .dll's
« Respuesta #34 en: Diciembre 31, 2012, 01:27:29 am »
Well, this code was written in fenix some time ago so I had to do REALLY weird things to avoid some old bugs. (abs wasn't even working properly with floats back then... tough times). The drawing functions were meant for higher resolutions, where small sized tile slices became less than 1px wide and wouldn't draw and far away walls became invisible, so fog-like brown lines would fill these gaps. That's why there are various sized tile slices, not the right thing to do, but the way it would work fast enough back then.

Over 100 fps is a huge boost, for sure! I should update myself regarding the current divlike scene, I'm glad to see things are moving forward over here.

l1nk3rn3l

  • Hero Member
  • *****
  • Mensajes: 1985
  • Karma: 253
Re:Raycasting without .dll's
« Respuesta #35 en: Enero 07, 2013, 12:52:35 am »
THX...

MisterN

  • Hero Member
  • *****
  • Mensajes: 650
  • Karma: 4
Re:Raycasting without .dll's
« Respuesta #36 en: Enero 08, 2013, 01:10:28 am »
so can you post the updated code?
werg

Imerion

  • Jr. Member
  • **
  • Mensajes: 69
  • Karma: 3
Re:Raycasting without .dll's
« Respuesta #37 en: Febrero 21, 2013, 04:10:54 pm »
Yep, would be nice to see the updated source! :)
Try my games : Neotron Games