Coder Social home page Coder Social logo

glouw / littlewolf Goto Github PK

View Code? Open in Web Editor NEW
792.0 21.0 47.0 1.59 MB

A tiny software graphics and game engine

Home Page: http://glouw.com/2018/03/11/littlewolf.html

License: MIT License

Makefile 1.63% C 98.37%
raycaster ray casting doom wolfenstein graphics engine

littlewolf's People

Contributors

aokiahishatsu avatar glouw avatar stuartraetaylor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

littlewolf's Issues

How to build on Windows?

I was trying to run makefile and I got an error that says;

gcc -std=c99 -Wall -Wextra -pedantic -Ofast -flto -march=native -lm -lSDL2 main.c -o littlewolf
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:12: all] Error 1

Any help would be appreciated. Thanks.

SDL2 vs SDL2-dev

Hi, in the README it sais both SDL2 and SDL2dev should work.

I had libsdl2-2.0-0 installed but it did not work so i installed sdl2-dev and it worked.

Building on Ubuntu

I'm attempting to build and run on Ubuntu Server 19.04 with libsdl2-dev and having problems -

Running make returns errors for various math and SDL2 references.

$ make && ./littlewolf
gcc -std=c99 -Wall -Wextra -pedantic -Ofast -flto -march=native -lm -lSDL2 main.c -o littlewolf
/usr/bin/ld: /tmp/cc3tV3Ld.ltrans0.ltrans.o: in function `main':
<artificial>:(.text.startup+0x2a): undefined reference to `SDL_Init'
/usr/bin/ld: <artificial>:(.text.startup+0x51): undefined reference to `SDL_CreateWindow'
/usr/bin/ld: <artificial>:(.text.startup+0x68): undefined reference to `SDL_CreateRenderer'
/usr/bin/ld: <artificial>:(.text.startup+0xa5): undefined reference to `SDL_CreateTexture'
/usr/bin/ld: <artificial>:(.text.startup+0x126): undefined reference to `SDL_PollEvent'
/usr/bin/ld: <artificial>:(.text.startup+0x159): undefined reference to `SDL_GetKeyboardState'
/usr/bin/ld: <artificial>:(.text.startup+0x19f): undefined reference to `cosf'
/usr/bin/ld: <artificial>:(.text.startup+0x1b0): undefined reference to `sinf'
/usr/bin/ld: <artificial>:(.text.startup+0x27c): undefined reference to `SDL_GetTicks'
/usr/bin/ld: <artificial>:(.text.startup+0x2e1): undefined reference to `SDL_LockTexture'
/usr/bin/ld: <artificial>:(.text.startup+0x32b): undefined reference to `sinf'
/usr/bin/ld: <artificial>:(.text.startup+0x757): undefined reference to `SDL_UnlockTexture'
/usr/bin/ld: <artificial>:(.text.startup+0x7a0): undefined reference to `SDL_RenderCopyEx'
/usr/bin/ld: <artificial>:(.text.startup+0x7a8): undefined reference to `SDL_RenderPresent'
/usr/bin/ld: <artificial>:(.text.startup+0x7ad): undefined reference to `SDL_GetTicks'
/usr/bin/ld: <artificial>:(.text.startup+0x7c3): undefined reference to `SDL_Delay'
/usr/bin/ld: <artificial>:(.text.startup+0x8f7): undefined reference to `sincosf'
/usr/bin/ld: <artificial>:(.text.startup+0xabf): undefined reference to `SDL_GetError'
collect2: error: ld returned 1 exit status
make: *** [Makefile:12: all] Error 1

For some reason changing the order of the arguments slightly allows it to compile, but it fails at runtime. SDL_CreateWindow appears to return NULL -

$ gcc -std=c99 -Wall -Wextra -pedantic -Ofast -flto -march=native main.c -o littlewolf -lm -lSDL2 && ./littlewolf
Invalid renderer

Any advice?

Thanks!

Interested in an SDL 1.2 version?

Since this engine is pretty uncomplicated I ported it to Power Mac under SDL 1.2 (now you can compile -DSDL1 to get an SDL 1.2 version, assuming you have SDLMain.m). I can do this as a PR if you're interested; if not, I'll do this in a repository of my own.

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.