Log In  
Page:
1
2

Cart #35256 | 2017-01-08 | Code ▽ | Embed ▽ | No License
76

You are all invited to the Tiny-TV Jam, a Pico-8 gamejam in which you'll have to make a tiny game for a tiny TV!

!!!!! ~ The Jam Is Done ~ !!!!!

!!! ~ Thank You So Much ~ !!!

!!! ~ For All The Tiny Games And The Tiny TVs ~ !!!

!! ~ The Results Will Be Coming Shortly ~ !!

Here is the base cart:


I fixed the fix because it was stealing 7% of CPU from you when the TV was on, sorry about that. Also, no more weird screen display thanks to qbicfeet!

Here are the instructions to use the cart:
I know the instructions are intimidating but it's actually easier than it looks. If you're hesitating, please give it a go and see how it turns out. If you have any question, feel free to ask here.


tiny tv base cart instructions:

On the limitations:
The main limitation is of course the 10x11 screen resolution.
But there is also the regular CPU limitation which already ~70-75% filled by the TV rendering. The remaining 25% will need to be enough (it should be largely enough in most cases) for your games. Otherwise, consider reskinning your TV to something lighter (see "on the sprite-sheet" section).

Those are the only limitations for the jam but of course, regular Pico-8 restrictions apply as well.

The TV can be turned on and off with the player2's 'O' button ('tab' on a keyboard) or through the pause menu (hit 'enter').

On the cart's code:
At the beginning of the cart there are a few variables you can set only once and only there:

  • tv_transparency_col
    ....that's the transparency color on your voxel TV plans.
    ....It's only useful if you wish to reskin your TV.

  • tv_screen_height
    ....that's the height of the middle of the TV screen.
    ....Again, this is only useful if you wish to reskin your TV.

  • tv_player2btn_turnon
    ....when set to true, 'tab' on a keyboard will let you turn the tv on and off

Then, there are variables you can change whenever in your code:

  • tv_angle
    ....rotation around the y axis (0-1, NOT 0-360 or 0-pi)

  • tv_anglespd
    this variable is added to tv_angle each frame

  • tv_xoffset
  • tv_yoffset
    ....x and y offset of the TV on the Pico-8 screen

  • tv_fakevangle
    ....because I'm not that good at maths, I couldn't figure out rotation around the x axis.
    ....instead you have this fake rotation which is very limited and can take values from -1 to 1.
    ....sorry about that.

  • tv_debug
    ....when set to true, the memory and the cpu used by the cart will be displayed at the top-left corner of the screen

These variables are also used by the base cart, which will automatically recenter the tv and direct it towards you. This can be ignored by setting these variables again each frame.

Next are the base functions of your game: _game_init(), _game_update(), _game_draw(). They behave exactly like the regular _init(), _update() and _draw() functions except _game_init() is called when the tv is turned on.

_game_shutdown() is called when turning off the TV.
_set_screen_text() lets you add static text around your tv. it uses the tv_add_text function:

  • tv_add_text(text,x,y,alignment[,color0,color1])
    ....sets static text to be displayed on the Pico-8 screen.
    ....alignment can be 0: aligned left
    ...............................1: aligned center
    ...............................2: aligned right

Both _game_shutdown() and _set_screen_text() are optional and can be deleted if you don't wish to use them.

Then there is space for your own functions but you can put them before that if you like.

And then there are the base cart's internal functions which you should not change. Changing these functions is against the rules of the jam. Please don't do it.

Note: the TV can be turned on/off in the code by calling 'tv_turn_onoff()'

On sound:
The base cart calls sfx(0) and sfx(1) upon turning on and off the tv. You can of course change these sfx to whatever you like.

You are free to use as many sfx as you normally can in Pico-8 and same thing for the music!

On the sprite-sheet and the map: (+reskinning TV)
The base cart uses the second half of the sprite-sheet (which is also the second half of the map) as voxel layers for the TV and also for the tile in the background.
You are invited to modify these layers and reskin your tv this way.
If you do so, don't forget to set the tv_transparency_col and tv_screen_height variables if needed.
Note that if black cells are in the screen frame, they will get the screen color, whatever their depth.
Also note that the rendering of the TV renders all non-transparent cells and that is heavy on CPU so try to do empty cases rather than filled ones (i.e. do like it is done on the base cart).

You are also invited to change the background tile.

You are free to use the free half of the sprite-sheet as well as the free half of the map, as you like!

On jamming:
Most important instruction here: when participating to the jam, please make sure to... have fun!!!

[ end of the instructions ]

Here is a video alternative version of the instructions: (sorry for the not-very-good audio :X)

To clarify:
You are more than welcome to customize both your TV and the tiles that are displayed in the background. However, you are not allowed to modify the voxel data and/or the background tiles at runtime.

And here are two reskins if you are into that! You need to click on the [128x64], hit ctrl+c then go to pico-8, sprite-sheet tab 2, first cell there and hit ctrl-v! Don't forget to change the tv_transparency_col and tv_screen_height!


The Strawberry TV skin: tv_transparency_col=4 tv_screen_height=12
[0x0]

The Space Arcade Cabinet skin: tv_transparency_col=11 tv_screen_height=14
[0x0]

Reminder:
Entries need to be upload here on the BBS, in the Jam section. The created BBS thread needs to be tagged "tinyTVjam"!

If anyone is encountering any problem with the base cart, please report it here as soon as possible!

This is all there is to know.
Good luck and have fun every one!

About the jam:

What: Over a week ago I did a Pico-8 doodle starring a voxel TV on which you could play a tiny Pong on the 10x11 screen. It was then suggested to me to make a jam out of this. This is the invite to this jam.

When: The jam will take place from the January 14th on 00:00 GMT to the January 22th at 24:00 GMT! That would leave you 2 weekends and 5 week days. Spend as much or little time as you need on your carts. You do not have to make something super impressive or anything, it really only has to be something.

Where: Here on the BBS, in the Jam section.

Who: ALL OF YOU!!! You don't have to know Pico-8 super well to participate in this jam. Pico-8 beginners are super welcome! Don't be shy to submit either, you have nothing to lose in it!!

How: A framework cart will be provided at the very start of the jam, with a how-to-use-it guide, stating what you can and can't change along with a few guidelines. The TV will be customizable but the screen resolution will have to stay at 10x11. Expect to be a bit limited in terms of allowed ram. By the way, the invite cart does not use the final framework at all. Teams and collaborations are allowed. There will not be any theme, just make a game for the tiny screen.

Submitting: You will be able to submit your cart before the deadline by creating a Jam thread with "tinyTVjam" in its tags. You can update your cart as many times as you like until the deadline.

Voting: The voting widget used for the p8jam will appear on all threads tagged #tinyTVjam. Voting will be anonymous and it will last the one week just after the jam finished. The results will be announced at the end of the voting period.

What do you win if you win: The high respect and appreciation from the community. And maybe a little surprise. But above all, the aim here is to have fun and make something cool!

During and after the jam, you will be able to browse through the entries from here.

edit ~ Here are some more details that were given further in this thread:

  • you can have as much love and instructions as you want in the description of your games.
  • you will also be able to have some static text outside the tv but nothing dynamic.
  • you can have all the normal controls of Pico-8. The TV will be turned on either with the Player-2-buttons if you don't use them, either with a pause menu option.
  • the maximum width for the tv screen is 10 and the maximum height is 11 but you can use less than that if you want to.
P#35207 2017-01-07 22:14 ( Edited 2017-01-31 01:01)

ahaha this is an amazing jam idea! i will definitely try to participate. that tv is so cute, and the pong hits are surprisingly very visceral feeling!

P#35215 2017-01-08 00:50 ( Edited 2017-01-08 05:50)

Hooray!

Sure, I'll add the widget to #tinytvjam cart posts when voting starts.

Can't wait to make a tiny tv game :3

P#35224 2017-01-08 03:39 ( Edited 2017-01-08 08:39)

Yay glad you liked the idea! \o/
Can't wait to get that framework :)

P#35232 2017-01-08 04:39 ( Edited 2017-01-08 09:39)

This sounds like a lot of fun! I've been trying to learn Pico8 so I joined the forum to take part in this. ^^

P#35233 2017-01-08 04:44 ( Edited 2017-01-08 09:44)

Awesome - sounds like a challenge, but also could be a lot of fun! :D

P#35241 2017-01-08 08:40 ( Edited 2017-01-08 13:40)

