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]

-Jeu pong

Programmer par Baranes Philippe

--dessin et dれたplacement de la raquette.

padx=52
pady=122
padw=24
padh=4
function movepaddle()
if btn (0) then
padx-=3
elseif btn(1) then
padx+=3
end
end

--ajout de fonction update

function _update()
movepaddle()
end
function _draw()
-- clear the screen
rectfill(0,0, 128,128, 3)
-- draw the paddle
rectfill(padx,pady, padx+padw,pady+padh, 15)
end

-- position de la balle

ballx=64
bally=64
ballsize=3
ballxdir=5
ballydir=-3

--dessin de la balle

function _draw()
-- clear the screen
rectfill(0,0, 128,128, 3)
-- draw the paddle
rectfill(padx,pady, padx+padw,pady+padh, 15)
-- draw the ball
circfill(ballx,bally,ballsize,15)
end

--mouvement de la balle

function moveball()
ballx+=ballxdir
bally+=ballydir
end

function bounceball()
-- left

if ballx < ballsize then
ballxdir=-ballxdir
sfx(0)
end

-- right
if ballx > 128-ballsize then
ballxdir=-ballxdir
sfx(0)
end

-- top
if bally < ballsize then
ballydir=-ballydir
sfx(0)
end
end

--pour que la balle rebondisse

function _update()
movepaddle()
bounceball()
moveball()
end

-- ajouter un son de rebond

-- bounce the ball off the paddle
function bouncepaddle()
if ballx>=padx and
ballx<=padx+padw and
bally>pady then
sfx(0)
ballydir=-ballydir
end
end

function _update()
movepaddle()
bounceball()
bouncepaddle()
moveball()
end

-- repositionnement de la balle

function losedeadball()
if bally>128 then
sfx(3)
bally=24
end
end

function _update()
movepaddle()
bounceball()
bouncepaddle()
moveball()
losedeadball()
end

-- ajout d'un score quand la balle touche la raquette

score=0
-- bounce the ball off the paddle
function bouncepaddle()
if ballx>=padx and
ballx<=padx+padw and
bally>pady then
sfx(0)
score+=10 -- increase the score on a hit!
ballydir=-ballydir
end
end
function _draw()
-- clear the screen
rectfill(0,0, 128,128, 3)

-- draw the score
print(score, 12, 6, 15)
-- draw the paddle
rectfill(padx,pady, padx+padw,pady+padh, 15)
-- draw the ball
circfill(ballx,bally,ballsize,15)
end

Si vous peaufinez ce programme merci de m'écrire !

[email protected]

P#97621 2021-09-21 22:50

Cart #mysecondtrial-0 | 2021-09-20 | Code ▽ | Embed ▽ | No License

P#97586 2021-09-20 13:54 ( Edited 2021-09-20 13:55)

Can someone please tell me how to change a map tile with a sprite over it because I can't figure it out
heres my code
--player
function make_player()
p={}
p.h=10
p.a=3
p.d=1
p.dead = false
p.x=8
p.y=8
p.tx=1
p.ty=1
end

function player_move()
p.tx = p.x/8
p.ty = p.y/8
if (btn(0)) then p.x = p.x - 8 end
if (btn(1)) then p.x = p.x + 8 end
if (btn(2)) then p.y = p.y - 8 end
if (btn(3)) then p.y = p.y + 8
end
end

function overlap(x,y)
if (btn(5)) and fget == 3 then mset(p.tx,p.ty,4)
end
end

P#97529 2021-09-19 05:24 ( Edited 2021-09-19 05:32)

Cart #the_well_v1-0 | 2021-09-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

A short metroidvania I made, first try at a platformer. Quite a few glitches.

P#97389 2021-09-16 06:44

I-ve been using PICOCAD for a while now, and i just found out how it works!!! PICO-8!!! hahahaha i downloaded pico-8 in an instant!!!

im excited to learn more about this and maybe try programing something!!!

P#97003 2021-09-07 15:51

Cart #rujazafape-0 | 2021-09-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#96930 2021-09-06 03:18

Cart #duckpond-0 | 2021-09-04 | Code ▽ | Embed ▽ | No License
6

P#96869 2021-09-04 16:12

Cart #siwwiriwi-0 | 2021-09-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
[img]

small 233b demo with procedural sprites.

a={}
b={}
z=300
for i=0,z do
a[i]=rnd(125)
b[i]=-rnd(300)
end
for i=0,2000 do
d=rnd(i%32)%12sin(i/12)
poke2(0+i,d
d)
end
function _update()
cls()
for i=0,z do
f=b[i]
spr(i%20,a[i],f)
f+=1+i%5
if(f>125)then
f-=250
end
b[i]=f
end
end

P#96857 2021-09-04 08:38 ( Edited 2021-09-04 08:39)

