Log In  

@Paul Knight

Follow
Follow

Having a bash at coding 30 years after I dabbled on the Vic 20, Spectrum, Atari ST etc... Tried python, but the self contained IDE offered by Pico-8, the retro feel, and imposed limitations are appealing - developing something for this platform will be much more fun, and much, much more achievable! I'm all about learning on lo-fi stuff, and progressing from there, although with the big community that seems to be popping up around Pico-8 development, why would I want to move on!! Fun, Fun, Fun ;-)

Cart [#dijikehutu-0#] | Code | 2018-11-28 | License: CC4-BY-NC-SA | Embed
1

Very basic!

Avoid the crabs and collect the gold to get the highest score.

Simple :-)

Thanks for looking

P#59424 2018-11-28 20:02 ( Edited 2018-11-28 20:14)

Cart [#59272#] | Code | 2018-11-21 | License: CC4-BY-NC-SA | Embed

This is very much a work in progress, and is really to try out a few ideas.

Basically, it allows you to see the impact on total spends of a project portfolio (fixed to 3 at the moment) at a particular time, if individual projects are moved within the overall scheduling of the projects.

To move projects along the timeline, use the up/down cursors to move the orange pointer to the project you want to move, then the left/right arrow keys to move it back and forwards on the timeline.

Once the projects have all been scheduled, move the orange pointer up to the "Timeline Zone" and the left/right arrow keys will move the red "timeline now" line along the project schedule. The total cost of the projects at that point will be show at the bottom of the screen, together with the total project cost when all projects have been completed.

A spend profile (the rate at which money is spent) is overlaid on the project timelines, and moves in real time as the individual projects are moved.

For now, individual projects have a fixed duration (hard coded), and it is assumed that the total cost of each project is spend linearly. I want to add flexible cost rates so for example, a project spend rate can be set to relatively low at the beginning and end of a project, with a higher spend rate in the middle of a project, when the work is really in full swing.

Lots more to do including autoscaling of the project spend profile, individual project spend profiles (rather than assume linear spend), on-the-fly changes to individual project parameters e.g. total value, duration etc...

Anyway, this cart will likely have very limited appeal to most, but I thought I'd post it anyway!!

Thanks for looking,
Paul.

P#59273 2018-11-21 15:03 ( Edited 2018-11-25 11:42)

Cart [#50556#] | Code | 2018-03-18 | License: CC4-BY-NC-SA | Embed

This is my first posted cartridge.

Its just a concept at the moment, to see if a fun game could even be made from it.

Basically, you need to collect the sample vials (much better collision detection needed) before you are irradiated by too much radiation.

As you move around, you build up a radiation map to help you avoid radiation "hot spots".

There are 3 radiation sources, and you can also mark them up by clicking on them using the mouse when you think you know where they are.

Pressing Z actually shows where they are (this would not be enabled if I made a game from it) and X hide the sources again.

Anyway, all comments much appreciated :-)

Thanks for looking!

P#50557 2018-03-18 05:49 ( Edited 2018-03-18 09:49)

Cart [#42682#] | Code | 2017-07-21 | License: CC4-BY-NC-SA | Embed

Hi,

I was hoping someone might be able to help me with a 'newbie' question please.

I want to be able to move a mouse pointer around, and then when the mouse is clicked, record the x and y position and place a sprite in that position. The next time the mouse button is pressed, a second sprite is displayed at the new mouse position, and then finally, a third upon another mouse button click. Further mouse button clicks will then re-position the first sprite and so on......

This should leave 3 sprites on the screen, and record their positions.

The current code does this, and displays the x/y position of each sprite. The problem I have is that a single "mouse click" event is hard to make and the code loops round very quickly making discrete sprite positioning difficult.

Can anyone please suggest a way to remedy this?

Any help would be much appreciated.

Kind regards,
Paul :-)

P#42683 2017-07-21 15:57 ( Edited 2017-07-25 11:50)

Hi all.

A newbie question!

I am using the PGET command to read the value of a pixel as you move a point around the screen.

The code I have written seems to work fine in the X axis, but the y-axis is offset for some reason.

If you move the point over the yellow square from left to right, the PGET command successfully reads the pixel colour value.

If you move the point over the yellow square from top to bottom, the PGET command is offset by approx 6 pixels.

Strange.

Am I missing something?

Any advice would be very much appreciated.

Many thanks

Paul :-)

PS:

Code pasted below.

x={}
y={}
x=50
y=50
cls()

function _update()
if btn(1) then x=x+1 end
if btn(0) then x=x-1 end
if btn(3) then y=y+1 end
if btn(2) then y=y-1 end
a=pget(x,y)
end

function _draw()
rectfill (0,0,124,124,0)
rectfill (50,50,70,70,10)
pset(x,y,7)
print(a)
end

P#40796 2017-05-20 10:46 ( Edited 2017-05-21 20:22)

Hi,

I've been dabbling in Pico-8 since yesterday and am loving it so far! However, I have come up against a really frustrating problem and have spent hours trying to figure out why my code doesnt work. I keep getting a
"then" expected near "=" error up, for the line highlighted in the code below. Any ideas of why this isn't working would be very much appreciated!!!

All the best,
Paul.

player = {}
player.x = 5
player.y = 5
player.sprite = 0
player.speed = 2
crab = {}
crab.x = 50
crab.y = 50
crab.sprite = 9
crab.ran = 1

function mover()
player.moving = true
player.sprite += 1
if player.sprite > 4 then
player.sprite = 0
end
end

function movel()
player.moving = true
player.sprite -= 1
if player.sprite <4 then
player.sprite = 8
end
end

function crabmov()
crab.ran = flr(rnd(2))
if crab.ran = 0 then <------------------
crab.x -= 1
end
if crab.ran = 1 then
crab.x += 1
end
end

function _update()
player.moving = false

if btn(0) then
player.x -= player.speed
movel()
end
if btn(1) then
player.x += player.speed
mover()
end
if btn(2) then
player.y -= player.speed
movel()
end
if btn(3) then
player.y += player.speed
mover()
end
if not player.moving then
player.sprite = 0
end

-- decide if the crab moves left or right
crabmov()

end

function _draw()
--cls()
rectfill (0,0,128,128,13)
spr(player.sprite, player.x, player.y)
spr(crab.sprite, crab.x, crab.y)

end

P#26080 2016-07-29 09:05 ( Edited 2016-07-29 15:11)

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-10-16 18:07 | 0.092s | 4194k | Q:55