Sounds like fun, looking forward to it!

P#35242 2017-01-08 08:45 ( Edited 2017-01-08 13:45)

Cool idea! Will participate if I have time. :)

P#35243 2017-01-08 08:45 ( Edited 2017-01-08 13:45)

I'm looking forward to this, this'll be fun.

P#35246 2017-01-08 10:01 ( Edited 2017-01-08 15:01)

I think I'll participate, assuming I remember.
Looks like this will be fun! :)

P#35265 2017-01-08 14:25 ( Edited 2017-01-08 19:25)

To give you an idea of scale, it can fit 2 characters on 2 lines, so 4 characters total.

I don't think any games will have a story.
I'm still going to try this!

P#35268 2017-01-08 15:18 ( Edited 2017-01-08 20:18)

I probably should have mentioned this but you are allowed to have as much lore and instructions as you care to have in the description (you could even do a whole manual and link it as a pdf in the description). But please keep it simple enough that it's actually playable!

P#35272 2017-01-08 15:50 ( Edited 2017-01-08 20:50)

Really cool idea! Looking forward to trying it out! :D

P#35283 2017-01-08 18:02 ( Edited 2017-01-08 23:02)

I would participate if I didn't suck

P#35293 2017-01-08 20:37 ( Edited 2017-01-09 01:37)

EDIT:

  1. I hope we can remove this reflection on tv screen, and tv pixel in corners of screen, as it's robbing us from precious space we have for displaying a game...

  2. How many buttons do we have? Can we have all pico8 buttons (directions + O/X) or can we only have (up,down and X)? I really hope for all buttons...
    ( If you are against giving players all inputs, because you need to have button to turn on/off tv, consider holding x and o buttons for a second as a restart command.)

  3. Can we put some text above/below tv screen? If so can it be only static (like lore) or something dynamic like player score/health etc.
P#35308 2017-01-09 02:06 ( Edited 2017-01-09 08:44)

I might want to reskin the TV a bit :)

P#35326 2017-01-09 05:35 ( Edited 2017-01-09 10:35)

awesome!
why not 10x10 though? (I'm a symmetry freak)
...or 12x9 like in good old times :)

P#35341 2017-01-09 10:30 ( Edited 2017-01-09 15:30)

Yes, you will be able to remove the reflection on the tv screen, same for the round corners and you will also be able to add any other obstruction if you want to do so!

You'll have the directions + O/X, the TV will be started and shut down with the player 2 buttons.

Static text will be allowed outside the tv screen, but no dynamic stuff.

TV will be reskinnable, just keep the 10x11 screen!

You can use less than 10x11 if you want! :P

P#35345 2017-01-09 10:42 ( Edited 2017-01-09 15:42)

TRASEVOL_DOG said:
> the TV will be started and shut down with the player 2 buttons.

please consider a pause menu option for doing that or something...? there's no way to push player 2 buttons when using a (single) controller (which I often do, with the nearest keyboard literally across the room ('cause wireless controller + TV screen))

P#35360 2017-01-09 14:13 ( Edited 2017-01-09 19:40)

Good point. There'll be a pause menu option as well then and also you'll be able to disable the player-2-buttons way, in case you want to make a multiplayer game. :)

P#35363 2017-01-09 14:50 ( Edited 2017-01-09 19:50)

Awesome! Looking forward to the jam!

P#35482 2017-01-11 17:38 ( Edited 2017-01-11 22:38)

Thank you everyone for showing your enthusiasm! :D

The Jam starts in just 18 hours now!
As said before, the framework cart will be given at the very start of the jam and the TV will be reskinable! Here is a Strawberry™ TV I made earlier!

That TV will also be downloadable as an alternative skin! :)

See you in 18 hours!! ;D

P#35572 2017-01-13 00:15 ( Edited 2017-01-13 05:20)

Awesome idea :)

P#35592 2017-01-13 06:58 ( Edited 2017-01-13 11:58)

I'll only have some evening hours to put in, but I'll do my best!

P#35621 2017-01-13 19:01 ( Edited 2017-01-14 00:01)

