Log In  
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

Cart [#smwr-0#] | Code | 2019-05-23 | License: CC4-BY-NC-SA | Embed

Hey there! I 've made 3 remixes of tunes from Super Mario World.
I might make more remixes of songs from Super Mario World or and/or
their originals. Hope you enjoy!

P#64705 2019-05-23 23:01

Cart [#sun_protection_force-0#] | Code | 2019-05-23 | License: CC4-BY-NC-SA | Embed

As the sun, you must protect the people of the earth from getting horrible sunburns! Move the sun to keep your friends in the shade, else they turn to a pile of ash.

Use the mouse for this game

A game by Kyle Neubarth and Madeline Lamee for game studio 2019

P#64701 2019-05-23 17:26 ( Edited 2019-05-23 17:40)

Cart [#mb_simplegame-0#] | Code | 2019-05-23 | License: CC4-BY-NC-SA | Embed
1

This is a VERY simple game for very young kids to edit. This was literally coded in an hour, so it's not optimized or super clean code or anything like that. It just works and is easy for kids to edit. :) It's intended for kids to edit the sprites, sounds, and game variables.

Enjoy! :)

WHAT TO EDIT

SPRITES

Player - Sprite 1 and 2 are the player sprite.

Pickups - There are two rows of pickups. The top row gets only little_points if they are picked up. The bottom row gets big_points if they are picked up.

Baddies - These are sprites 49 and 50 (bottom-left of sprite tab 0).

Stars - The 4 pixels in sprite 48 (bottom-left) define the star colors.

SOUNDS

Sound 0 - When a top row pickup gets picked up.

Sound 1 - When a bottom row pickup gets picked up.

Sound 2 - When the player hits a baddie.

VARIABLES

little_points - Points gotten from picking up a top-row pickup.

big_points - Points gotten from picking up a bottom-row pickup.

game_speed - How fast the overall game should go.

player_speed - How fast the player moves.

animation_speed - How fast the animations change.

seconds_between_pickups - Self-explanatory.

seconds_between_baddies - Self-explanatory.

sky_color - Self-explanatory.

number_of_stars - Self-explanatory.

P#64691 2019-05-23 09:08

Cart [#dehobigezu-0#] | Code | 2019-05-23 | License: CC4-BY-NC-SA | Embed

This is a late entry for the Tweet Tweet Jam from last week. I know, I know...but hey, I had a marathon of meetings at work so I made good use of the time.

Nonetheless, here it is. A simple little game inspired by the Tank & Plane LCD game I had as kid. Try to get the people from one side into the house while avoiding the Evil Cat Lord's love. But mind the gate, it blocks you until it goes down. See how many people you can save before you're hit (or get stuck).

Believe it or not, this is my first tweetcart (or close to it). I see the tweetcarts fly by on Twitter all day long but never really bothered to try one myself. I guess all the "art" carts aren't really my jam and I find myself at a loss when it comes to the math and magic behind making them.

Keeping things within the two tweet limit of 560 characters was quite the challenge. I took advantage of P8's wonderful symbol set and all-in-all, I'm pretty happy I was able to get things boiled down. I learned a lot and took advantage of a few shortcuts I had since forgotten or didn't know prior. I can probably go back through some full game carts and save a ton of extra space/tokens after what I've learned.

P#64686 2019-05-23 01:22

Cart [#grenayino-0#] | Code | 2019-05-22 | License: CC4-BY-NC-SA | Embed
5

Yet another plasma demo! I've been meaning to implement this classic demo effect for years. Thanks to PICO-8 (which I've only just discovered!) I finally got around to it.

I created a continuous wrap around palette from the seven rainbow colours so I can cycle the palette continuously. I implemented these as sprites so I didn't have to mess around dithering, etc in the code.

Thanks to @rez for idea of each "pixel" being a 2x2 image.

Loads of room for improvement, but I'm pretty happy with this as a first attempt.

P#64682 2019-05-22 23:15

When PICO-8 launches now on my Mac, it no longer sizes itself appropriately so that it fills a window. It used to fill roughly 1/5th or so of the screen at a nice size that was not too small or too large and the 128x128 display would fit a square window. Now it is a smaller sized display with a lot of black letterboxing around it.

The latest build continues to work properly on windows, I'm only seeing this on Mac.

I did already try to delete the plist file associated with PICO-8, in case it was a local caching issue due to me derping with window resizing, but it continues to launch like this.

P#64680 2019-05-22 21:02 ( Edited 2019-05-22 21:03)

Here's the shortened tweet version:

b=0k=128
s=sin
c=cos::::cb=c(b)sb=s(b)q=5+sb1.8
b+=.007srand(0)cls()for i=1,500 do
f=-1+rnd(2)r=sqrt(1-f
f)p=rnd(1)d=rc(p)y=rs(p)x=dcb-fsb
z=dsb+fcb
e=y
f=z
y=ecb-fsb
z=esb+fcb
g=7-(z+.5)x=q(x+sb.4)y=q(y+s(b1.5).4)z=zq-20pset(x/zk+64,y/zk+64,g)end
flip()goto

https://twitter.com/DrewesThorsten/status/1130513256097955841

Cart [#td_3ddots-0#] | Code | 2019-05-22 | License: CC4-BY-NC-SA | Embed
1

P#64669 2019-05-22 05:56

Cart [#twinbeeclone-0#] | Code | 2019-05-21 | No License | Embed

Beginner here, so forgive me if I'm missing something obvious. I'm currently working on a simple clone of Twin Bee to learn a little bit about design. I'm running into a blockade due to my lack of programming experience, so I'm hoping someone may have some answers from me.

I've got clouds that fall from the top of the screen. The function that sets all the variables for the cloud table looks like this:

function spawncloud()
 local c = {
  x = rnd(95)+16,
  y = -16,
  dy = rnd(.5)+.75,
  sp = 5,
  hb = {x1=0,y1=0,x2=13,y2=1}
 }
 -- bell properties - is it necessary for me to declare
 -- these properties within the spawncloud function
 -- because the bell position depends on the cloud position? 
 local b = {
  x=c.x,
  y=c.y,
  boost=3,
  dy=0,
  sp=7,
  hb={x1=0,y1=0,x2=3,y2=3}
 }
 --add to cloud table
 add(clouds,c)
 --add to bell table
 add(bells, b)
end

The cloud spawn perfectly when I iterate through the cloud array in the _draw() function.

My next objective is spawning a bell when my bullet hit's one of these clouds. As you can see in the spawncloud() function above, I'm setting up a local table for the bells as well, because their x&y variables are dependent on those of the cloud. I would like to have an entirely separate spawnbell() function so I can call it when necessary, but I'm not quite sure how I would go about this because of the dependent x&y variables.

Additionally, my collision seems to be working about 75% of the time, so any help with making that more consistent would be greatly appreciated. I've borrowed the code from another project, so I'm not 100% clear on what it's doing. Here's what that code looks like:

--creating a box collider
function abs_box(s)
 local box = {}
 box.x1 = s.hb.x1 + s.x
 box.y1 = s.hb.y1 + s.y
 box.x2 = s.hb.x2 + s.x
 box.y2 = s.hb.y2 + s.y
 return box
end

--collision function
function coll(a,b)
 --create relative hitboxes
 local box_a = abs_box(a)
 local box_b = abs_box(b)

 if box_a.x1 > box_b.x2 or
    box_a.y1 > box_b.y2 or
    box_b.x1 > box_a.x2 or
    box_b.y1 > box_a.y2 then
    return false
  end
 return true
end

--check if our bullet is colliding
--with our cloud
function checkbulletcoll()
 for e in all(bullets) do
    for c in all(clouds) do
    if coll(e,c) then
    --delete bullet if collision
        del(bullets,e)
        end
    end
 end
end

Please let me know if there's additional code you'd like to see.
Thanks for the help!

P#64663 2019-05-22 00:06 ( Edited 2019-05-22 00:10)

Cart [#liines-0#] | Code | 2019-05-21 | License: CC4-BY-NC-SA | Embed
8

LIINES, a short demo released at Moonshine Dragons 2019 demoparty in Opole, Poland for the wild competition.

Not tested exhaustively in browsers, and it can go out of sync. If you experience any bugs, let me know!

For best experience, download cart, or binaries (Windows, Mac, Linux) here.

P#64653 2019-05-21 14:43 ( Edited 2019-05-21 17:46)

Cart [#rugao_class-0#] | Code | 2019-05-21 | License: CC4-BY-NC-SA | Embed

A game made by my middle school English students. Each class had 20 minutes to tell me what to make from scratch. There were 4 classes.

P#64649 2019-05-21 07:01

Cart [#hepetedosu-0#] | Code | 2019-05-21 | License: CC4-BY-NC-SA | Embed
my game won't load and won't run at all also the game is far from finished (the name is just the random generated one)

P#64641 2019-05-21 03:18 ( Edited 2019-05-22 00:53)

Cart [#tater_evader-0#] | Code | 2019-05-20 | No License | Embed
1

.
.

.
TATER EVADER!

You dropped some Honey Gold potatoes at a picnic, and they GAINED SENTIENCE, realized you were about to eat them, so they got mad and started to fire TATERIKENS at you! Try to survive as long as you can!

Use the arrow keys to evade the angry taters and their taterikens! If you touch either, you die and game ends. Press X to retry!


WORLD RECORD SO FAR: 77.26s, Taters (E:) 26.


P#64623 2019-05-20 17:19 ( Edited 2019-05-20 19:49)

Cart [#pca4187750_forgotten-1#] | Code | 2019-05-20 | No License | Embed

P#64622 2019-05-20 15:44

Cart [#mupudeyowa-3#] | Code | 2019-05-21 | License: CC4-BY-NC-SA | Embed
7

Update 3: Added a 148 token version.

Update 2: Now down to 157 tokens.

Update 1: With improvements from @freds

This is a token optimized version of the polygon drawing routine I originally used in Pico Tennis. I've managed to get it down to 173 tokens, which I'd like to think is comparable to p01's 163 token trifill routine.

Obviously it's going to depend on your needs for which method you use. If you only need to draw triangles then you'll want to use the trifill method, but this allows you to draw shapes with any arbitrary number of vertices.

The only catch with this method is that it only allows your shape to be concave on a single axis.

If anyone has any alternative methods or optimizations please let us know.

P#64614 2019-05-20 11:40 ( Edited 2019-05-21 08:38)

Normally, replacing text and then undoing works great – the undo will immediately change it back to how it was before replacing, as expected.

However, replacing the first character in the cart acts a little differently (but not drastically): If you highlight the first character, replace it, and then press undo, it will first go back to a state where neither the replaced text or the replacement text is present (unlike when you undo replacements elsewhere in the file). If you undo one more time, the originally replaced text will be back, as expected.

Worse, though: If you replace all the text in the cart and then undo, nothing will be undone, and the both the replaced and the replacement text is gone.

How to reproduce:

  • Write some text in the code editor
  • Highlight all the text (for example with CTRL+A)
  • Write some new text, replacing the highlighted text (or paste something in with CTRL+V)
  • Try to undo the replacement with CTRL+Z
P#64616 2019-05-20 10:27

In Pico-8 it is very clear that you can use it for the whole of a school. What is the deal with Vocatron? Can you use it in a school or do you need to buy a licence for each station?

Thanks

P#64613 2019-05-20 10:09

Cart [#sudjusiwe-0#] | Code | 2019-05-20 | No License | Embed
1

Cart [#kanamukado-0#] | Code | 2019-05-20 | No License | Embed
1

Hi, this is my second entry for TweetTweetJam 2.

This cart features endlessly running Sonic, rolling around (...you know the rest), collectible rings, missiles, ring loss/death system, particle trails, high scoring (volatile), Big Doc himself, and realistic mustache simulation.

Controls


  • [🅾️❎(ZX)] Jump (edge triggered)
  • [⬆️⬇️⬅️➡️] Roll

Rules


As Sonic, collect rings and avoid missiles while perpetually chasing Dr. Eggman (turns out, his Egg Mobile is fast too). Just like in the real games, getting hit will mean losing your rings (though they can not be recovered here).

How many rings can you get?

This cart uses all 560 characters as per the jam rules.

Links


Post on twitter:
https://twitter.com/DaleJ_Dev/status/1130322303731077122

Post on itch.io:
https://lafolie.itch.io/sonic-560

Jam entry:
https://itch.io/jam/tweettweetjam-2/rate/425774

Changelog


2

  • Reclaimed 4 chars
  • All buttons are now used for input

1

  • Initial upload.
P#64607 2019-05-20 03:56 ( Edited 2019-05-20 05:48)

Cart [#rg_tweettweet2-0#] | Code | 2019-05-20 | No License | Embed

My entry for the second tweettweetjam
Play the game here.

P#64606 2019-05-20 03:36

Cart [#sspr_tester-0#] | Code | 2019-05-19 | No License | Embed

This cartridge is intended for PICO-8 newcomers to learn how SSPR() works.

Controls:


Up and down arrows: Selects the parameter to change.
Left and right arrows: Modifies number-parameter values (the two sets of X, Y, W, and H values).
Z/C/N (or the right face-button on mobile touchscreens): Changes number-parameter values by 8 instead of 1. This also modifies the flip settings.

Parameters:


Src. X: The X-coordinate of the spritesheet to draw from, relative to the left. Pixels outside of the 0..127 range will be treated as black.
Src. Y: The Y-coordinate of the spritesheet to draw from, relative to the top. Pixels outside of the 0..127 range will be treated as black.
Src. W: The width of the sprite's image, in pixels. Negative values are treated as 0, of which results in no sprite drawn. The image is stretched to the 'Draw W' width.
Src. H: The height of the sprite's image, in pixels. Negative values are treated as 0, of which results in no sprite drawn. The image is stretched to the 'Draw H' height.
Draw X: The X-coordinate of the screen to draw to, relative to the left. Pixels outside of the 0..127 range are invisible, so that the sprite can be pushed into the left or right edge of the screen.
Draw Y: The Y-coordinate of the screen to draw to, relative to the top. Pixels outside of the 0..127 range are invisible, so that the sprite can be pushed into the top or bottom edge of the screen.
Draw W: The width of the sprite itself, in pixels. Negative values allow a horizontally-flipped image, with the 'Draw X' coordinate representing the right side of the sprite instead of the left.
Draw H: The height of the sprite itself, in pixels. Negative values allow a vertically-flipped image, with the 'Draw Y' coordinate representing the bottom of the sprite instead of the top.
H-Flip: If TRUE, the sprite's image is flipped horizontally. Combining this with a negative 'Draw W' value results in a cancel-out, drawing the image without flipping it.
V-Flip: If TRUE, the sprite's image is flipped vertically. Combining this with a negative 'Draw H' value results in a cancel-out, drawing the image without flipping it.

The spritesheet used here is the one from Zep's Jelpi Test!

P#64596 2019-05-20 00:16 ( Edited 2019-05-20 20:03)

As the title says, I am having trouble with collision detection and would be very grateful if someone could give me a quick code for collision

P#64592 2019-05-19 22:30
View Older Posts
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-05-23 23:28 | 0.116s | 4194k | Q:216