Cart #renenigude-0 | 2021-09-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#96813 2021-09-03 01:12

Cart #fakemedojo-0 | 2021-09-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#96785 2021-09-02 08:32

Cart #monraibresim-0 | 2021-09-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

I title this WIP because this is about as far as I got with this project before I realized it would take a fantastically huge amount of time to properly flesh out. So, I might try to update it but I more so wanted to release this project in case someone is interested in making a Pokemon style game with all of the assets already implemented.

TL;DR A lot of the code is superfluous and hastily typed in favor of rapidly displaying what is essentially needed. It's basically pre alpha code if you wanted to use it for your own project.

I've been working on this idea for about a year total on and off. The original concept (aside from really liking pokemon) came from a challenge meme image. I tinkered away at the art and whatnot and wrapped my head around sspr concretely the first time around while working at this.

What's included:
• A start page screen demonstrating a custom Pico-8 Game intro sequence.
• An in-start page screen displaying small scale spr() of each mon as well as the entire sprite map.
• Custom simple art positioned in a typical format of a conventional rpg in-start screen.
• An arbitrary simple loading screen with screen paging already arbitrarily added.
• Custom Assets for (presumably) Fakemon concepts and their potential usage.
(e.g. mini sprites & modeled upscales)
• Even more Custom Assets for general game design e.g. tiles and random colorful sprite work
• Somewhat thoughtful naming and ordering, elemental typing, egg hatching of each mon.
• Simple movement for one player implemented. Random iteration of mon sprites for debug, following mon.
• sspr() upscaled examples of each mon with its name and associated early note ideas about its concept.
• Tabbing with (z,x) to view each mon.
• Sprite sheet page 1 displayed on debug screen.
• Mostly nothing!

This is really just a demonstration of what can be done with the engine with just a little bit of tinkering away. You are free to use all of the code and assets as you please. Check another post I had in my Bren's Pico-8 Prototypes to see an example of another Pokemon inspired small creation. It could be useful if you're going for a "generation 3" look and want to add to this engine with event functions. (post cross link here https://www.lexaloffle.com/bbs/?tid=44439)

[this space for if I update this post with future revisions]
version: pre alpha
To keep with the Pokemon theme and all of their cool version names, if you make a work inspired by this post, consider this version to be called Thunder Electrum Version, for the mon on the cart's photo,

Hight: The electric sky dragon!

P#96762 2021-09-01 08:48 ( Edited 2021-09-03 03:54)

Cart #mmzhas-0 | 2021-08-31 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#96711 2021-08-31 05:24

A bunch of prototypes I worked on from January - June!

Completely free to use, modify, and distribute.

Utilizes a date time format in months days with version and revision modifications if it has any. Non date time alphanumeric versions generally constitute a branched version that occurred around the same time or was previously a version listed here. This post references a future release of another prototype which will be cross linked with this one.

0124/0124

Cart #mawonidaba-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Movement Changer, zx/udlr controls movement of player sprite and relevant changes to it dependent on button press. Rectangle transforms dependent on button press as well, and the surface is randomized at runtime. Displays creation date anchored at player sprite object.

0125/0125

Cart #sikahiyani-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Viewport Distance Scaler, renders a simple viewport environment with rectangle objects representing distance object transforms. Utilizes zx/udlr to scale viewed world space as well as modify slope of local object, which is a guide line transform relative to xyz axes. Distance and rotation are printed in simple form at screen object.

0203/0203

Cart #dokitizupu-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Simple Distance Difference Manipulation, prints two sprite objects. Use udlr to simply modify their difference in two ways.

0203/0207

Cart #sowuratawu-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Demonstrate Fake C Function, more of a note than a program, a simple roundabout "fake" C with a basic parse function. Attempts to analyze both lua and C syntax. "for loop a repl to emulate c" was the original idea for this thought experiment project.

0203/camxyz

Cart #nikfijomi-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

CamXYZ Simple View Render Transform, demonstrates a basic guide line, use zx/udlr inputs to transform guide line relative to the rendered space's dimensions.

0203/camxyz2-ssspr

Cart #zirimhza-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

CamXYZ Simple sspr Transform, a revision of camxyz, utilize zx/udlr to manually transform sprite objects in the world space. Uses the art of a different engine I have worked on (crosspost referenced in this post https://www.lexaloffle.com/bbs/?tid=44466) to demonstrate the warping of any arbitrary sprite object.

0314/0314

Cart #wajaroputu-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Star Map Notation Scheme Concept, demonstrates the usage of a loop work space for note taking within the editor displayed on the canvas. Use zx/udlr to make arbitrary transforms with the text and HUD objects. Employs the theme of displaying text as well as circle and rectangle objects to represent world space and object distance. More of a fancy HUD note taking program, it also shows an example of how a first person space sim game viewport perspective could look.

0314/0316

Cart #junumadoku-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Noter Simple Page Display, outputs a rendered page with most of the turning and movement logic already implemented. Meant specifically as a note taking program.

0314/0316-shc-msg7

Cart #siwosujeto-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

String Specific Haltable Continuable Message, a revision of 0316, use zx/udlr to switch pages and manipulate the character object / world object / specific object / and or text objects. Utilized as both an internal note taking program for self reference and planning, as well as an in-editor example of overly roundabout ways of taking notes in pico-8 and manipulating them in the world space. Features some syntax notes as well as very general basic object transformations. Includes a local notation for important or specific notes. Displays page number as well as canvas object number.

0408/0408

Cart #nmonapodu-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Story Append, a "story" that uses multi line string as well as the append function.

0408/0408-2nd

Cart #ririmspi-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Meditation, a small game that takes place only on the first tile of the canvas. Use zx/udlr to increase the "meditation" score slowly or less slowly, and move around in the environment to complete objectives and view objects. Certain events only exist if requirements are met.

0408/0408-2nd-1

Cart #diyowamuko-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Magnifying Glass, a revision of 0408-2nd that makes the character sprite a simple "magnifying glass" sprite object.

0408/0408-2nd-2

Cart #fizeforum-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Viewport World Space, a revision of 0408-2nd-1 that utilizes the camera() function anchored on the character sprite. Use zx/udlr inputs to interact and view the world space freely with the camera following along.

0408/0409

Cart #boforinaye-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Arbitrary 3D Object Space Transform, renders some simple example sprites based on spr(0) that demonstrate 3d object transforms. Use zx/udlr inputs to manipulate the object in a pseudo 3d space and resize or move it around. The original idea behind this one was to arbitrarily viewport render the edges of a cube's corner, either inverted or normal, and transform them within any given space. Displays the xyz coordinates in the top left in newline fashion depending on button key press.

0408/0411

Cart #tijisofir-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Simple Program Function, literally named, demonstrates a few of pico-8's internal functions. Uses for, sets, functions, poke, and list manipulation with the pairs(k,v) function.

0408/0411-1

Cart #zwejhewi-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Iterable Simple Function, literally named, is a fork of 0411 to just simply show line iteration functions with fancy multi-line notes and goto flag to arbitrarily manipulate the text output.

0408/0422

Cart #nugozzeyi-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Isometric Or Top Down Adventure Wanderer, despite being an incomplete project, this is also technically a game. Use zx/udlr inputs to discover hidden features (reach specifically -128,0 0,128 128,0 128,128 coordinates and press each of the buttons) and secrets of the world space. Uses goals and triggers to determine if certain events occur. The player is rendered in two ways, both in an idle sprite which defaults to facing south, as well as a somewhat 2.5d overlay which blends which direction the character is looking. Sprite transformations using sspr() are shown outside of the game space. A player sized sprite of an interactive event is used to represent a world entity, in addition to the interactive button entities. World space events occur and are simply rendered on correct event flag.

0408/0423

Cart #gidaromebo-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Bren's Super Simple Pseudo-3D Object Renderer, as the name suggests, this includes a couple of extremely simplistic objects to demonstrate both viewing object(s) from the viewport, and also acts as a repository of objects to tab between while modifying. Includes "nil" "hand" and "wireframe sword" as tabbable objects, though it is expandable despite its simplicity. The objects and world space move slowly to show potential 3d transforms if added, or simply to keep the working space non static to demonstrate the real working coordinates associated with the objects.

0408/0423-2

Cart #fimazabyu-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Literal Coordinates Distance Renderer, displays a literal representation of coordinate system with dotted intersections. Use zx/udlr inputs to manipulate the plane and the rectangle object that represents distance within the plane. Features a button combination skip (z+x simultaneously, may take a few tries) to change the viewport coordinates location to x=32760 y=-32760 which has a large sspr of spr(0) rendered at the intersection of maximum coordinates.

0408/0423-2-1

Cart #jesofrunu-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Literal Coordinates Object Renderer, essentially the same as the 0423-2 revision, use zx/udlr inputs similarly to manipulate the world space. This one incluses a simple sspr of spr(0) which transforms in the viewed world space relative to key press. (z+x to skip to x=32760 y=-32760)

0404/0426 (Flashing Lights Warning)

Cart #wyukofinu-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Output Noise, a simple implementation of rendering very many colorful objects at once using for() loop. Demonstrates arbitrary usage of the aforementioned looped objects, as well as something like a simplified screensaver concept using rnd().

0503/0503

Cart #rehojtete-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Simple Background Transform, similar to 0409, uses just spr(0) representations as 3d space sspr() transform objects in front of the viewport. The particular transforms in this example were intended to replicate the same shape in the space as moving background objects would represent and occupy. Prints out the values of the transformed axes on screen.

0503/0523

Cart #kanedawewe-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

2DTo3D, using many variables, displays a viewmodel for a player's left and right hands from the viewport perspective. Use qa/sfed/zx/udlr to modify statistics relevant to button press (qasfedzx) as well as move the character around in 2d space (udlr) that looks close to a 3d space. Demonstrates usage of further buttons accessible to pico-8 as well as creating the 2d space for a simplistic walking simulator type of game where objects are approached and interacted with, on an immutable plane to show on-rails or strictly 2d prior to 3d logic.

0503/0525

Cart #fudybufi-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Two Player Button Press, as the name suggests, qa/sfed/zx/udlr to print relevant button presses. Displays the key number pressed along with a glyph to uniquely represent it.

0503/0526

Cart #fozoyaruh-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Boundary Box Screensaver, an endlessly looping box that will appear to wrap around the screen as it iterates.

0503/0526-1

Cart #kemirukore-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Light Shadows sspr, a very simple additive volume with light and shadows using for().

0503/0526-2

Cart #rofotipfe-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Item Stat Randomizer, as the name suggests, a very simple item stat randomizer. l to additive randomize, r to equivalent randomize. Not a realistic application of its name, but still a basic example of what it can achieve.

0503/0527

Cart #sufufusiwe-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Go Inside The House, world object that is in an interactive entity. Logic is in place to allow the player to enter into a rendered room, with bounding box coordinates, as well as exit the house via a staircase. The house itself also has simple logic to make it feel like an object with world space physics. Z coordinate is broken, so immediately returns the game to console. udlr to move around and test the boundaries with the house's physics.

0503/0527-1

Cart #fibikifoze-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Hellbent TARDIS demonstration of the early predecessor to my TARDIS post (crosslink here https://www.lexaloffle.com/bbs/?tid=43092) Features a mock up of the design of the Hell Bent Episode TARDIS from Doctor Who. Objects within the world space transform relative to the player's position. Use zx/udlr to approach coordinates 102 102 102 to trigger an event flag and get closer to the TARDIS.

0503/0527-2

Cart #zawajemehi-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

a revision of 0527-1 that displays a sprite of the intended console object outside in the world space while traveling. Approaching coordinates 102 102 102 and advancing forward allows the player to trigger the event flag which clears the world space to become indoors, inside the TARDIS. The TARDIS interior displays the mangled sspr() sprites of the interior TARDIS console design enlarged and given xyz space transform properties. zx/udlr to interact with the world.

0503/0527-3

Cart #boyuskeza-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

a revision of 0527-2 which features a modeled TARDIS console within the TARDIS interior. This was the second to last revision before the final version of the TARDIS cartridge mentioned and cross linked in 0527. zx/udlr to interact with the world.

0503/0527-4

Cart #sifpotiho-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

last revision before the final modifications to the next version and final release. A few changes are made to the model of the TARDIS console. zx/udlr to interact with the world.

0606/0606

Cart #jumawayeyo-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

similar to 0523, this concept uses a span of sspr() from the canvas to create a pseudo 3D world. Each surface viewmodel area screen tile represents a separate object and background, which is manipulated in 3d space. zx/udlr to move around.

0606/0606-1

Cart #didimjuyo-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

a revision on 0606, this version adds a flag condition to represent the possibility of using event flags within the pseudo 3d world. Prints the name object in front of you when within a certain distance. zx/udlr to move around and interact.

0606/0617

Cart #piwodobari-0 | 2021-08-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

increases or decreases the size of a circle object and moves it around. The circle is anchored to a line bound to 0,0. zx/udlr to manipulate the circle.

P#96663 2021-08-30 08:51 ( Edited 2021-09-03 04:23)

Cart #zamwojake-0 | 2021-08-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#96527 2021-08-27 10:35

Cart #dahubekije-0 | 2021-08-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

P#96525 2021-08-27 10:32
P#96524 2021-08-27 10:30

Cart #tailspizzarollsgame-0 | 2021-08-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

Desc

A de-make from the video "Something About Sonic The Hedgehog ANIMATED" of Tails encouraging Sonic to bet em' Totinos pizza rolls!

Credits

@TerminalMontage (making the video)
@rnd (making the PCM sampler)

P#96426 2021-08-24 22:00

Cart #patatedid-0 | 2021-08-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Use this tileset for anything you want! Includes some gameplay as well.

P#96168 2021-08-18 07:51

Cart #pugitijopu-0 | 2021-08-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#96151 2021-08-17 19:40

i know for a FACT that my sprites dont look like that

so uhh,,, help?

P#96079 2021-08-16 01:39
View Older Posts
Follow Lexaloffle:        
Generated 2021-09-23 12:51:03 | 0.184s | Q:111