Question: I noticed the screen is actually 40x44 at the native resolution of 128x128 (screen is 160x176 @ 512x512). So for 10x11 resolution for the games, I assume you mean each pixel has to be 4x4 at native resolution? In other words, we must use a 110 pixel grid? Obviously if we do like a rectfill(0,0,0,0,7), we could fit 40 across and 40 down. I'm pretty sure it means minimum pixel size is 4, but just wanted to clarify.

Another question (admittedly I haven't glanced at the cart code yet): how do we deal with x,y coordinates when the tv/screen moves? Are these normalized somehow (such as the top left of the tv screen always being 0,0), or do we need to somehow compensate for tv/screen position/rotation when calculating coordinates for display objects?

Thanks!

P#35627 2017-01-13 20:27 ( Edited 2017-01-14 01:34)

This is all taken care of by the base cart! You just draw things as would normally do but on a 10x11 screen in the _game_draw() function and the base cart will then display it on the TV screen, magnified to 4x4 pixels, as you point it out and at the right position and rotation!

P#35628 2017-01-13 20:41 ( Edited 2017-01-14 01:41)

@TRASEVOL_DOG Wow man, sounds like you executed it very smoothly! Thanks for clarifying!

P#35629 2017-01-13 20:42 ( Edited 2017-01-14 01:42)

Why is the strawberry TV skin at x4 zoom?

P#35631 2017-01-13 22:18 ( Edited 2017-01-14 03:18)

Uh what do you mean Ilkke??

edit: I think I understand your question now! I'm using the BBS gfx sharing feature here! You can click on the [128*64] and then hit ctrl+c, go on the spritesheet in Pico-8, on tab 2 and hit ctrl+v! :)

P#35634 2017-01-13 22:53 ( Edited 2017-01-14 04:03)

Ah right, it's the embeddage!

P#35635 2017-01-13 23:19 ( Edited 2017-01-14 04:19)

I added a new available skin, the Space Arcade Cabinet!

P#35647 2017-01-14 02:17 ( Edited 2017-01-14 07:17)

I just uploaded a fixed version of the base cart. The only two changes are the following:

  • you can now access screen data (through pget) and draw on the screen from the _update_game() function.
  • you can now actually delete the optional _set_screen_text() function and the cart will still work.

You don't have to change base cart if you already downloaded the previous one. Both versions of the base cart will be accepted for submission to the jam.

Very sorry for the inconvenience.

(by the way some of you are already making amazing stuff and it makes me really happy)

P#35702 2017-01-14 19:40 ( Edited 2017-01-15 00:40)

Thanks for the fix. I had to do pget for collisions because I don't think there's a way to make 1px map tiles, otherwise I'd do mset/fset/mget/fget instead of fillrect for the walls. So I have to do pixel checking for the collisions I think (at least, I'm not sure of a better way.) Thanks for fixing it!

P#35704 2017-01-14 19:48 ( Edited 2017-01-15 00:48)

Alright, I found another oddity that isn't a huge deal, but kinda weird. The 5th pixel going completely vertically over the entire height of the screen is about half as wide as the others. So when I move my pixel Pacman across the middle of the screen, he shrinks! Not a huge deal just thought it was a bit weird and wasn't sure if you were aware of it. I'm also not sure if it might somehow be my code, or if that's just how the display is coded to make it fit certain dimensions. I didn't notice it in your Pong game, so maybe it's my code.

Also wanted to bring it up so I don't get disqualified. I'm not intentionally making any pixels smaller than they should be to get around the resolution restrictions.

here's a demonstration (you can see the vertical path above the player is also half as wide, so it affects the whole screen in that column, not just the player):

P#35708 2017-01-14 20:07 ( Edited 2017-01-15 01:16)

I was aware of it but I didn't think it would be that easy to fix before looking into it. Not gonna upload a new cart but here's a one-line fix you can copy paste in your _update_game() function:

if tv_angle==0 then tv_angle=0.0001 end

this is a bit dump but it works.

P#35712 2017-01-14 20:29 ( Edited 2017-01-15 01:29)

The fix didn't work, but that's ok, it's not a big deal. As long as it's a known thing and nobody thinks I'm cheating the resolution it's all good :D

P#35717 2017-01-14 20:57 ( Edited 2017-01-15 01:57)

Ah you're right it doesn't work on the reskins it seems... Hopefully it won't bother anyone too much. Sorry again! ><

P#35719 2017-01-14 21:21 ( Edited 2017-01-15 02:21)

