Log In  
Follow
oehqoehfo

PROGRAMMER. I like programming! Love it! What a cool job!

[ :: Read More :: ]
   for i=0,i<10,1 do
      if dset(i, variable) exists
         dset(i+1,variable);
     elseif dset(i,variable) doesnt exist
        dset(i,variable);
     end

   end

I want to do something like the code above.

I know the code isn't right (somehow user must break the for loop)but it's just an idea.
but I don't know if it is possible to do so.

scores should be saved everytime user finishes the game but to implement that feature, I should check if previous value in dset returns something.

If user finished game 10 times, 10 scores should be saved

P#52315 2018-05-03 08:28 ( Edited 2018-05-04 13:27)

[ :: Read More :: ]

the image is map of my game.

pink rectangles are empty sprite on the map.

If game characters enters the location of these empty sprites, some events should happen.

I asked similar question some days ago, a person said me to use mget method.

https://www.lexaloffle.com/bbs/?pid=51536#p51536

I thought I should compare player's x coordinate and y coordinate to coordinates of sprite. I tried some days but nothing helped.

p={
    x= --x coordinate of player
    y= --y coordinate of player
}

p.x and p.y are coordinates of player. I can't change that because my code has 600~700 lines..

could someone help me with simple examples or description?

P#52131 2018-04-29 08:58 ( Edited 2018-04-30 19:27)

[ :: Read More :: ]

Well It's really annoying to me
Fxxxxxx annoying

I am currently making a HP bar which decreases when user and monster collide

I have been trying to solve problem more than 5 hours but nothing worked.

   enemies={}
   enemyAttackdelay = 1;
   function _draw()
      --[[codes]]
      hpstatus(0);
   end
   function enemies.move(e)

   end
   function hpstatus()
   end
P#51575 2018-04-13 09:26 ( Edited 2018-04-16 08:03)

[ :: Read More :: ]

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!

P#51536 2018-04-12 05:03 ( Edited 2018-04-16 07:24)

[ :: Read More :: ]

Hi

I am making a ninja game now.

I need a really cool background music. I tried to use music editor with PICO-8 but I don't I have any sense of creating

a cool music. Creating a music was really simple, but create a good or cool music is a different thing which requires

talent of creating music which is totally unrelated with coding.

That's why I am looking for a cool music which is allowed to use free.

I tried to google "pico-8 free music" "free song pico-8" but found nothing.

P#51328 2018-04-05 04:30 ( Edited 2018-04-08 14:10)

[ :: Read More :: ]

Well I am new to lua and pico-8

In javascript, it is possible to force run inner function after some seconds with setTimeout();

setTimeout(function(){},5000);

and I am looking for something similar method or function in lua or pico-8

this is my code

function define_level()
    local level = 'level'..levels;
    show_level(level);
end
function show_level(level)
    print(level,54,64,8);
end

levels is number.

I want to hide or remove text which is printed with print(level, 54,64,8);
after some seconds.

Any tips?

P#50729 2018-03-23 08:23 ( Edited 2018-03-24 17:20)

[ :: Read More :: ]

Hello I started lua programming just yesterday.

Because my project should be started right now, I hadn't so much time to read through lua tutorials.

I am an web developer and I have never seen such errors when I worked with Javascript and Java and I don't understand meaning of the error.

This is my code

The error is occured in function drawLife.draw()

function _draw()
    cls();
    rectfill(0,0,128,128,12);
    rectfill(0,72,128,128,7);
    clouds.draw();
    mapdraw(16,16);
    mapdraw(0,0);
    enemies.draw();
    bullets.draw();
    p.draw();
    mapdraw(16,0);
    fires.draw();
    score.draw();
    drawLife.draw();
    print(bullets.type,4,4,7);
end
function drawLife.draw()
    rectfill(80,80,60,60,#FF004D);
    rectfill(80,80,60,60,#FF004D);
    rectfill(80,80,60,60,#FF004D);
    rectfill(80,80,60,60,#FF004D);
    rectfill(80,80,60,60,#FF004D);
end

I added .draw() after drawLife because I got lua code from my friend's brother who is game developer... and there were many .draw() and :draw() after the function name.. I need to learn about that

P#50691 2018-03-22 05:12 ( Edited 2018-03-23 10:27)