Log In  

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

I would like to create a function that would move one point in along a circle around another, but lack the math know how.

here's what I have cobbled together from examples elsewhere and a little help, hopefully at least my intentions are clear (the inc=increment would let me fiddle with how fast p2 travels)

point1={}
point1.x=68
point1.y=78

point2={}
point2.x=57
point2.y=43

function orbit(p1, p2, inc)
distance = sqrt((p1.x-p2.x)(p1.x-p2.x) + (p1.y-p2.y)(p1.y-p2.y))
ang= atan2(p2.y, p2.x) - atan2(p1.y, p2.x)
p2.x=(p1.x + distance cos(ang+inc))
p2.y=(p1.y + distance
sin(ang+inc))
end

function _update()
orbit(point1, point2, .01)
end

function _draw()
line(point1.x, point1.y, point2.x, point2.y, 7)
end

--
-john

4 comments


Cart #49939 | 2018-03-04 | Code ▽ | Embed ▽ | No License
1

Cart #41362 | 2017-06-07 | Code ▽ | Embed ▽ | No License
1

1
4 comments


Cart #41516 | 2017-06-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7

Isola is a board game (sometimes also known as Isolation or Solitude). After my last cart I decided I wanted to try a puzzle game or some kind of game that wasn't action oriented. After doing some research I found Isola, and it seemed like I could program an ai for it pretty easily. So I did. This was my first experience programming an ai that adapts to the player's moves. My previous game was a shooter with set motion and random starting points for enemies. It was an interesting experience. I think I'd like to try more complex move trees and point systems for a cart at some point.

The ai will not likely challenge anyone for long, but it will win games against casual players and should be a mild challenge for first timers with Isola.

The rules are included in the cart. Games tend to go pretty quickly. The two player mode uses only one key set and just swaps what piece that keyset controls. I can add alternate keys if people want.

This was a quick turnaround and I was well under the token and size limits, so I have not optimized the code much at all, but it should be mostly clear what is happening for anyone that is curious.

I hope y'all enjoy the game!

[i]Update 1: I fixed a situation in which the computer opponent would cheat. The only other change I may make would be to improve the ai's play when destroying tiles...but it performs alright at present, so I may just keep it as is.

[ Continue Reading.. ]

7
8 comments


Cart #41350 | 2017-06-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

A quick snake game made in 2 hours to learn the logic needed to finish a university project. Not very elaborate, and slightly meme-ified but it does the job. Also, fruits tend to spawn on crates and on the snake, but I don't have the time to fix it right now.

3
0 comments


Cart #41340 | 2017-06-07 | Code ▽ | Embed ▽ | No License
2

Help the guy avoid the aliens and escape the brick maze! Collect coins along the way!

2
1 comment


Cart #41463 | 2017-06-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
16

This is a small (257 token) tweening library. It allows you to tween any value over time, and can be extended
by supplying your own easing and lerping functions. It also allows callbacks, functions that are called when the tween has finished, letting you sequence animations and code.

quick start:

tween(player.position, "x", 64, 100, {e=pow(2)})

-- tween(object, prop_name, target_value, duration, options_table)
-- options are 
-- "e" dual in+out easing fn
-- "ei","eo" in,out easing fn
-- "f" tween callback (takes 1 argument - the object)
-- "l" lerping function, default lerp works with number values

[ Continue Reading.. ]

16
0 comments


Cart #41326 | 2017-06-06 | Code ▽ | Embed ▽ | No License
4

I love Pronama-chan!
http://pronama.azurewebsites.net/

4
0 comments


Cart #41331 | 2017-06-06 | Code ▽ | Embed ▽ | No License
3

Create drinks by mixing bottle colors and throwing them at the customers that match! If your bar fills up, its game over!
Left/Right: Move
Z: Pickup bottle/combine bottles/throw drink

An 5 day long experiment in making my first pico8 game with a 32x32 constraint!

3
3 comments


I know most people aren't using the "User Blogs" section of this website for random thoughts and updates style blogging. But it doesn't make much sense to me to blog about it elsewhere if I don't already have a presence somewhere doing so (which I do not). So I have decided to do the occasional blog update of my Pico-8 coding here.

--

