Log In  
Follow
Psychometric
[ :: Read More :: ]

It's snek

You can change the colour of snek to your favourite pico-8 colour <3

Unless your favourite pico-8 colour is colour 0 because then snek would be invisible =[

Cart #snekgame-0 | 2023-10-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

P#136132 2023-10-20 08:01

[ :: Read More :: ]

I'm working on a top-down space game, which has an option to toggle on planetary orbit indicator lines (mostly for checking things are where they're meant to be but I might include it in the actual game, don't know yet).

This results in circles being generated using the circ() function, sometimes with some large values for the circle radius (some planets can be orbiting thousands of pixels out)

Anyway, this worked fine before I upgraded to the newest Pico-8 version - I'm not sure what version I was on before but I've tested it with 0.2.0i and it works correctly and the orbit lines are drawn in full and in the correct place, even for planets that are thousands of pixels out from 0,0 where the star system is centred.

On the Pico-8 0.2.1b though, something is going quite wrong - any circles that are more than a few hundred pixels in radius are becoming very corrupted - circles have gaps in the area around y=0, and the top and bottom of the circles are very strange and... not circular...

I tested in 0.2.1 as well and that seems to be the point where this issue started. So I'm trying to figure out if it's a bug or if it's due to something that's changed there?

In this screenshot, the yellow line should be part of a circle and it's... not. The planet's orbital radius is 2226, so the raw circle will be circ(0,0,2226,9).

To clarify further I've made a test cart. This shows that circle radius values above 900 seem to be where the problems start, and the distortion that appears when the radius is increased beyond this.

Use the arrow buttons to pan the view around, and X and O buttons to increase and decrease the radius of the circle.

Cart #circletest-0 | 2020-07-14 | Code ▽ | Embed ▽ | No License
5

So I guess, I'm just wondering if this is intended behaviour in line with changes to Pico-8 limitations in 0.2.1 onwards, or is it a bug? (I'm hoping it's just a bug as my entire game is built around big circles...)

P#79324 2020-07-14 19:08 ( Edited 2020-07-14 19:15)

[ :: Read More :: ]

Cart #rotating_triangle-0 | 2020-05-10 | Code ▽ | Embed ▽ | No License
1

Hello

I'm in the process of making a triangle-based game. I'm looking for some advice on how to achieve this as I have been banging my head off a wall with it for about a week now. I'm probably doing this a really dumb way.

I've posted a small cart with an extrapolation of the sections I'm having difficulty with.

I'm trying to get the triangle in the centre of the screen to rotate towards the player (in this case the player is a green cross moved with the arrow buttons). The rotation should not be instantaneous - the enemy triangle in the centre must turn towards the player at the speed defines as enemy.turnspeed - I have some (quite messy) code that turns the triangle towards the player but it breaks down at a couple of points.

The main problem is when the player passes the enemy's y-coordinate on the left side the triangle starts turning the other way. This seems to be due to the way the angles are calculated as this seems to be the point where the target angle wraps past 0.

The other problem is probably related - if the player object goes around the enemy quickly enough it will continue turning one direction even if it would be more optimal to turn the other direction.

This all seems to be stemming from my use of the target angle and calculating whether it is greater or less than the enemy's aim direction.

So in short, I am trying to work out a better way to do this that actually works.

Apologies if this seems vague or messy - I'm pretty new to all of this stuff and there's no doubt a bunch of stuff that's pretty wrong with what I'm doing...

P#76306 2020-05-10 11:07 ( Edited 2020-05-10 11:08)