Winter Novel

Winter Novel

25 ratings
Winter Novel - Technical Details
By DeXP
Some insider technical stuff
   
Award
Favorite
Favorited
Unfavorite
Intro
This info may be useful for advanced users or programmers. Some internal technical stuff, tricks, hacks etc. "How it was" or something like that.
3rd party
There some software was used:
  • CodeLite[www.codelite.org] as IDE
  • GCC[gcc.gnu.org] as compiler for all target OSes
  • Arch Linux[www.archlinux.org] and Windows 10 as development OSes
  • PabloDraw[picoe.ca] for dealing with ASCII images

Libraries:
  • Fontstash[github.com] for symbols rendering
  • DUMB[github.com] for playing music
  • SDL[libsdl.org] for Linux/MacOSX/Android (not for Windows)

That's all. Windows executable made on pure WinAPI and depends on nothing (Windows standard libraries only). There is no even standard C library in windows-dependencies list!
Cross-platform
The game made in pure C, renders via crossplatform OpenGL. But each OS have different codes for creating windows, handling input, playing sounds etc.

There are 2 backends for OS dependent stuff: WinAPI and SDL. WinAPI is suitable only for Windows, but resulting executable does not depend on any other libraries. Windows Debug version is a single executable, all-in-one. Steam-version needs steamapi.dll for achievements etc.

SDL is a standard Linux library but it is suitable for many OSes: Linux, Mac OS X, Android... even Windows! The size of the library is close to 1 MB. That's why Mac OS X version is 1 MB larger than Linux-one. The game does not use SDL addons like SDL_mixer, SDL_ttf or else. Only pure SDL. The font and music renderers already in the engine and completely cross platform.

The Mac OS X and Android binaries were cross-compiled in Linux. The Windows version can be compiled in Linux too, but it needs more testing as most popular OS in Steam.
Problems
Antiviruses were the biggest problem for Winter Novel. The game is super-small all-in-one executable, antiviruses hate it. There were some tricks from demoscene used.

First versions was compressed by UPX[upx.github.io]. The size was reduced up to 400%! 500kb vs. 2MB... But some antiviruses hate UPX too. (bloody-hell "hi" to Avira)

The executable has no icon. It's added by Steam, so end-user can skip that problem. But if you look at game's directory, you'll see the executable with standard rectangle icon. Why? Antiviruses... (bloody-hell "hi" to BitDefender)

Windows version have no ability to render the game both into native console and OpenGL window. (BitDefender again)

Some antiviruses were hating soundtracks. I just imported and exported it in another music software - the game is clean again. (ADA)
Features for advanced users
The game supports a lot of command-line options. It depends on OS. You can see the list with "-h" switch.

For example, the Japanese language is not released yet, but you can play first 6 days with "-l ja".

In Linux and Mac OS X you can use "-g" switch to render the game to your native console. Remember, Steam must be started from this console too.

Steam does not support Belarussian language, but it presented in the game: "-l by".
Outro
Thank you for reading this. I hope this "How it was" was interesting for you! =(^_^)=
5 Comments
ALGLGNI Nov 17, 2020 @ 12:04pm 
Весьма интересно. :HentaiGirlLinda_like:
DeXP  [author] Jul 11, 2020 @ 4:03am 
PabloDraw is not open source. I didn't used it a lot, but still.
Daydreaming Insomniac Jul 10, 2020 @ 8:26pm 
Nice to see how a game was made. Are all the tools FOSS?
DeXP  [author] Dec 24, 2016 @ 11:15pm 
Картами управляет стим. В админке можно выставить другой период выпадения карт. Но малое время поставлено осознано. Из-за небольшого процента возврата не хотелось бы мучить остальных игроков долгим выбиванием карт.
✚ Μικλος Dec 24, 2016 @ 3:33pm 
угум, было интересно^^
и вопрос: а карточки стим сам выдаёт, сама игра этим не управляет?
просто мне выпали все три штуки всего-то за 50 минут, что имхо является лазейкой, ведь если б я был мудaкoм то мог бы запросить (и получить) возврат средств
даёшь задержку в ~2 часа!