Log In  

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

Cart #32676 | 2016-11-21 | Embed ▽ | No License

1 comment


I'm so excited about the new Pocket C.H.I.P. where I will be creating games on. That's why I just created my account.

PRE-ORDER CONFIRMED!

Thanks for your pre-order! It’s confirmed in our system and estimated to ship this November . Look for another email from us to confirm your shipping address closer to your estimated ship date.

Date 11/12/2016

And that's it. I wish all of you an awesome weekend.

0 comments


Hello there.
This is my first post. I will try to write about PICO-8 from a view of amateur who try to solve problems and write about them. Write about his first steps in programming, music creating etc.

CHAPTER ONE: PICO-8 and DROPBOX

It was not so hard to see, where to start. PICO-ZINE makes great introduction especially with the SQUASHY game. But lets start with something other.

How to start pico in another directory:
If you got Dropbox and you are using PICO-8 on more than one computer, than is a really good way to store your project on Dropbox. I`ve got really trouble to change the config where the directories are for PICO. So lets see how to do it:

This steps will be for those, who are running PICO-8 for the first time.
If you got config.txt, just skip to step 6.

  1. Run PICO-8
  2. Type FOLDER and press ENTER
  3. You will see, where the main directory of PICO8 is.
    Don't be fooled, if you don't see any config.txt
  4. Exit PICO-8 (now PICO-8 writes a config.txt)
  5. If you haven't see config.txt, now you should see it.
  6. Just edit it and change the thing you would like (paths...)
  7. RUN PICO-8 and see if something changes.

[ Continue Reading.. ]

2
2 comments


Character generator 3D test

1
0 comments


i have to count frames a lot because i'm using them to base the timing for the rhythm game and the clock. rather than having some global variable i increment every update (which would then require some kind of modulo operation to check, say, if we are on an even numbered frame) i decided to use the closure technique to make a counter that resets after a certain number of frames.

function frame_looper(frames)
 local f = 0
 return function()
         f += 1
         if (f>frames) f=1
         return f
        end
end

here i have a function FRAME_LOOPER that takes a number of frames. it creates a local variable f and then returns an anonymous function that when called returns that local variable f. we can now make a variable that uses a frame_looper as a counter.

beat_counter = frame_looper(10)

now in my _update function i can just call beat_counter() and i'll get back a number from 1-10 depending on how many times the function has been called. rather than having to declare some random variable and set and increment it every update, that local variable f that was enclosed in the anonymous function gets generated every update.

i'm still new to all of this, but i was able to use the technique for two other parts of my code that also work on a counter like this.

function drum_beater(accents)
 local i,s = 0,0
 return function ()
    i += 1
    if (i > #accents) i=1

    if accents[i] then
      s=0
    else s=1 end   
    sfx(s)
 end
end

accent1 = {true,false,false,false}
drum = drum_beater(accent1)

--[[ moonbeat:
used in _draw to flicker the
moon sprite]]--
function moonbeat(b)
 local moon = {x=80,y=40,
               r=8,col=10}
 return function()
         if b == beat_frame then
          moon.r = 10
         end
         return circfill(
           moon.x,moon.y,
           moon.r,moon.col)
        end            
end

moon = moonbeat(0)

[ Continue Reading.. ]

1 comment


I couldn't help myself, naming the title that; just thought it was too much of a cliche to miss.

Anyways, my name is Rollerstar and I am an Australian Indie Dev!

In the coming weeks I will be doing my final exams for secondary school! (Yea I'm pretty young...)

So on the balance of study and play, I will hopefully be working on a few exciting projects :P

I only discovered PICO-8 about a week ago, I was on itch.io looking for web games when I came across several titles which all had the same start screen. Originally I thought this must be included in all the games because of all the game jam they were participating in and after a quick google search, I couldn't find anything.

However eventually I stumbled upon this 'fantasy console' and I've been intrigued ever since, I think the whole thing is frikkin awesome and I cannot wait to delve into this new and exciting world!

So I guess if you're interested in seeing what I come up with, keep your tabs open and maybe, eventually.... I'll have something to show!

Glad to be a part of this community and see you all soon :P

Rollerstar[i]

[ Continue Reading.. ]

6 comments


Now that I'm remembering code I wrote on other computer platforms (ow my head !) I am reminded of one unique feature that the Commodore Amiga 1000 had, and that was HARDWARE SPRITES.

Yessirree, I did not remember until now, just how powerful these little things were.

You had 16 of them, they used color sets 17-19, 21-23, 25-27, and 29-31. They could be any size vertical but only 16-pixels across. Not very exciting in itself, but let me explain.

In the Commodore Amiga, you could use one of these hardware sprites and it would appear on top of graphics. No, that's not correct. They would appear on TOP of graphics. That is, you did not plot them, you INVOKED these sprites, and when you did, when you changed their position, for instance, the background of what was beneath them was always remembered and untouched.

In the Commodore Amiga, you could give a hardware sprite an acceleration, that is, you could give one say AX+=.1 and AY=0 and it would creep to the right across the screen, but ALSO continue to creep even after you stopped running your code.

Curious little things. With the many ignored suggestions, I'd like to add this one, that PICO have the ability of being able to work with 16 "hardware" sprites. However, instead of being limited to 8 or 16-pixels across, you can choose the number of tiles it works with.

It also would not have a limited palette but be able to use the full 15-color set (with zero to show background through).

The advantage of this would be clear. You could invoke these sprites and not have to worry about "cleanup" behind when they moved off of an area. By giving them an acceleration, they would continue to move and not need code to continuously "push" it.

Additionally, you could not READ these sprites. That is, if you had a solid black screen and you invoked a sprite, say 8x8 that was white to appear in the top-left-hand corner, reading directly the pixels there would STILL be black, as these "hardware" sprites have their own invisible layer and would not be read by PGET().

MHWSPR(n,x,y,h,v) Make HW Sprite ID #n from tile set position x,y size across h and v down
RHWSPR(n) remove HW Sprite ID # n
HWSPR(n,x,y,a,b) move sprite #n to pixel x,y or, if zeroes, a & b are acceleration with real numbers.
s=(HWSPRCOL(n)) return 0 if no collisions or ID # if collided into other HW sprite

Collision checking is done by overlapping pixels, not area.

4 comments


Cart #31305 | 2016-10-20 | Embed ▽ | No License
1

1
5 comments


I am receiving this:

I suspect this means I will not be able to post my game Online. Any ideas ?

0 comments


Just came across another nasty little thing about PICO. When referring to an array, it does not round down to the nearest integer when you make a regular array. Try the following:

cls()
a={}

for i=0,7 do
  a[i]=i+1
end

for i=0,7,.5 do
  print(a[i])
end

The results are:
1 NIL 2 NIL 3 NIL 4 NIL 5 NIL 6 NIL 7 NIL 8

Let's try the same thing in BlitzMAX:

Strict
Local i#,a[8] ' must be +1 of total (0-7)

For i#=0 To 7
  a#[i]=i+1
Next

For i#=0 To 7 Step .5
  Print a#[i]
Next

The # represents that this is a floating point variable.

Results in this case are:
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8

Which is the standard reply from this and many other BASIC programming languages.

Now apparently this does mean that it is possible to have fractional arrays. Something I've never seen until now.

14 comments


Many programming languages allow you to make direct changes to arrays at a memory level using a command called VARPTR.

https://www.youtube.com/watch?v=sdZahXk-e9Y

What I would like to do is:

a=""
for i=0,8191 do
  a=a.."*"
end

memcpy(24576,varptr(a),8192)
repeat
  flip()
until forever

Is this possible to do in PICO ?

10 comments


In trying to optimize my code, I was working on this:

cls()
a=254
c=0
b=band(a,2^c)
print(b)

Results are: 0, which is correct. There are no #1 (zero) bits in the number 254.

Now try this:

cls()
a=254
c=0
b=sgn(band(a,2^c))
print(b)

The result is: 1, which is INCORRECT. There are no #1 (zero) bits in the number 254.

With problems like these, it's no wonder we're constantly fighting code - as in this case - it's not my fault for this particular calculation coming up wrong.

2 comments


I can see how to have a string linked to another thus:

cls()
a=[[apple
juice]]
print(a)

apple
juice

However, how do you link a string to another on 2-lines that does not put a CR (#10) inside the text between code lines ?

cls()
print[[apple;;
juice]])

applejuice

How do you do it ?

2 comments


Every programmer worth their salt knows the difference between LOCAL and GLOBAL variables.

But I was wondering, what if you could reverse that ?

That is, when you define a function, you have the option of saying GLOBAL in there, either to define a global variable, or just to make a flag change.

Because by doing so ANY variables at that point which are not issued as GLOBAL automatically default to LOCAL.

For programs that do not use too many global variables, this might be an easier way to code as you would not have to assign each and every local variable for each and every function.

Thoughts ?

2 comments


[8x8]

Well guys, if I can pull you from your projects for just a short moment. I =WOULD= like to wish each and every one of you a very safe and Happy Halloween.

http://www.writerscafe.org/writing/dw817/1838331/

I =WILL= be writing a Halloween themed game in PICO-8 based on an old Apple ][ classic. How about you, are you going to write any Halloween or Haunted House themed games this holiday season for others to try out and enjoy ?

1
2 comments


Simple question. Difficult answer likely. Is there any way to FORCE the mouse to a position ?

That is, I can select MOVEMOUSE(0,0) and the mouse cursor will suddenly appear at the top. It's not an X/Y adjustment either, it TRULY moves the mouse pointer there so that if I pick up the mouse and move it slightly up, it will be out of the application.

If I just do a mathematical adjustment, I'll quickly be off the edge of the screen with a mouse that is off-center in reading.

I want to do this for my input routine as I want it to be intuitive when it already knows where the player is moving it to.

0 comments


Picoscope2016 is coming in April 2017

Hi,

We are organising a PICO-8 coding party in France.
You are welcome to join us in the workshops.

=> Website (near 30 places remaining)
=> Follow us on facebook and/or twitter

jihem (@wdwave)

1
7 comments


So, in between lunch breaks, I've made tiny-but-significant progress in my level generation code. It's part of a "bigger picture" thing, and meant to be useful across multiple projects; since I'm kind of digging into proc-gen core gaming. Even this little project is a proof-of-concept of a major undertaking, depending on if I can squish this into tokens available.

The idea here is to take a number of levels "LV" and make each one a 15-plus-one table - the first 15 being a kind of "perlin noise" function used to script "rooms" into the level, and the last being a control variable "BIOME" which influences the level's colors, themed elements, etc. I'm planning on coupling this with horizontal and vertical "targets" - ones to collect, ones to avoid, ones to attack, etc. Well, a "target" can be oriented both vertically and horizontally, and in varying speeds (more on this after my next WIP major chunk of code, "MAKETARGET()").

So MAKELEVEL(3) would generate 3 "output" tables:

LVL1={n1,n2...n15,biome}
LVL2={n1,n2...n15,biome}
LVL3={n1,n2...n15,biome}

...and then these tables will define the 5x3 screen map of each level.

I'll have to add "biome control" in later scripting, depending on the kind of game it generates, after the level generation. The "doorway" table definition occurs BEFORE it runs... for instance, it makes sense for a platformer to limit "doorways" to being {0,4,5,9,10,14}, where in top-down adventure or RPG games, it could be anywhere.

That said... still checking this for proper P8 syntax, and to see if it can be simplified. Being intermediate-level at best, I have the suspicion this can be streamlined a little bit still. Maybe even a lot.

function makelevel(lv or 15)
 if (lv>15) lv=15
 winlevel=lv
 for lv>0, do
  "lvl"lv={}
  level={scr1=0,scr2=0,scr3=0,scr4=0,scr5=0,scr6=0,scr7=0,scr8=0,scr9=0,scr10=0,scr11=0,scr12=0,scr13=0,scr14=0,scr15=0,biome}
-- create sequence of 16 doors
-- we don't have to use them all
 doorshuf={rnd(1,6),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5)}
 ezpath={}
 hdpath={}
 d=0
 n=1
 for n=1 to lv do
  d+=doorshuf(n)
  add doorlist (return doorways,d)
  n+=1
  end
--each exit makes a short,
--high-risk way, then a long
--low-risk alternative
 for n=1 to lv do
  stdoor=doorlist(n)
  endoor=doorlist(n+1)
--vertical paths?
  vstep=(stdoor/5)-(endoor/5)
  if (vstep<0) vstep*=-1
--horizontal paths?
  hstep=(stdoor\5)-(endoor\5)
  if (hstep<0) hstep*=-1
--add values to paths
  for n=vstep to 0 do
   if (stdoor/5)<(endoor/5) 
   then 
   add ezpath "5"
   add hdpath "5"
   else 
   add ezpath "-5"
   add hdpath "-5"
   vstep-=1
   end
  for n=hstep to 0 do
   if (stdoor\5)<(endoor\5)
   then 
   add ezpath "1"
   add hdpath "1"
   else
   add ezpath "-1"
   add hdpath "-1"
   hstep-=1
   end
 end
 add ezpath {"1","-1","5","-5"}
 if (#hdpath<3) add hdpath{"1","-1"}
--shuffle ezpath/hdpath order
 shuf(ezpath)
 shuf(hdpath)
--read paths, edit level table
	local pos=stdoor
	for i=#hdpath,2,-1 do
		local step={
		-1=(makelevel(pos)+=18,makelevel(pos-1)+=4,pos-=1),
		 1=(makelevel(pos)+=20,makelevel(pos+1)+=2,pos+=1),
		-5=(makelevel(pos)+=17,makelevel(pos-5)+=8,pos-=5),
		 5=(makelevel(pos)+=24,makelevel(pos+5)+=1,pos+=5)}
		end
	local pos=stdoor
	for i=#ezpath,2,-1 do
		local step={
		-1=(makelevel(pos)+=2,makelevel(pos-1)+=4,pos-=1),
		 1=(makelevel(pos)+=4,makelevel(pos+1)+=2,pos+=1),
		-5=(makelevel(pos)+=1,makelevel(pos-5)+=8,pos-=5),
		 5=(makelevel(pos)+=8,makelevel(pos+5)+=1,pos+=5)}
		end
	--return generated results as a
	--list of "lvl1,lvl2" tables...
	return "lvl"lv{}=level{}
 end

end

[ Continue Reading.. ]

1 comment


Was using PICO's sound editor and after highlighting a region, pressed CTRL-C. Then ALT-TABBED to a different PICO already open, and pressed CTRL-V. It did not copy.

Isn't it possible to transfer audio from one cart to the next without having to manually look at one screen and type digit values on the next ?

And, for that matter, does anyone know the length of audio in memory ? The instructions say:

0x3200 sfx
0x4300 user data

Is this then saying that sound effects are 4352-bytes in length in toto ? And, does anyone have a schematic for the sound cel ? How many bytes are used to save one sound, for instance ?

2 comments


Just a quick update:

  • I'm still alive. I was uploading updates almost daily at first but now I'm at a point where I needed new enemies and mechanics to expand the level, and I needed an expanded level to showcase the new enemies and mechanics, so I've just added lots and lots of new stuff, to upload all at once.

  • There's now health pickups (not many though)

  • There are 8 (or 10, not yet decided) golden cups to collect throughout the world. These are a kind of side-objective to officially '100%' the game.

  • There are now archers. Lots of archers.

  • There's knights. Knights will destroy you pretty quickly and they take a lot of hits. They're quite easy to kill once you get the hang of it though

  • The world map is almost entirely complete. I've finished 30 out of the maximum 32 screens.

  • There are two new bits of music

  • I'm currently working on the final boss room. After having finished this, the game will basically be complete

  • I'm toying with the idea of having a menu when you die, that shows stuff like how many cups you've collected, how many enemies you've killed and how many map tiles you've visited on that one particular run, then give you a percentage to show a score of how much you've done. This is so that even if you die early on in the game, you can get numerical proof when you get better at the game.

Not going to upload the newest build until the boss is functional, I think.

That's it really :D Taaa

3 comments




Top    Load More Posts ->