Log In  
BBS > Lexaloffle Community Superblog
This is a combined feed of all Lexaloffle user blogs. For Lexaloffle-related news, see @zep's blog.

All | Following | PICO-8 | Voxatron | General :: [Thread List]

Cart #thyef_title-1 | 2020-03-31 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Point, click, and scamper like a mouse,
for riches untold in a strange house.
As a thief you only have one goal,
The diamond is the ticket to your payroll.

NOTICE / BUG

It seems the cart switching isn't working on the form, but it works inside Splore / pico8.
Anyone have any ideas? For now, you can play it inside Splore, or the web version on itch.

P#74368 2020-03-31 18:58

Stop the looter collectivists from stealing the ingenious and innovative mind! An shoot-em-round defense game loosely themed after Ayn Rand's "Atlas Shrugged."

Cart #zadojiyonu-0 | 2020-03-31 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#74365 2020-03-31 17:09 ( Edited 2020-03-31 17:10)

Cart #minicrush-0 | 2020-03-31 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Hey there. This is my first attempt at a PICO-8 game. Love the format (I'm an old ZX Spectrum boy so the limitations really call to my heart).

Inspired by the Y character I stumbled upon in the PICO character set, then moving it too quickly across the screen I got the sense this character was in constant panic. So I wanted to add some peril to their panic and ended up with this.

The code isn't great, and the falling through the occasional floor is a bit buggy (I'd love any tweaks to the code make it better).

I had lots of ideas to make the game more complicated, but I kinda like that it's a burst of frustration (and the music is intentionally annoying!).

Let me know what you think. Someone managed to get 31 platforms!!! My personal best is 18 so far :)

P#74354 2020-03-31 08:49 ( Edited 2020-03-31 08:50)

Switching from Another programming to Lua

Objective

If you are wanting to program in Pico-8 but are familiar in another programming language except for LUA. This reference will help you get started.

Further Updates


I plan on extending this post to include multiple languages. I know over 13 programming languages. Please like and suggest what language you would like to see next. I also plan on covering more of each
language in detail later as well.

Suggestions


Please provide input if I make any mistakes such as the code does not compile or if you have a better tested solution.

Direct Comparison of Programming Languages.

Class Declaration

Notes:


To simply keep the instance variable "a" private for the table foo do not pass back the
address back from the create_foo function. Without the address an external user can not change the
value of "pa" (private "a").

Lua Code

--Lua

function create_foo(a)
 --make the "a" a private global variable 
 local self = {pa = a or 0}

 --considered a private method at the moment
 local _print = function(b)
  print(self.pa)
 end

 --changes print from a private function to a public method 
 return {print=_print}
end

foo = create_foo(5)
foo.print()

--[[
--prints nill
print(foo.pa)
--]]

output => 5

Equivalent Python 3 Code

class Foo:
  def __init__(self, a=0):
    self.__a = a

  def print(self):
    print(self.__a)

f = Foo(5)
f.print()

Equivalent C++ Code

/*
rewrite includes without spaces before you compile.
*/

#include < stdio.h >
#include < iostream >

using namespace std;

class Foo{
    private:
        int a;

    public:
        Foo(int a){ this->a = a; }
        void print();
};

void Foo::print(){
    cout << this->a << endl;
}

int main()
{
    Foo f(5);
    f.print();    
    return 0;
}

Equivalent Java Code

//Java

public class Main
{
    public static void main(String[] args) {
        Foo f = new Foo(5);
        f.print();
    }
}

class Foo{
    private int a;
    public Foo(int a){
        this.a = a;
    }
    public void print(){
        System.out.println(this.a);
    }

}

Equivalent C# Code

//C#
using System;

public class Program
{

    public static void Main()
    {
        Foo f = new Foo(5);
        f.print();      
    }
}

public class Foo
{
    int a = 0;

 public Foo(int a)
 {
     this.a = a;
 }

    public void print()
    {
     System.Console.Write(this.a);
    }
}

output => 5

Inheritance

Notes:


To take advantage of Inheritance In Lua keep in mind that Tables in Lua are Mutable by default.
Simply just add the FOO table to the Bar Table and return it to inherit all the methods or functions from
FOO.

Lua Code

--lua

function create_foo(a)
 local self = {pa = a or 0}

 local _print = function(b)
  print(self.pa)
 end

 return {print=_print}
end

function create_bar(o,b)

 local self = {pb = b or 0}

--BAR inherits values from FOO
 local temp = o

--add additional functions over inherited functions
    temp.get_b = function()
     return self.pb
    end

    temp.set_b = function(c)
     self.pb = c
    end

 return temp
end

bar = create_bar(create_foo(5),10)
bar.print()
print(bar.get_b())

--[[
--prints nil
print(bar.pb)
--]]

output => 5
10

