Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Tips on where to start.

A topic by Darren Kearney created Nov 04, 2017 Views: 1,005 Replies: 19
Viewing posts 1 to 10
(1 edit)

Hey folks,

I'm interested in the jam however I'm not sure where to start.

Do fantasy consoles need to be programmed in system level languages like C or C++ or can I use a scripting language like Python or Lua?
Please share some links if possible, I'd like other people to find this useful too!

Thanks :D

You probably want to program it in a compiled language rather than an interpreted one (I know Python isn't technically interpreted but w/e). That's not to say it's impossible (depending on what you want to do, you could afford the relatively slow nature of interpreted languages) but it's not the smartest idea. If you don't want to have to fiddle with memory management or pointers but still need a compiled language, you can try C#. It won't get you the performance that C/C++ will, but I've found that it's close enough if you're not doing anything extraordinarily resource intensive.

C# and Java have nearly the same performance profile. It may be efficient if you were to use Java for multi-OS production (and easy to use OpenGL bindings). C# can be multi-OS with Mono, but as it'd probably not hurt you any more to use Java, that's what I'd suggest.

I studied programming language performances a while back. Java uses a lot of ram, but it's CPU performance is about 5x faster than Python, and just about 2x slower than C.

Thank you for your informative post!

It's entirely possible to build an FC in an interpreted language... it just depends on what you are after. I think the two biggest considerations are the graphical capabilities (i.e. if you want to draw any sort of sprites) and platforms. Python & Lua both have these down. 

Cool.

I went down a well of research and came across a notion of using a scripting language to write one initially, because that's what I'm most familiar with (python).

If I write it in a modular way then later I can rewrite parts in a systems language (for some reason Rust has peaked my interest there) or include some C libraries if that's allowed in the rules.

I already feel like this undertaking will improve my programming skills by a whole level. D:

(+1)

Rust is a wonderful systems programming language. I'm going to use it entirely to do this jam :)

(1 edit)

I plan to use Clojure/MAL. Sandboxed interpreter has only 100 loc. It will be probably slow as hell, but why not try?

I have been looking into the source code of some fantasy consoles and even though they are a good learning resource, I feel I'm missing something.

Aren't there any blog posts or academic studies to help us start ?

I'm new here but in the middle of making my console. Generally speaking you have to choose your host system, i.e. language, libraries for graphics, audio, etc. And you have to decide what is your console language/interpreter/simulator you want to give for creators. All interacions with PC (like drawing on canvas, playing sound, read input, write to output) you have to code on your host. Host should be able to evaluate console code and gather results/interactions. Eg. calling `spr(...)` in your console should call host function you write. The same for executing init, draw loop, etc.

Examples: 

  • C/C++ as host with Lua as console lang is great combo, because Lua is designed to interoperate with C and has it's own VM to separate from host (pico8, tic80, neko8).
  •  Lua with Love as host + Lua for console is great as well (liko12).
  • C with processor simulator + ASM (zenith80).
  • My choice is Clojure as host + MAL subset (make-a-lisp) as console.
  • For JVM (Java) you can probably choose groovy, python, ruby as console language.

The most important thing is sandboxing console language, ie separate from host functions. You don't want to allow anyone to access PC directly.

Amazing response, thank you for taking the time :)

One thing I still can't grasp is the concept of creating a "VM"... adding virtual components like BIOS, RAM, GPU. That's what makes me excited with creating a FC is implementing restrictions like RAM scarcity or visual limitations.

I'm really liking the LIKO-12 way of doing things, I have way to much to learn :P

(2 edits)

RAM/visual limitations are quite easy to make in my opinion. 8-bit computers like ZX Spectrum had RAM bound to screen, settings, code etc. Implementation could be simulated by byte array. Console code puts data there, host code interprets it. You can have part of code which reads specific range of array data as pixels and display it on screen (GPU), the other range is sound (Sound chip), the other sprites, palette, etc. ROM can be set of sprites, letters, maybe some global parameters like palette.  I think the hardest restriction is console language and sandboxing

(+1)

I never thought about it in that way, but it makes perfect sense. 

Thank you for the tips and good luck on your FC :D

There are already a list of Fantasy Consoles given on the jam page...

Submitted

Did you read the post before posting? That’s not what he is asking about

(2 edits)

Yes the first answer was

>I'm interested in the jam however I'm not sure where to start.

And then ask how to make a fantasy console.

But the FC jam is not about making fantasy console, but about making something with existing fantasy console. This could be confusing for other people too.

Submitted(+1)

This isn't FC Jam. This is FC Dev Jam. This jam IS about making a fantasy console.

(1 edit)

OOps, so I didn't read well, the topic, sorry for the noise.

No worries! I'm glad the confusion has been sorted. Thanks for stopping by!

Well itch.io is a nice place. :)

(2 edits)

So I've only just found time enough to sit down and get stuck in. The information here is great, thanks to everyone for chiming in! :D

From my limited reading I have managed to grasp the scope of the project; programming a fantasy console is basically exactly the same as programming an emulator. The only difference I can tell is that you are also writing the programming manual for the fantasy console at the same time. Great!

So for anyone completely new to this idea (like me) it would be a Good Idea to have a look at some emulator tutorials to get a grasp of what is happening.
Here's a bunch of links:

Emulators

Fantasy Consoles:

https://github.com/pixelvision8 - open source, so you can have a look-see

If you have a link to a decent article or helpful resource please drop it here, as it may be useful for more than just myself! :D