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

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado theosk

  • Newbie
  • *
  • Mensajes: 49
  • Karma: 3
  • Sexo: Masculino
    • Ver Perfil
    • molamucho
Re:Raycasting without .dll's
« Respuesta #30 en: Diciembre 30, 2012, 04:02:15 pm »
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 :/

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12457
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re:Raycasting without .dll's
« Respuesta #31 en: Diciembre 30, 2012, 04:03:44 pm »
float divisions by zero in bennugd give you infinite....
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado theosk

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

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12457
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re:Raycasting without .dll's
« Respuesta #33 en: Diciembre 30, 2012, 04:58:03 pm »
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

Desconectado theosk

  • Newbie
  • *
  • Mensajes: 49
  • Karma: 3
  • Sexo: Masculino
    • Ver Perfil
    • molamucho
Re:Raycasting without .dll's
« Respuesta #34 en: Diciembre 30, 2012, 05:27:29 pm »
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.

Conectado l1nk3rn3l

  • Hero Member
  • *****
  • Mensajes: 1887
  • Karma: 252
  • Sexo: Masculino
    • Ver Perfil
Re:Raycasting without .dll's
« Respuesta #35 en: Enero 06, 2013, 04:52:35 pm »
THX...

Desconectado MisterN

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

Desconectado Imerion

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