Equivalent Python 3 Code

class Foo:
  def __init__(self, a=0):
    self.__a = a

  def print(self):
    print(self.__a)

class Bar(Foo):
  def __init__(self, a=0, b=0):
    super().__init__(a)
    self.b = b

bar = Bar(5,10)
bar.print()
print(bar.b)

Equivalent C++ Code

/*
rewrite includes without spaces before you compile.
*/

#include < stdio.h >
#include < iostream >

using namespace std;

class Foo{
    private:
        int a;

    public:
        Foo(int a){ this->a = a; }
        void print();
};

void Foo::print(){
    cout << this->a << endl;
}

class Bar : public Foo {
 private:
    int b;

 public:
    Bar(int a, int b) : Foo(a) { this->b = b; }
    int get_b() {return b;}
    void set_b(int value) {this->b = value;}
};

int main()
{
    Bar b(5,10);
    b.print();    
    cout << b.get_b() << endl;
    return 0;
}

Equivalent Java Code

//Java

public class Main
{
    public static void main(String[] args) {
        Bar b = new Bar(5,10);
        b.print();
        System.out.println(Integer.toString(b.get_b()));
    }
}

class Foo{
    private int a;
    public Foo(int a){
        this.a = a;
    }
    public void print(){
        System.out.println(this.a);
    }
}

class Bar extends Foo{
  private int b;
  public Bar(int a, int b){
      super(a);
      this.b = b;
  }
  public void set_b(int value){
      this.b = value;
  }
  public int get_b(){
      return this.b;
  }
}

Equivalent C# Code

//c#
using System;

public class Program
{

    public static void Main()
    {
        Bar b = new Bar(5,10);
        b.print();
        System.Console.Write(b.B);      
    }
}

public class Foo
{
    int a = 0;

 public Foo(int a)
 {
     this.a = a;
 }

    public void print()
    {
     System.Console.WriteLine(this.a);
    }
}

public class Bar : Foo
{
 int b;
 public Bar(int a, int b) : base(a) 
 {
  this.b = b;
 }

 public int B
 {
  get{return b;}
  set{b = value;}
 }
}

output => 5
10

P#70971 2020-03-31 06:32 ( Edited 2020-04-01 03:03)

Cart #fleb10-0 | 2020-03-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Long ago and far away on a distant planet called FLEB, lettuce was the coin of the realm for a race of beings simply calling themselves Flebians.

Lettuce ! With its leafy greens, tender shoots, and mouth watering crunchy taste. Indeed it was the most valuable thing on the planet for its lifegiving properities and in many ways it grew abundantly.

That is until one evil Flebian up and made himself King over all rationing lettuce down to the smallest bits so he could keep all for himself.

This did not set well with the remaining Flebians, but what could they do ? He had hired a whole host of other Flebians with strange and mystical powers. Some able to take a great deal of damage with armored bodies while others could actually shoot Fireballs right out of their mouths !

And the King himself was no pushover. Having studied the dark arts one such unsuccessful Flebian who took him on in hand-to-hand combat suddenly found himself surrounded by a great many mirror clones of the evil King himself, each taking a small nip out of the would-be hero until he too was defeated.

Years passed.

It is now and today though a new hero arises from the ashes of the old. A hero known simply to his friends and enemies as Redboi. It is him and he alone that will defeat the evil King with your help of course. But it won't be easy. Despite this being a turn-based adventure you must take into account the behavior patterns of all the evil Flebian guards and later the King himself !

. . .

HOW TO PLAY:

To navigate Redboi, use the arrow keys. Run into a Flebian to attack them. To not make a move but to give the bad guys a chance to move, press the (O) key. To use the scanner to see who is what and how many hit points they have remaining, press the (X) key to invoke the magnifier and use the arrow keys to check any square without making a move. Press it again to return to the game.

Be aware the magnifier cannot read the King's hit points correctly as he is using dark magic to protect against this !

Run into the green lettuce to boost your player's hitpoints. You can see you have because Redboi will then put on his Galaxy 9 Space Helmet to show he got a boost. The bad guys around you also change into their special form when they bite the sustaining greens.

. . .

Do not worry if you fail to complete a level, your progress will be saved and you can retry the same exact level again later.

Eventually, oh eventually you will win, if you are brave, intelligent, and cunning. You will indeed topple the evil King directly from his very throne room !

But I'm getting ahead of myself. Listen now to the story of Uncle telling Missy the history of Fleb and how Urgenthnoppe took power those many years ago.

We have faith in Redboi, go now to make us proud !

. . .

So you want a few hints do you ? That's fine. Try not to reveal them all unless you are truly stuck, and click on them in succession of order. So if you really get stuck, click on the 1st hint below and see if that doesn't help you. Click on the next hint after that if you get stuck again.

