Log In  

It's pretty fun to make simple stuff on Pico-8. But it's difficult to try to making complicated stuff on Pico-8

I'm a very amateur programmer since I'm only a teen. I know practice is good for this kind of thing and I shouldn't rush into it.

But I can't find many of the things I see on other Pico-8 games on the wiki, how to use them, or when I will need them.

So can some of you professionals give me some tips and things that I can do in my code that may help when I try making my games

that would be great if you could tell me some stuff

Pico-8 is what is finally making me able to code things other than the Scratch and Hopscotch stuff because it gets all the weird things you have to do out of the way and has a simple interface

P#43191 2017-08-12 20:18 ( Edited 2017-08-14 08:08)

what do you need help with? physics? visual effects? organization?

P#43193 2017-08-12 20:29 ( Edited 2017-08-13 00:29)

@tesselode

I'm asking for help with how code pico-8 games
I know the basics like _update(), _draw(), and variables but I kinda need help with the other side of things

Physics and visual effects are the main issues though

(sorry I haven't learned much of any calculus or trig)

P#43194 2017-08-12 20:52 ( Edited 2017-08-13 00:52)
1

At least to start, learn how tables work. They're super useful in anything you do that's beyond a basic, really simple game.

I would also take some simple games from the BBS that are well-rated, but not super complex. Find one that tickles your fancy and buckle down and learn it. Top to bottom. Really understand everything that's happening there.

If you want, here's a game I made that's not too complex. (I'm happy to answer any questions about it.)

Cart #42293 | 2017-07-09 | Code ▽ | Embed ▽ | No License
20

Once you've done that with a few games, you'll start getting an idea of how people are structuring their games. Everyone writes their game in their own way and there's no one "best way" to do it. But there are patterns. And once you start noticing what those are, you'll start to feel more comfortable fitting those patterns together into your own pieces of a game.

Best of luck! And ask lots of questions along the way! It's a fun adventure! :D

P#43195 2017-08-12 21:38 ( Edited 2017-08-13 01:38)

Another hint for learning how to program in PICO-8
(actually this hint is good for learning to program in general)

Make specific questions.

For example, if you ask "How can I make a good looking firework effect?" -- I bet you will get a good answer in a day or two.

On the other hand, if you ask "How can I program good graphics?" -- you will probably not get the answer you are looking for.

So try making something really simple (for example, an asteroids game) and bring some specific questions that you have to the BBS. We will be happy to help you!

P#43209 2017-08-13 10:48 ( Edited 2017-08-13 14:48)

Hi there!

I am in the same struggle :)

I also think that learning tables well could improve my games quite a bit...

I've found a very nice pico-8 game template here:
https://github.com/misato/pico8-game-template

But I cannot make the most interesting part (the collision) of the code work.
Do you guys think that this code is fine?

-- entities
entity = {}
entity.__index = entity

function entity.create(x,y,w,h)
local new_entity = {}
setmetatable(new_entity, entity)

new_entity.x = x
new_entity.y = y
new_entity.h = h
new_entity.w = w

return new_entity
end

function entity:collide(other_entity)
entity.x = 64
return other_entity.x < self.x + self.w and self.x < other_entity.x + other_entity.w
and other_entity.y < self.y + self.h and self.y < other_entity.y + other_entity.h
end

ship = entity.create(60,120,8,8)
ship.firerate=5
powerup_green = entity.create(14,64,6,6)
if not ship.collide(powerup_green) then
spr(powerup_red.sprite, powerup_red.x, powerup_red.y)
end

If I run this code I get:
RUNTIME ERROR
return other_entity.x < self.x + self.w and self.x < other_entity.x + other_entity.w
Line 94: Attempt to index local other_entity (a nil value)

P#43235 2017-08-14 04:08 ( Edited 2017-08-14 08:08)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 12:28:11 | 0.015s | Q:24