@Scathe a game that I'm making looks very similar to yours, oh well :)

@TRASEVOL_DOG Can we use the part of the spritesheet between the bg image and the top of the TV?

P#35727 2017-01-15 01:06 ( Edited 2017-01-15 06:06)

@ilkke hey, no biggie man, as long as it doesn't bother you, it doesn't bother me either. There's only so much that can be done in 10x11, so there are bound to be overlapping ideas :D

P#35740 2017-01-15 02:51 ( Edited 2017-01-15 07:51)

@Scathe Not bothered at all as I'm pretty sure they will play quite different :)

P#35745 2017-01-15 04:51 ( Edited 2017-01-15 09:51)

@TRASEVOL_DOG

OK just found this in the source:

--please note that modifying
--tv_voxmap at runtime is
--against the rules of the jam

An odd place to hide a restriction. Are there any other hidden ones? :)

P#35753 2017-01-15 06:42 ( Edited 2017-01-15 11:42)

@TRASEVOL_DOG Call me crazy, but are able/allowed to reskin the TV to REDUCE the resolution?

I may have a need to have pixels in absolute centre for my game, so would need odd number of pixels (even if that means reducing to 9 pixels wide!) :o/

Thanks!

P#35754 2017-01-15 07:21 ( Edited 2017-01-15 12:21)

@ilkke yes you can use that part if you need it. :)

And no this is actually the only one hidden in the code I think! I added it just below the instructions on this thread yesterday too because I had people ask me about it. Sorry I didn't make it more clear!
Note also that modifying tv_text is also against the rules of the jam, since the rule is that all text outside the screen should be static. :)

@Liquidream Yes you can reduce the resolution! In fact, SeanS. LeBlanc already did it! :D

P#35770 2017-01-15 10:36 ( Edited 2017-01-15 16:44)

[0x0]

Tv_transparency_col = 14
Tv_screen_height = 16

Sharing my Gameboy skin

P#35775 2017-01-15 11:48 ( Edited 2017-01-15 16:50)
1

I'm pretty sure someone asked how to share a TV skin but then deleted their post... :/
But here's how you do it anyway!

that's a ctrl+C I'm doing at the end after I selected the half of the sprite-sheet and then you ctrl+V in a BBS post. :)

edit: looks like you figured it out! :3 Great skin, I love it!

P#35776 2017-01-15 11:49 ( Edited 2017-01-15 16:49)

Yeah haha I was stuck on how to select half the cart and totally forgot those buttons in the top left

Edit :The skins are almost TOO much fun to do. I have to force myself to actually make a game haha

P#35777 2017-01-15 11:51 ( Edited 2017-01-15 17:14)

I discovered that you can fix the awkward column of pixels in the center by changing the line in the off-limits section of code with "local lx=64+tv_xoffset" to "local lx=64.5+tv_xoffset" (note the .5).

Would I be allowed to use fix in my cart?

P#35781 2017-01-15 13:26 ( Edited 2017-01-15 18:26)

I fixed the fix! Yesterday's fix was using 7% of CPU for basically nothing when the TV was on so... um... yeah sorry.
Also I added qbicfeet's fix for the screen! Thank you qbicfeet!

hotfix .2 changelog:

  • Fixed unfair 7% CPU usage added when TV is on.
  • Fixed screen display, no more pixels not having the same size.

Again, very sorry for the inconvenience.
If you want you can apply the changes to the cart yourself:
Remove the "cls()" in the _update, after the "if tv_gameon then",originally at line 177.
In tv_draw_voxels() replace the first "64" after "for l=0,tv_height do", originally at line 269, with "64.5".

@qbicfeet: I invite you to download the new version of the cart or apply both of the changes. Thank you so much for your fix!

P#35783 2017-01-15 13:39 ( Edited 2017-01-15 18:44)

lemon arccade!
[0x0]
tv_screen_height=12

(yes, it works!) have fun!

edit: oops! 10x10, sorry!

P#35789 2017-01-15 14:31 ( Edited 2017-01-15 20:01)

btw, is it against the rules to sset() in the voxel data ?

P#35791 2017-01-15 15:08 ( Edited 2017-01-15 20:08)
Page:

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-19 10:48:35 | 0.050s | Q:87