For instance the last hint you should really not need once you get into the swing of how this turn-based puzzle works, but it's there if you need it.

HINT #1

As you can see the game is indeed turn-based. Use this to your advantage. The small pip on the sides of each evil Flebian shows which direction they are facing. They cannot make a 180 degree turn in one move so if you are behind one that is facing the other way, they cannot attack you or turn to face you on that move.

HINT #2

To defeat a powerful Flebian, perhaps one that has just juiced up on Lettuce, you need to hit them with an attack when they have 2 or more optional paths to take. If you try to meet them head-on they will have no other direction to go except straight through you ending your valor instantly.

HINT #3

Meet them at the crossroads. The more paths available for them to take the greater the chance will be that even though they were hit by Redboi, they may shrug it off and go in a different direction - giving you a chance to hit them again.

HINT #4

Be aware of which Flebians can shoot fireballs. There's nothing worse than closing in on one of the evil Flebians and being suddenly blasted by a fireball because you weren't taking into account which direction they were facing.

HINT #5

Also sometimes Flebians get all jammed up on one part of the map where no-one can move. Go to attack the strongest Flebians first as they cannot defend themselves, then go for the weaker ones. You cannot guarantee this will always happen but the more Flebians on the screen, the greater the chance will be they will jam up against each other.

HINT #6

It's okay to win a level even if you have just one hit point. While you can certainly start the next level with that same one hit point it might be wiser to reset the game and restart that same new level with 3-hit points instead.

HINT #7

The King is very tricky indeed. The only clue I can give is that he will use dark magic to create clones of himself. Every time you hit either the real King or his clones the world will warp. His dark magic will rearrange absolutely everything on the board, including you ! Stick with it though and keep defeating his clones and eventually - eventually you will get to the REAL King and save the day !

HINT #8

One last hint. Get the lettuce. I know that seems simple but really, get the lettuce. You automatically gain 2 hit points when you do and you have no maximum limit. Not only do you get the extra 2-hitpoints the bad guys do not - and you carry these to the next level. And yes they too gain 2 hit points when they bite into the succulent greens. Don't let them ! This also means you should grab all the lettuce before you defeat all the attackers. If you do not you do not gain anything by grabbing the lettuce afterwards.

Have any other questions ? Feel free to ask, and enjoy this cart, from all of us at Sorcery !

P#74339 2020-03-30 20:32 ( Edited 2020-03-31 16:39)

This is my first game on Pico-8 : La légende de Tiki-Gabou.

The game is in French (I am French), but it has no text other than in the introduction screen and the end screen.

It's an adventure game, with riddles to solve, like buttons to push, stone blocks to push, keys to open doors, this kind of stuff.

I started this project between Christmas and the new year, and finished it today. I gave myself 3 month for the developpement, so objective reach !

I hope you enjoy the game =)

Cart #tiki_gabou-0 | 2020-03-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

P#74336 2020-03-30 18:50

Cart #ketosozeja-0 | 2020-03-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#74337 2020-03-30 18:47

Cart #sahodegimo-0 | 2020-03-30 | Code ▽ | Embed ▽ | No License

Platformer. Good Luck!

P#74325 2020-03-30 08:46 ( Edited 2020-03-30 08:47)

I just noticed that on the exported cartridge files, it says "www.pico-8.com" on the top (the .p8.png images). I tried going to that address, but I get a 406 error. That should probably be fixed somehow...

P#74324 2020-03-30 05:04

Cart #guitar_mike-0 | 2020-03-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

I made this for a week long game jam between me and a coworker. The theme was "music is a weapon"... I didn't follow the theme very well, but it was fun making this. Fun fact, the character is actually a rotoscoped + minimized version of me.

This game is super stupid, but I hope you enjoy!

P#74323 2020-03-30 04:36

It's a long way from finished, but I now have something approximating a playable demo of a 1- to 4-player cart I've been working on.

Here is Star Shield for your... Uh... Enjoyment? Or whatever you want to do with it.

Premise

Defend your base against the stars' relentless assault by activating your left or right shield at the correct moment. Rack up a high score in single player, or be the last base standing in multiplayer!

Stars speed up after several deflections, and new stars appear at high point thresholds. Extra lives are awarded to particularly beleaguered players.

Controls

  • LEFT or (o): Activate left shield.
  • RIGHT or (x): Activate right shield.

For proper orientation, imagine yourself seated behind your station, looking into the circle.

  • Player 1: Red (South)
  • Player 2: Blue (North)
  • Player 3: Yellow (West)
  • Player 4: Green (East)

Cart #starshield_demo_v05-0 | 2020-03-30 | Code ▽ | Embed ▽ | No License

To-Do List

