SAF: Minimalist "Fantasy Console" + Games

SAF: Minimalist "Fantasy Console" + Games

Postby drummyfish » 21 Oct 2021, 18:18

Hello, I've just kinda bumped one of my projects to 1.0ish version so let me share it:

SAF: Minimal abstract interface for simple games

https://codeberg.org/drummyfish/SAF

Image Image Image Image Image

Image

SAF (SmallAbstractFish) wants to provide you with a distilled joy of simple nostalgic game programming with as little friction and frustration as possible (no complicated APIs, no bloat, no legal conditions, ...), while also supporting creation of ethical games that can run even on very simple devices, games that people can easily study, share and improve without frustration or fear, games that will survive forever, games that are here for you and not any corporation's profit. SAF follows and promotes the philosophy of peace, social anarchy, free software and mainly of "less is more", which is related to technology minimalism, suckless, Unix and KISS philosophies. SAF is taking a step back to the times at which technology was still sane, so that we can step forward in a new, better direction.

It's all CC0, public domain of course! No conditions, just take it, use it, improve it, sell it, ...

Basically it's a tiny engine, a library, you can also see it as a fantasy console or as a "tiny suckless SDL". I made it because I often want to create a very simple game but am forced to make myself dependent on some huge bloated engine or a specific library (e.g. every open console has its own library which makes porting painful). Now I can simply make a game without any friction, it only depends on a single file (SAF.h) and I can immediately run the game on Linux, Windows, in browser, on Pokitto, or on my phone. It also substitutes an emulator for platforms that don't have it (many open consoles lack it). It's extremely low demanding on hardware, one of my friends even ported it to a calculator.

It is purposefully a very simple virtual device:

- 64x64 display, 256 colors, 25 FPS
- arrow buttons + A, B, C
- 4 sound effects
- 32 bytes of persistent memory for saves

That's basically it. You simply include saf.h and write a game, all basic function are available to you: shape drawing, image drawing, text drawing, sin/cos/sqrt functions etc. Main loop, CLI argument parsing and stuff like that is automatically handled, you don't care about it. Once you write the game you can simply compile it on given platform as you would compile any other program for that platform.

Now for testing I've written two small games for SAF:

- MicroTD (https://drummyfish.itch.io/microtd) (port of my Arduboy game), PLAY IN BROWSER
- Minigames (simple games for testing the engine) PLAY IN BROWSER

I'll be very glad if you write a game and share it. When there's enough games I'll probably create a website for downloading and playing them.

I also have some additional ideas like a comfy web IDE or optional extensions for things like multiplayer or music. We'll see about these in the future. You'll find more info about everything in the readme.

Thanks for your attention, tell me what you think :)
socialist anarcho-pacifist
Abolish all IP laws. Use CC0. Let's write less retarded software.
http://www.tastyfish.cz
User avatar
drummyfish
 
Posts: 416
Joined: 29 Jul 2018, 20:30
Location: Moravia

Re: SAF: Minimalist "Fantasy Console" + Games

Postby mdtrooper » 25 Nov 2021, 21:48

Woah it is awesome. I don't know your last work because normally I read the new forum. It remembers me to fantasy consoles like Pico8 (close source) and others.
And I have a Patreon in https://www.patreon.com/migueldedios.
User avatar
mdtrooper
 
Posts: 182
Joined: 26 Jul 2012, 13:24
Location: Spain

Re: SAF: Minimalist "Fantasy Console" + Games

Postby jdc » Today, 15:54

Nice i was looking for something like this for my project The Box so that we can start working on the graphical part. Found similar projects people where using but not giving support or tutorials a bit hard to work width that.

Something that I found useful and at this stage din't find; only in turbo C functionality; think not working on just C. Like a library that allow to draw to absolute positioning, so that we can do things like in CSS. It is really nice to have. (Don't know if you have didn't read all the code...)

- absolute
- left top 10 px
- div 100 px
- menu

etc...
jdc
 
Posts: 127
Joined: 29 Jun 2017, 16:48

Re: SAF: Minimalist "Fantasy Console" + Games

Postby bzt » Today, 20:39

jdc {l Wrote}:Something that I found useful and at this stage din't find; only in turbo C functionality; think not working on just C.
I'm not entirely sure what you mean. C language can't handle graphics itself, and Turbo C has no such functionality either. Are you referring to the BGI graphics library that was shipped along? SAF is similar to that, but much much more advanced and more featureful.

jdc {l Wrote}:Like a library that allow to draw to absolute positioning
BTW, I'm pretty sure SAF uses absolute positions, like in the hello.c example in the readme:
{l Code}: {l Select All Code}
  SAF_drawText(4,15,"HELLO!",
    SAF_frame() & 0x04 ? SAF_COLOR_RED : SAF_COLOR_BLACK,2);
Here 4 and 15 are absolute coordinates on the screen.

Cheers,
bzt
User avatar
bzt
 
Posts: 129
Joined: 23 May 2021, 21:46

Who is online

Users browsing this forum: No registered users and 1 guest