glouw / littlewolf Goto Github PK
View Code? Open in Web Editor NEWA tiny software graphics and game engine
Home Page: http://glouw.com/2018/03/11/littlewolf.html
License: MIT License
A tiny software graphics and game engine
Home Page: http://glouw.com/2018/03/11/littlewolf.html
License: MIT License
Just an ease of use suggestion. I found that using h and l is kind of uncomfortable. I think changing them to left and right would be a little better.
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.
Hi @glouw,
Is it possible to build littlewolf using Visual Studio 2015 or above?
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.
I get a seg fault when I try to run it: in color () at main.c:311
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!
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.
It would be great if littlewolf could map textures onto the walls, ceilings and floor.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.