(click to interact)
Alternatively titled "exciting adventures in doing trigonometry without CRT". Continue reading⚂ I can draw a variety of dinosaur-looking things.
(click to interact)
Alternatively titled "exciting adventures in doing trigonometry without CRT". Continue reading
Having been making native extensions for GameMaker for years, there is one thing that always bothered me: although the code is often minimal (some of my smaller extensions have less than 100 lines of code!), the DLLs still come out to 70..100KB OR have to depend on Microsoft Visual C++ Runtime Redistributable, which is non-preferable for games that should "just run".
Having finally figured it out, I decided to write a small post about the matter.
Continue readingIf you are developing a C++ application without use of standard library (be it a driver, shellcode, or just a tiny DLL), you might have noticed that this also means that you don't get to use the standard formatted output function. This is a post about getting around that through use of WinAPI.
Continue reading
While working on one of recent projects, I've stumbled upon few common issues that many meet - even if you are only targeting Windows in GameMaker: Studio, you cannot access files outside the game's AppData directory (not even in program directory). Neither you can order system to open a file, meaning no external "readmes" to be easily hooked up with game, nor portable configuration files, and some other limitations.
So I took an evening and made a simplistic DLL library to bring equivalents to some functions (sleep, execute_shell, non-sandboxed I/O) back for Windows target. Function list is as following:
As you may know, there are multiple ways to create a sleep\delay function in C++.
These may appeal more or less to you depending on system and libraries available.
The following short function uses functionality of time.h header, which makes it useful for cases when dos.h is missing and you do not want to include windows.h just for a single function.
void sleep(int ms) { clock_t target = clock() + ms; while (clock() < target) { } }