[WIP] Raycaster


(Michael Gollnick) #21

Wow what a great reference. He also has quite a good list of books to look at. Many thanks for this great hint!


(John D. Corrado) #22

I just wanted to give a quick update. I ported my Raycaster project to the Gamebuino META. This version includes all of the current features of the Arduboy version and texture mapped walls and doors.


(Pharap) #23

Does the Gamebuino version still use FixedPoints?


(John D. Corrado) #24

Yes, but I had to define FIXED_POINTS_NO_RANDOM to compile.


(John D. Corrado) #25

Here is a HEX file if anyone wants to see it run on an actual Arduboy. Let me know if you have any problems.


(Pharap) #26

In a future version (possibly v2.0.0, which is due soonā„¢) the random stuff is likely to either be disabled by default, removed or exiled to a separate header.

The random functions have been the single biggest headache of the entire library.
Every single ā€œit doesn’t work on platform Xā€ issue has involved the lack of random.

As far as I’m aware that change will only negatively affect @filmote’s 1943, but I’m planning to add something in v1.1.0 that should help to alleviate that.


#27

Looks great. Will you continue working on the Arduboy version like adding texture support?

A Wolfenstein game for Arduboy would be awesome.


(John D. Corrado) #28

I am sorry it took so long, but here is the source code. Feel free to use it as a base for a new project, to learn from, or to improve.


(Kevin) #29

Wow somehow I skipped this, it looks really good performance!


(Jean Charles Lebeau) #30

Yes good system. Now that you have share code, someone have to write the ā€˜target hit’ code to be able to have a good game with that (the lines of view in front of the player to know if the target will be hit by player if he shot or punch with a large zone just in front of him and ether a max distance or a smaller zone if the ennemi is farwer).
So the procedure should have some parameters (xplayer, yplayer, Angle, range max, dispersion ) and return -1 or code(s) of hitten thing(s).