superjer / tinyc.games Goto Github PK
View Code? Open in Web Editor NEWTiny C games you can compile and run RIGHT NOW
Home Page: http://tinyc.games
License: MIT License
Tiny C games you can compile and run RIGHT NOW
Home Page: http://tinyc.games
License: MIT License
Hello, that's an amazing project! I'm learning SDL and searched a lot for a simple, cross-platform barebones SDL sample games made in C, that can be compiled in TCC and uses a permissive license (Such as MIT) yours were one of the few i found. :)
Do you have any plans to add sh scripts for WebAssembly/Android/IOS compilation? Or write/recommend a guide on how these can be done for this specific project? Thank you!
Hello,
I would like to know which version of the C standard your code is written for.
Is it ANSI C? C99? C11?
You can use pre-defined macro like __STDC__
or __STDC_VERSION__
.
For more information, see:
CStandard.c
, and CStandard.h
. Other files are available in the same directory.Best regards.
GLGS 4.60, arch linux, gcc 10.1.0.
It says 1st chunk generated, ready to start game
, and shows the window and I can see what's in it, but then it crashes with:
GL CALLBACK: ** GL ERROR ** type = 0x824c, severity = 0x9146, message = GL_INVALID_ENUM in glGetIntegerv(pname=GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX)
I can't seem to see where the error is with GDB.
Hi,
first of all, great project!
While playing around with it, I tried to upgrade the libs and the compiler to their most recent releases. SDL2-2.0.9 was no problem, but when replacing the original tcc with its current release, I encounter the following error when trying to run a game:
..\_win\tcc-x64\tcc.exe -DSDL_MAIN_HANDLED -I..\_win\SDL2-2.0.9\include -L..\_win\SDL2-2.0.9\lib\x64 -lSDL2 window.c -run main.c
In file included from window.c:6:
In file included from ../_win/SDL2-2.0.9/include/SDL.h:32:
In file included from ../_win/SDL2-2.0.9/include/SDL_main.h:25:
In file included from ../_win/SDL2-2.0.9/include/SDL_stdinc.h:31:
../_win/SDL2-2.0.9/include/SDL_config.h:68: error: incompatible redefinition of 'size_t'
SDL2-2.0.9 with the original tcc compiler is fine, so it's rather a compiler-related issue.
Have you encountered similar issues and do you by chance know a define that may fix it?
Thanks a lot,
Gerald
Hello,
I'm new to C and SDL and I'm trying to compile the example games on Windows 10 64-bit, but unfortunately, they're failing.
i've git cloned the tinyc.games folder and executed "run.windows" for all the games and they all fail, mostly with the below errors:
Am I doing something stupid?
Thanks for any advice!
C:\tinyc.games\zel>run-windows.bat
..\_win\tcc-x64\tcc.exe
The system cannot find the path specified.
tcc: error: undefined symbol 'SDL_SetRenderDrawColor'
tcc: error: undefined symbol 'SDL_RenderFillRect'
tcc: error: undefined symbol 'SDL_RenderCopy'
tcc: error: undefined symbol 'SDL_SetRenderDrawBlendMode'
tcc: error: undefined symbol 'SDL_RenderPresent'
tcc: error: undefined symbol 'SDL_PollEvent'
tcc: error: undefined symbol 'SDL_Delay'
tcc: error: undefined symbol 'SDL_Init'
tcc: error: undefined symbol 'SDL_CreateWindow'
tcc: error: undefined symbol 'SDL_CreateRenderer'
tcc: error: undefined symbol 'SDL_RWFromFile'
tcc: error: undefined symbol 'SDL_LoadBMP_RW'
tcc: error: undefined symbol 'SDL_SetColorKey'
tcc: error: undefined symbol 'SDL_CreateTextureFromSurface'
tcc: error: undefined symbol 'TTF_Init'
tcc: error: undefined symbol 'TTF_OpenFont'
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.