Category Archives: Uncategorized

i_core

i_core-p8

 

This is the core engine of a language (‘I’) and its virtual machine (all of this in PICO-8).
You can extend this engine (see how _SHW or _CLS are implemented).
You can create synonyms for a simplier use (see _ADD and _+).

The programs must be writen in a line. Terms are separated by space.

The engine is stack based (like forth): ‘5 4 + .’ => shows 9

The operators + – * / and flr function are available.
The ‘#’ duplicates the last value (of the stack).

You can evaluate (5 + 4) * (3 + 2) with ‘5 4 + 3 2 + * .’ => 45

Create a sub function

:NAME <sequence of instructions> ;

‘:A 5 4 + ; :B 3 2 + ; A B * .’ => 45

You can call the sub function NAME with its NAME (see A and B in the sample).

Create SQUARE and evaluate 3^2:

‘:SQUARE # * ; 3 SQUARE .’ => 9

Conditional call

?NAME

If the last value in the stack isn’t zero it calls NAME else it goes to the next instruction.

This is usefull to create tests and loops:

‘:SA # . 1 – ; :LP SA # ?LP ; 5 LP 0 .’

Count down from 5 to 0 (then stop).

You can use variables:
>NAME (load value from stack)
<NAME (push value in the stack)

‘1 >A <A <A + .’ =>2

You can use many :EVAL call to enter your program (one line per call).
You can use as many i_core engines as you want at the same time (object).
You can execute the whole program (:EXEC) or run it :STEP by step.

:STATE returns 3 when done. You can restart with :STATE(0).

If you have read the description so far, you may have a question.
This sounds crazy… So, why?

I’m working on two games. In the first you have to build a program by stacking graphic items to draw on screen to replicate a drawing with the minimal amonth of items. In the second, some robots fight together using genetic algorithms to evolve (by sharing part of their own code to create new ones).

I think I can share this library and my interest in doing this.

jihem

VCT from PICO-8 to Monkey2

For the PICO-8 Jam#2, I have done a game : “VCT”. You can play it here or download the cartridge (below).

vct.p8

Now, I’m working on a enhanced version using Monkey2. The first step was the translation of the main methods :  _init, _update and  _draw. For this, I have made a basic version of the VCT “engine” (which uses vectors to  draw and animate) with pico-8. You can use left, right, up keys (or a gamepad) to test. The cartridge and explanations are available (or will be soon)  in picozine#5.

pz507

Then I started to write all the required stuff to produce the same with monkey2. The result is pretty good. I have to polish the switch between full screen and window mode. You can download and compare : windows binary (auto-extractible).

Right now, I’m sure Monkey2 is the good tool to go further.
Stay tuned, I’ll post updates in the next coming weeks about this.

Monkey2

After spending some months, working on picoscope2016.fr and not updating codyssea, I’m back here. I have discovered a new great language done by Mark Sibly : Monkey2.  It’s free, opensource and fully fonctional. I’m working on the translation of a game made with pico-8.

PICO 8 JAM #1

The submission period for the  first PICO-8 JAM #1 will end soon (finishes at 24:00 PST on the 29th). More information are available on this page. The subject is the rain. I didn’t have much time this week, but really wanted to do something for the first pico8 jam. So I made a cartridge: pluere.

pluere.p8

If you don’t have PICO-8, you can have a look here.