I have more or less finished my space shooter (Proxima B. I posted v0.9 a bit ago, and have finished 0.91 but have yet to update online. It is mostly just bug fixes, and a few additional features (better boss death animation/sound for the level two boss).

I have also tried out a number of different game styles in the interim, just playing around with basic skeletons. The two that I am currently pursuing are a two player board game port and a puzzle platformer.

The puzzle platformer is adventure time themed and will involve the ice king rescuing his beloved penguins, who have become lost in the fire kingdom. At the moment I have basic physics worked out. The movement will be more like turn based movement than the standard running and jumping of a platform game. It will involve creating ice blocks to be able to walk across spaces and allowing the penguins to run up the screen (similar to a lemmings style system). At least, that is the current plan, and I have not worked out all the kinks. Some initial inspiration was taken from the NES game Fire 'N Ice. I am having trouble getting some of the physics I want to work properly (such as ice sticking to other ice and either falling or staying aloft as a group based on at least one piece being on ground or not). Here is a very early GIF:

[ Continue Reading.. ]

6 comments


Hello!

I have created a small aquarium in PICO8, with the idea of running it on a corner of my desktop while I work on other stuff. But I have noticed that PICO-8 runs much slower when it is not the window under focus.

Is this Working-As-Intended behavior? I can understand the reasoning, but I would like to have pico8 run at full speed even when not under focus - is there a way to do that?

Cheers!

1
11 comments


Cart #51441 | 2018-04-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

This is an action game with classic arcade mechanics.

You are in a room full of spiders and your only weapon is a magic wand, if you can pick it up.

Keep an eye on the power meter, which decreases every time you use magic or take a hit from the spiders. If it reaches zero, you can't use magic.

If you step on the pink power ups, you regain some power, but there is a limit to how much you can use them.

Wipe out all the spiders using your magic before the time runs out to go to the next level, but it won't be easy, as the number of spiders increases on each level and they become more resistant.

If time runs out before you kill all the spiders on the current level, you lose 1 life.

Use the arrows keys to move and X to use magic.

What's the highest level you can reach?

-- Update Apr 8 2018

New map designs
Bug fixes

-- Update Jun 11 2017

Minor fixes and improvements

3
3 comments


Cart #41598 | 2017-06-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

I am making this oddly colored western game for the [https://itch.io/jam/cga-jam]

2
0 comments


Cart #41297 | 2017-06-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3


It's just a tutorial game by PROGRAM_IX written in Picozine#1. I've included sounds, new graphics and I'm trying to include smoke. Any help with this would be appreciated

3
2 comments



A cover of the boss theme from Lufia II: Rise of the Sinistrals. Only the first 25 seconds or so. Not sure if I'll finish this, or if it's even possible to fit the whole 1 minute loop within the pattern limit of pico8, but I had fun messing with the tracker for a bit.

0 comments


Cart #41290 | 2017-06-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
9

Hi again !

So, the next game i did to practice a bit was this flappy bird clone. Okay okay, it's not the best original design ever, but my objective in this one was to do a polished game (not an original one) so thats the reason it's a simple game with cloned mechanics.
Also, I have practiced to do some pixelart sprites and tilemaps, because it's one of the things I do worse (but it has been a great experience!).

At the end, I wanted so bad to finish this game so I rushed a LOT of things, like the user interface code, SFX, UI design, etc... but hey, it's finally finished.

I would have liked to add particles or new mechanics, like a experience/lvl system, achievements system, points/shop exchange system (skins, etc...) but i told myself to finish this on today sunday and not pushing away that deadline.

The game features the core gameplay (heh), a cute intro, title menu, settings menu (here you can configure the "procedural" aspect of the game as well as enable/disable the music, sfx or reset the savegame.

Music is made by @gruber_music from "pico-8 tunes volume 1" here https://www.lexaloffle.com/bbs/?tid=29008

Hope you enjoy it!

-- JuDelCo

9
5 comments


I posted a question on StackOverflow, and was told I'd better ask the question here:

According to Lexaloffles manual, the cartridge size is 32K (I assume this means 32kilo bytes). However, my cartridge is 41KB. All the demo cartridges that comes with the editor are also above 32K. Why is that?

Link to my question on StackOverflow

1
3 comments


A simple demo that make use of the basics needed to know in order to move, jump, fall, hit enemies and hit the ground. Used as a boilerplate for simple side scrollers.

Cart #41279 | 2017-06-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

0 comments


Raspberry Pi & Pico-8 noob here,

I am trying to make the Pico-Pi, using a raspberry pi zeroW. I followed Gamaral's instructions: downloaded Gamaral's windows image picopi-rpi1.zip and copied the files to the fat32 formatted sd card. I copied the unzipped Pico-8 raspberry pi version: pico-8_0.1.10c_raspi to the sd card as welll. Although Gamaral is using a Pico-8 Raspberry-Pi(ARM) version, are there two different versions of Pico-pi for rPi?

When i boot the rPi it freezes on the rainbow screen, after adding the delay=1 to the config doc, the pico-pi boots to a black screen. Progress!

Is the ZeroW not compatible with Pico-Pi?

I have successfully ran Raspbian on the same sd card, zeroW and power supply, so I don't believe my hardware is the problem. Running on a Windows 10 machine if that helps.

Thanks so much for your time.

2 comments


Cart #41268 | 2017-06-03 | Code ▽ | Embed ▽ | No License
4


Just a simple space shooter.

Controls:
Up: Accelerate
Left/Right: Turn
Z/C: Fire
X: Rocket

Items:
Small heart: Restores 10 health
Bigger heart: Restores to full health
Rocket: Adds one rocket
Bulk of rockets: Fills rockets up to max
Small shield: Invulnerability for a short amount of time
Bigger shield: Invulnerability for a longer amount of time
Yellow circles: Destroys all enemies
Green arrows: Permanently increases speed and mobility of your ship
Green +heart: Increases max health permanentely
Green +rocket: Increases max rockets by 1 permanentely
Green -R: Reduces reload speed of rockets

4
0 comments


Right, so basically what I'm trying to do is, when a game is running in JS, get some kind of data from them on some kind of event in-game. Example: achievements in-game captured by a website in JavaScript. Anyone found a way to do this? GPIO maybe?

1
3 comments




Top    Load More Posts ->