Log In  

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

I am creating smart monsters which can detect obstacles. Objects in yellow circles are obstacles. Red circles are where they can jump

Ignore two yellow circles on both left and right sides of the map
When user is in higher place than monster, monster should find place which they can jump. If monsters are under obstacles, they should not jump.

These obstacles(floors) are drawn so.

Unfortunately, I don't know how to do that. I know how to detect enemies' position but not position of obstacles.

I am not asking do that for me. I am just wondering what should and what can I do!

Any help, advice, tip will be grateful!

8 comments


Cart #51513 | 2018-04-11 | Code ▽ | Embed ▽ | No License

0 comments


Cart #51596 | 2018-04-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4


Cart #51505 | 2018-04-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Like some sort of cross stitching Etch-a-Sketch! And like Etch-a-Sketch, mistakes are forever...

Press Z to change thread color
Press X to open menu

4
1 comment


Cart #waddleball_revision-0 | 2024-07-12 | Code ▽ | Embed ▽ | No License
24

It's the Waddleball Grand Championship! Competitors must master the art of The Waddle if they hope to emerge victorious!

Left arrow key: Waddle left
Right arrow key: Waddle right
Alternate arrow keys: Waddle straight
Press and hold either key to dash
X or Z: Choose or exit level

You are Waddleduck, a chubby duck with the heart of a champion! Prove your mettle in 6 minigames by booting moles, stomping on tiles and destroying asteroids! Or, relax in free-play mode and kick some balls around.

Waddleball V1.2 fixes some stability issues in the Mole Whacker and Duck Defender modes, and also fixes a sprite sizing bug at the start of each level.

24
17 comments


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

This is a simple mouse over text detection example.
Made it to help someone else's question but figured I'd post it here.

Also this isn't optimized, I tried to make it more for learning than optimization.
For instance:

function _mot(_t) 
--if mouse is within the text
-- boundaries then set that 
-- text.over to equal true
 if(_mx>=_t.x and _mx<(_t.x+(#_t.str*4)-1) and _my>=_t.y and _my<(_t.y+5) ) then
  _t.over = true
 else
  _t.over = false
 end
end

Could be easily simplified to:

function _mot(_t) 
--if mouse is within the text
-- boundaries then set that 
-- text.over to equal true
 _t.over=(_mx>=_t.x and _mx<(_t.x+(#_t.str*4)-1) and _my>=_t.y and _my<(_t.y+5) )
end

[ Continue Reading.. ]

3
1 comment


Let's say there are three texts on the game screen.

Game Start

High Score

Exit

I want start game when Game Start is clicked. Is it impossible? Should I use btn and btnp?

2
3 comments


Cart #51474 | 2018-04-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Hi everyone, I've been lurking here for awhile but I finally decided to make something! I built a retropi awhile back but recently I realized that I could make arcade games for it using Pico8, so today I decided to set aside some time to finish a small project.

Cooptris is a cooperative Tetris clone. Same rules as the original: don't let blocks reach the top of the screen! Both players share the same hold space which is useful for trading pieces. Your current piece can get in the way of the other player, so good communication is required!

Player1 (red)
Left/Right/Down: Move
Up: Rotate
X: Swap Held
Z: Drop

Player2 (green)
S/D/F: Move
E: Rotate
Q: Swap Held
Tab: Drop

2
0 comments


I'm trying to make a bunch of rectangles that rotate around a given point, my code so far is this

function _update()
	timer+=0.01
	velocity_x=cos(timer)
	velocity_y=sin(timer)
	for vect in all(rotographic) do
		vect[1]+=velocity_x*radius
		vect[2]+=velocity_y*radius
		vect[3]+=velocity_x*radius
		vect[4]+=velocity_y*radius
	end
end

function _draw() 
	cls(0)
	for v in all(rotographic) do
		rectfill (v[1],v[2],v[3],v[4],flr(rnd(15)+1))
	end
end

"rotographic" is a table in which each cell contains a 4 value vector with the x and y positoins of origin and destnation to feed to rectfills. So far this works fine making the squares, however, all they do is rotate together, around their own center if I am not wrong.

What I want to achieve, is for the each rect to rotate around a given center (let's say 64,64 to exemplify) so in the given example, what would happen is, the outer rects will rotate around a bigger radius than the inner ones.

I know I'm failing at math here (no surprises) so I hope you guys can nudge me in the right direction!

I read this very helpful article, but I am failing to figure out how to apply its logic to more than one element in the data structure I have.
http://endlessillusoft.com/rotating-around-a-point/

2 comments


Cart #52078 | 2018-04-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

V1.1.0 Trees!!!!
New to 1.1.0:

TREES!
Horizontal snow
Clean up in the code here and there

Enjoy :)

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

An old school button masher game!

Needing a few tweaks here and there, although suggestions are kindly welcomed!

--IF YOU COULD BE SO KIND--

This game is part of my Extended Project Qualification (EPQ), and would be so grateful if you could spare 2 minutes to fill out a quick survey about the game to help me push my project further!

https://www.surveymonkey.co.uk/r/Y72WJD5

Thank you!

[b]--CONTROLS--

[ Continue Reading.. ]

1
4 comments


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

My first project, started out just trying to make an 8-bit version of The Preset's "This Boy's In Love" and then I realized I couldn't just put it online without a visualizer, so I coded one. :) Peeking around in system memory was pretty fun! I was planning on making music_events:update() generate a list of "note on" and "note off" events, but for now it just calculates the current volume of the different channels.

4
3 comments


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

0 comments


Built my first game with pico8 and it was super fun! I followed this tutorial for ~30 minutes and then tweaked it.

I was able to add a title screen, horizontal raindrops, sprite switching, poison switching and movement all around in just an hour :)

It'll be fun to host a small game jam at my school with pico8!

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

2 comments


Cart #51423 | 2018-04-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

This is a playable game concept from my step-daughter Corinne.

Guide the octopus through the caverns, avoiding the edges, collecting fish, and eliminating creatures with your laser.

Each level gets a little faster. Compete for the highest score.

Beta: The creature cavern avoidance needs more finesse, and I'd be open to any suggestions about that or any other improvements.

4 comments


Cart #51409 | 2018-04-08 | Code ▽ | Embed ▽ | No License
3

Hey! Do you know with the video games industry you can earnd lot of money? Do you want some money? So, why do not made games?

To Publish a game, you need first Combine one Art point and one Developpement point. To create this point, click on the big square button on the left. When the progress bar is finish, you earn some points. You can upgrade you progress speed with the Plus button at the left. And if you want to upgrade your productivity, you can change the upgrade type and click again on the Plus button.

This game was create for the Meta Game Jam (https://itch.io/jam/metagamejam), with a mix between a parody of AdVenture Capitalist and Game Developement.

[ Continue Reading.. ]

3
0 comments


Here's a repo with the code and more details on GitHub

PICO-8 has a GPIO interface supporting 128 pins, each of which can store a 128-bit unsigned integer (0-255). However Raspberry PI and CHIP only support consuming each GPIO pin as a single bit (0 or 255), and only have pins for a small subset of the 128 virtual slots. The Pocket CHIP only has 6 fully-exposed pins (indices 2-7).

This means that if you want to pass GPIO information that can be used easily with any platform that runs PICO-8, you only get six on-and-off slots, which doesn't sound that great. Until you consider that you can still use those 6 slots to encode an integer up to 6 bits (-32 to 31 signed, or 0 to 63 unsigned!). Even a 3-bit int (0-7 unsigned) can often be enough to encode meaningful state information for many games, which can be used to trigger vibrations, color lights, etc.

The trouble is, taking a decimal value and encoding it as binary with PICO-8's built-in GPIO functions, then reading it again later, is not simple. PICO-8 Messenger provides utility functions which abstract away the bit-shifting and let you just read and write numbers.

Usage

Copy the functions you need from pico8-messenger.lua into your .p8 file.

-- included definition for write_gpio
-- included definition for read_gpio

-- write the number -1 to bits 2 through 4
write_gpio(-1, 2, 3)

-- print out the number stored in bits 5 through 7
print(read_gpio(5, 3), 8, 8, 7)

[ Continue Reading.. ]

2
0 comments


I'm wondering if there are any community-established methods for profiling performance of a PICO-8 program. It's come to my attention that a game I'm working on lags substantially on less-new hardware and I'd like to have some way of profiling which functions are taking the longest to run, so I don't waste my time optimizing the wrong parts of the program.

Any tips? Thanks! :)

15 comments


Cart #51707 | 2018-04-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1


Improved the text box system, and some code refactoring. I'm gonna use some of the stuff I improved here in future games!

Cart #51392 | 2018-04-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1


For the BYUi game jam! By Alex, Alan, and Cam. Also available on itch.io!

1
0 comments


so i have a function where the enemies have enemy1.isalive = true enemy2.isalive = false so i got that system working so how can i check to see if all enemy1.isalive are false (BY the way all enemies are in a group called enemy = {} i add every one of them sorry for no snippets)

1
20 comments


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

3
1 comment


       ・ 。
        ☆∴。 
        ・゚
。★・゚。・
         ・ ゚。  
         ・ ゚。・゚。 ゚。・゚★。
          ☆゚・。°. ゚ ☆゚・
          ゚。·
・。 ゚ ゚。·・。 ゚
          ゚
.。☆。★ ・ *.。☆。★ ・

[ Continue Reading.. ]

24
2 comments




Top    Load More Posts ->