Log In  

BBS > Superblog
Posts: All | Following    GIFs: All | Postcarts    Off-site: Accounts

While trying to make a "cycle" function that would wrap the value into a range, I have noticed an odd thing about the "%"-operator -- it seems to be trying to do some wrapping on it's own. And that would be okay (so long as it's documented), however:
1%3 == 1
2%3 == 2
3%3 == 0 (this makes sense)
0%3 == 0
-1%3 == 2
-2%3 == 1 (okay, so it goes back, right?)
-3%3 == 3 (fooled you.)
Such inconsistency (-x%x returning x) can be rater bothersome for multiple use cases, as "%" implies that the return value can not be larger or equal to the second argument.
I suppose that this is due to implementation being something like

return x < 0 ? (x % y + y) : (x % y);

while it should have been around

auto r = x % y;
return r < 0 ? (r + y) : r;
1 comment


Cart #10704 | 2015-05-16 | Code ▽ | Embed ▽ | No License
10

A very simple 3D rasterizer that renders a rotating flat shaded cube.

10
1 comment


Cart #10782 | 2015-05-19 | Code ▽ | Embed ▽ | No License
50

This is kind of a parody of old amiga cracktros from a parallel universe, where duangle is a demoscene group, and so are all the people in the greetings!

1.1: added new greetings

50
9 comments


Cart #12367 | 2015-08-06 | Code ▽ | Embed ▽ | No License
18

Save humanity from extinction:
Shoot and Cross your beams to destroy invaders!

  • Up/Down to move BLUE shooter
  • Left/Right to move YELLOW shooter
  • Their intersection is a GREEN beam
  • Z to shoot
  • Kill the enemies with the righ beam color or they will spawn 2 other enemies! (killing a blue or yellow enemy with the green intersection = fail)

POST YOUR HIGH-SCORE

Feedbacks appreciated :)

Updated : added music made with a friend. Only problem : I forgot that I had SFX and he made a 4 channel music :s so I had to mute the drums... (at least I will not do that mistake again)

This is my first game with pico8, it was a lot of fun to do! I don't have a lot of spare time and Pico8 allows very short code/creation sessions! Thanks Zep!

18
9 comments


Cart #10683 | 2015-05-15 | Code ▽ | Embed ▽ | No License
4

This is my first cartridge, a tiny self-running intro with music that does a dithered sinus effect. This started as a fullscreen effect but I had to reduce the amount of pixels to fit the CPU limit.

ph34r!

4
0 comments


So I finally had some time to play with Pico-8 yesterday, and wrote two tiny cartridges, and instead of spamming zep on Twitter I thought it would be more useful to post my thoughts here, in order of appearance.

  1. Jelpi is a pretty impressive demo, i love everything about this handheld console that never existed :D

  2. There should be a version of the manual that looks like a 90's devkit manual black & white hardcopy, with a serious layout like the devkit cost $10k. But this is a bootlegged copy of the manual, so it got xerox smudges, is not fully level and is obviously copied right out of a bound book, and right on the first page it says stuff like "FOR YOUR EYES ONLY. YOU ARE CONTRACTUALLY BOUND TO NOT DISCLOSE ANY INFO" etc. On the second page there's a pompous introductory text from the company founder that flaunts the pico-8's luxurious capabilities, telling you how you can be proud to be able to develop for this console and how it's lightyears ahead of the competition. The manual is not even a full copy, it seems like it's just the most important pages copied out; the pages are numbered like 110-112, 351, 430, with paragraphs that make reference to appendixes that don't exist ("see Appendix E for chipset layout").

  3. It's obvious that this pico-8 firmware is the devkit, which starts with a prompt. I imagine a "consumer device" would boot right into the cartridges. :-)

  4. First I thought Lua's numeric type had been downgraded to signed short, but then I realized it's actually fixed point 16bit for both integer and fractional part. Very cool.

  5. I'd remove all references to Lua and give this language a different name, e.g. Picoscript or Picolua; otherwise I'd just expect everything to work the same way; it's sufficiently different, i think. Considering how all the commands are named, PicoBASIC seems most fitting.

  6. I thought that it would be more useful to arrange the palette in a way that makes the 4-bits more significant (e.g. LRGB), similar to how the default EGA color palette is arranged. In EGA, bit 3 effectively changes brightness (sort of) without altering hue, that allows for very easy lighting tricks. The numeric bits correspond to RGB, so you can fake additive light effects with simple bit twiddling. Here, i'd ultimately do it with a lookup table; I guess it's too late to change it anyway.

[ Continue Reading.. ]

16 comments


i really hope you like it! its short but its only my first im not that good

0 comments


Cart #10679 | 2015-05-15 | Embed ▽ | No License
1

1
2 comments


Cart #45397 | 2017-10-22 | Code ▽ | Embed ▽ | No License
20

Hello!
This is the prototype version of:

---- The Aggressive Botany League ----

a local multiplayer plant based deathmatch

Plant seeds into walls to push your opponent into the ocean (or to squish him!)

--- Controls ---

  • Movement
    Player1: arrows
    Player2: EDSF

  • Wall breaking:
    Face a wall and press Z (player2: TAB) 3 times to break it

  • Plant seed:
    Face a wall and press X (player2: Q) to plant a seed into it
    There are 4 types of seed (green, yellow, red and black) each with a different effect
    You can carry only one seed at a time

best played with 2-4 gamepads

enjoy!

20
2 comments


Cart #10669 | 2015-05-15 | Embed ▽ | No License
1

Hey guys, this is a MASSIVE update I've worked on this update for an hour and I'm working on the next update soon (like today or tomorrow) i will be sure to post another update by next Wednesday by 2 pm

1
1 comment


Cart #10663 | 2015-05-15 | Embed ▽ | No License
1

this started out as a school progect and it got veary high remarks but i want to know how to improve it.

1
2 comments


tell me what I can improve. this cart started out as a project for school and my teacher gave it very high remarks but I want to hear what you say.

1
4 comments


Cart #10659 | 2015-05-15 | Embed ▽ | No License
1

The new update is here this is a small update just trying new things and I am working on another update

r vs b
1
0 comments


hey guys, I need ideas for updates and stuff you want me to add in...

1
6 comments


Zep, when in BBS I use "view by: Top" it only allowing me to see one page of posts.
Thx

P.S. when is a new voxatron update is coming out? :)

1
4 comments


Cart #10639 | 2015-05-13 | Embed ▽ | No License
1

Red v.s. Blue 1.2 is out my friend pandie123 has made one when you are in the battle and i will be making more updates

1
0 comments


Cart #10638 | 2015-05-13 | Embed ▽ | No License
1


a team battle where your in it
all the weapons
gotta play to find out

1
0 comments


Cart #10634 | 2015-05-13 | Embed ▽ | No License
2

MAKING THIS LATER!

2
0 comments


Cart #10631 | 2015-05-13 | Embed ▽ | No License
2

THXS!

2
0 comments


Cart #10628 | 2015-05-13 | Embed ▽ | No License
1

Im about to update it around 2:00

1
1 comment




Top    Load More Posts ->