There is a lot that I'm still working on. Namely:

  • Moving stars along lines at intersections, rather than teleporting.
    • In an ideal world, the stars randomly decide whether to hop on a line when they pass them, and then randomly decide to travel counter/clockwise at the end of the line. I'm really struggling to come up with ways to go from circular movement to linear movement and back... The stars always fly off into space, never to be seen again!
    • The travel to the center circle is necessary for 3- and 4-player games, so that stars aren't trapped between two players.
  • Better shield activation windows.
    • BTNP allows an indefinite shield (defeating the point of the game), but BTN keeps it up way too briefly.
  • Displaying "empty" life markers when lives are lost.
  • Nicer title and menu screen.
  • Music and sounds.
  • Optimized maps and starting positions for 3-player games.
  • Much cleaner code!

I will update this thread as I progress.

Thanks for reading/playing!

P#74322 2020-03-30 04:23 ( Edited 2020-03-30 04:31)

Cart #plaguebenj-4 | 2020-03-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Cart #plaguebenj-2 | 2020-03-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4
Cart #plaguebenj-0 | 2020-03-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

De-make of "Plague Inc." in PICO8

Spread virus before cure is found

Controls:
LEFT/RIGHT
X : ok
Z : pause menu

TRANS = Transmission points (boost virus spreading on ground)
RESIST = Resistance points (slows down cure progress)
SYMPT = Symptoms points (virus kill)

Work in progress:

  • balance
  • add Help screen
P#74307 2020-03-29 14:04 ( Edited 2020-03-30 21:27)

There's currently no way to get the existing random seed, since srand() doesn't return anything.

Test/demo:

Cart #yudodekegi-0 | 2020-03-29 | Code ▽ | Embed ▽ | No License
1

Could it return the existing seed so we can temporarily change to a sub-system's ongoing seed, then restore it? Like this, for instance:

function handle_ai(ai)
  local old_seed=srand(ai.seed)
  ⋮
  (stuff)
  ⋮
  srand(old_seed)
end

It's minor, since you can always keep your seeds in shadow values from the outset and manually set them each time, but it'd still be handy.

Thanks! :)

P#74306 2020-03-29 13:02 ( Edited 2020-03-29 14:03)

Graph plotter

I've been working on this for a while now

This is my alpha-release of this software. I intend to further develop it so you can have multiple graphs at the same time and also the use of trigonometric graphs.

Enjoy!

Cart #graphplotter-0 | 2020-03-23 | Code ▽ | Embed ▽ | No License
1

P#74303 2020-03-29 10:55

Cart #infectedsys-6 | 2020-03-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

Itch.io:

https://pixbits.itch.io/infected-system

Submission for the 3rd Gameshell game jam

Rules and other info:

Refer to the itch.io page

Controls:

(Save or Delete game data from the pause menu)
(The inventory menu toggle is also in the pause menu)

X = Shoot

C, RIGHT-ARROW, LEFT-ARROW = Navigation

DOWN-ARROW = Teleport or place antivirus

(Feedbacks are welcome)

P#74301 2020-03-29 09:56

Cart #ukasw_sinusoidal_intro-0 | 2020-03-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Sines everywhere.. (;

P#74292 2020-03-29 06:33

Cart #burgershack-0 | 2020-03-29 | Code ▽ | Embed ▽ | No License
3

P#74287 2020-03-29 00:42

Cart #vandermonde-0 | 2020-03-28 | Code ▽ | Embed ▽ | No License
6

Here's a maze/puzzle game I'm working on. I've been inspired by Celtic and Arabic knotwork. There are multiple levels, all intertwined on the one large map.

Gameplay instructions are given in the game. You can start at any level you've reached so far. However, to beat the game you have to play all the way through from level 1.

It's work in progress (no logo, only 11 levels, incomplete SFX, no music, more puzzle elements to come)

Please give feedback in the comments.

Enjoy!

P#74276 2020-03-28 17:24 ( Edited 2020-03-28 17:30)

Cart #the_getaway_wip_1-1 | 2020-03-28 | Code ▽ | Embed ▽ | No License
2

Hi. This work in progress was inspired by a game from long, long ago. I say in-progress although I feel it's almost there; I would like to add a very basic soundtrack (5 second intro, gameplay rythmic backdrop reminiscent of the heist scene in Heat -- the movie).

Any feedback appreciated.

The Getaway

Inspired by Getaway!, a crime-themed game designed by Mark Reid and published for Atari 8-bit computers back in 1982.

Story

Controls

  • up/down/left/right: drive/steer
  • x : speed boost
P#74275 2020-03-28 15:34 ( Edited 2020-03-28 15:38)

Cart #picosnipe-0 | 2020-03-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

P#74261 2020-03-28 00:07
View Older Posts
Follow Lexaloffle:        
Generated 2020-04-01 09:25 | 0.134s | 2097k | Q:250