Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Pause a lua script?

                  
   
  1. #11
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    67

    Default

    looks like progress..
    ..only thng is, not sure that a pause for the
    explosions a good idea coz its slowing all else on
    screen including player1.
    Suggest U blit each frame of the explosion multiple
    times.
    The PSP Vblanks at about 70hz, so for a 5 frame explosion
    lasting 1 sec, blit each frame for 14 screen
    flips using the standard:
    waitVblankStart() ; screen:flip()
    Update all other sprites at normal rate
    U'll need a Vblank counter and an explosion frame counter
    hope this makes some kinda sense..

  2. #12
    DCEmu Regular Anonymous D's Avatar
    Join Date
    Jul 2006
    Posts
    414
    Rep Power
    68

    Default

    so i blit each one 14 times? or flip the screen 14 times?

  3. #13
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    67

    Default

    this is getting tricky coz I still cant d/l
    ur code from mediafire for some reason, but NEway
    assuming a main loop like:

    while true do
    --read controls
    --for i=1,numberOfSprites do
    -- newSpritePosition(i)
    -- if hitest(i) then drawExplosion(i) else drawSprite(i) end
    --end
    --waitVblankStart() screen:flip()
    end

    you get about 70 flips per sec.
    in drawExplosion(), advance the explosion image
    by one frame every 14 flips (using flip/frame counters)
    to slow the explosion animation down by a
    factor of 14

  4. #14
    DCEmu Regular Anonymous D's Avatar
    Join Date
    Jul 2006
    Posts
    414
    Rep Power
    68

    Default

    im lost....im sure your perfectley right and all im just lost...ill upload my code that im using this for to somet other than mediafire for you..
    http://files-upload.com/369991/sides...erWIP.zip.html
    plz just edit and reupload for me im totally lost and this bug is soo anoying me.

  5. #15
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    67

    Default

    its probbly just my sloppy pseudo-code.
    cant promise NEthng b4 I see ur script,but I'd like to have
    a try at an edit..that link in ur post looks weird.Like
    mediafire, it didnt d/l for me. Maybe my server-its been
    up n' down like a yoyo on pcp recently. Can SUM1 post
    the .zip as an attachment here plz..?

  6. #16
    DCEmu Regular Anonymous D's Avatar
    Join Date
    Jul 2006
    Posts
    414
    Rep Power
    68

    Default

    ill try attaching it myself....

    worked..woot now i cant post releases properly to musta been somet up with my conection b4, anyways there it is dangee

  7. #17
    DCEmu Coder Safari Al's Avatar
    Join Date
    Mar 2007
    Location
    http://homebrewheaven.net
    Posts
    863
    Rep Power
    0

    Default

    I think there was a gamestate thing on evilmana
    Come Visit Homebrew Heaven, Where you'll find the latest gaming news and downloads!

    View My Coding Blog


    The Return of The Lounge!
    Mario Gold Rush
    Current C++ Project: To be Announced soon on Homebrew Heaven

    Currently Coding in: C++ for the PSP

  8. #18
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    67

    Thumbs up Im gonna have a cuppa tea now

    k,got it..think i can help out (those are weerd
    bullets..) First off, am adding a quit control and life
    counter -1 for +1 after a hit..

    *EDIT*now know Y my pseudo-code didnt make sense - thought it was NMEs Xploding , not player1!
    (ignore that thng about the life counter,it was only to stop game over at 0)
    should have a working first edit posted soonish..
    *EDIT*..here it is, had to change the structures a bit.the pause logics near the top of the main loop.

  9. #19
    DCEmu Regular Anonymous D's Avatar
    Join Date
    Jul 2006
    Posts
    414
    Rep Power
    68

    Default

    thanks a lot dangee, i will credit you if i ever get this thing into as full game. i may re interprit if you dont mind. but i see what you mean with it thanks a lot.

    edit: Ive added the same sort of thing you wer doing into my original code, so as i can understand it better. thanks for showing me how to do it though.

  10. #20
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    67

    Talking

    well,thanx for persevering despite all the Gremlinz.
    feels good, happy to have helped, & looking forward to playing version 1.0.

    on the SFX : np354 used these WAV settings for SMM -
    8 bit PCM Mono..

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •