Giter Club home page Giter Club logo

raycaster-sdl's Issues

Feature Request - Teaching Material

Hello @drdanick ,

I have been tinkering with and learning this raycaster as I find the code very clean, well organized. I also find it unique compared to other examples I have seen so I have run into some difficulty understanding parts of it. I find raycasters interesting and would like to learn more about them. I have made minor adjustments for fun like adding mouse look and custom textures. Adding ceiling and floor textures is something I am curious to try out.

The README indicates teaching material existed but you did not have permission to upload it. Has this situation changed or are you able to provide any further documentation on the raycaster?

Thanks!

Compilling error

I tried to compile using the command in README:
gcc -lm -lSDL2 -O2 src/*.c -o raycaster
but didn't work and this was the following error:

/usr/bin/ld: /tmp/ccGCsF4w.o: na função "consumeSDLEvents":
main.c:(.text+0x58): referência não definida para "SDL_PollEvent"
/usr/bin/ld: main.c:(.text+0x9d): referência não definida para "SDL_PollEvent"
/usr/bin/ld: /tmp/ccGCsF4w.o: na função "runGame":
main.c:(.text+0x2be): referência não definida para "SDL_GetTicks"
/usr/bin/ld: main.c:(.text+0x2e6): referência não definida para "SDL_Delay"
/usr/bin/ld: main.c:(.text+0x302): referência não definida para "SDL_GetTicks"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "gfxSetError":
gfx.c:(.text+0x1e): referência não definida para "SDL_GetError"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "initGFX":
gfx.c:(.text+0xcf): referência não definida para "SDL_Init"
/usr/bin/ld: gfx.c:(.text+0xfc): referência não definida para "SDL_CreateWindow"
/usr/bin/ld: gfx.c:(.text+0x115): referência não definida para "SDL_CreateRenderer"
/usr/bin/ld: gfx.c:(.text+0x13b): referência não definida para "SDL_SetWindowTitle"
/usr/bin/ld: gfx.c:(.text+0x15c): referência não definida para "SDL_SetRenderDrawColor"
/usr/bin/ld: gfx.c:(.text+0x168): referência não definida para "SDL_RenderClear"
/usr/bin/ld: gfx.c:(.text+0x174): referência não definida para "SDL_RenderPresent"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "createTexture":
gfx.c:(.text+0x240): referência não definida para "SDL_CreateTexture"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "destroyTexture":
gfx.c:(.text+0x33c): referência não definida para "SDL_DestroyTexture"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "displayFullscreenTexture":
gfx.c:(.text+0x3e5): referência não definida para "SDL_UpdateTexture"
/usr/bin/ld: gfx.c:(.text+0x3f1): referência não definida para "SDL_RenderClear"
/usr/bin/ld: gfx.c:(.text+0x405): referência não definida para "SDL_RenderCopy"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "destroyGFX":
gfx.c:(.text+0x473): referência não definida para "SDL_DestroyRenderer"
/usr/bin/ld: gfx.c:(.text+0x48a): referência não definida para "SDL_DestroyWindow"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "fillRect":
gfx.c:(.text+0x552): referência não definida para "SDL_RenderFillRect"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "drawRect":
gfx.c:(.text+0x5a2): referência não definida para "SDL_RenderDrawRect"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "displayFullscreenTexture":
gfx.c:(.text+0x412): referência não definida para "SDL_RenderPresent"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "destroyGFX":
gfx.c:(.text+0x49e): referência não definida para "SDL_Quit"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "setDrawColor":
gfx.c:(.text+0x4ce): referência não definida para "SDL_SetRenderDrawColor"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "drawLine":
gfx.c:(.text+0x512): referência não definida para "SDL_RenderDrawLine"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "presentRenderer":
gfx.c:(.text+0x5cc): referência não definida para "SDL_RenderPresent"
/usr/bin/ld: /tmp/cc0jcw3x.o: na função "clearRenderer":
gfx.c:(.text+0x5dc): referência não definida para "SDL_RenderClear"
/usr/bin/ld: /tmp/ccTSfJHu.o: na função "normalizeVector":
linalg.c:(.text+0x11d): referência não definida para "sqrtf"
/usr/bin/ld: /tmp/ccTSfJHu.o: na função "homogeneousVectorMagnitude":
linalg.c:(.text+0x1e8): referência não definida para "sqrtf"
/usr/bin/ld: /tmp/cc5qv6jw.o: na função "renderOverheadMap":
map.c:(.text+0x335): referência não definida para "SDL_Delay"
/usr/bin/ld: /tmp/ccYyQlax.o: na função "renderProjectedScene":
renderer.c:(.text+0x4c8): referência não definida para "SDL_Delay"
collect2: error: ld returned 1 exit status

referência não definida = undefined reference

so, I tried this command:
gcc -O2 src/*.c -lm -lSDL2 -o raycaster
and now it works

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.