lunar landar game

Discussion in 'Share Your Creations' started by bGoody_iPAC_rx1950PPC, Jan 3, 2008.

  1. bGoody_iPAC_rx1950PPC

    bGoody_iPAC_rx1950PPC Member Licensed User

    Weekend project I did.I hope people enjoy it...
    Use the '<left','right>',and 'up' keys on the "PPC" can be played on the DeskTop too.-Menu,s for both!!
    READOUTS are:::SHIP STATUS FUEL/SCORE ALT
    The deeper you go in the crater the more fuel you get when you land,
    not crash...L.O.L.
    Had to Shut off every other program on my IPAC-it uses alot of memory...
    You can compile for either-PPC or desktop it should work for both.
    need to convert jpegs pics to bmp pics first.

    No sound yet...
    Maybe later if I get the time!

    Tell me what you think of it,Brian
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    I recommend you to zip all files and upload the complete package.
     
  3. colin9876

    colin9876 Active Member Licensed User

    i cant wait to play this but theres a run error - not enough parentheses on the line
    fuel= abs(round(200-y)
     
    Last edited: Jan 3, 2008
  4. bGoody_iPAC_rx1950PPC

    bGoody_iPAC_rx1950PPC Member Licensed User

    colins

    just downloaded the program off the net. works fine on mine.
    it uses -crash5,moon1c and black.Never created zipped files before...
    the parameter in the round is ::: Label1.Text=Round(hf)
    Should work dll,s used are :::: image and hardware lib.---Thought
    people would have them,but i,ll try to make that ZIP file if it will fit in the memory restrictions on this server:sign0148:
    It will be late if I get that ZIP file done,after work!
     
  5. colin9876

    colin9876 Active Member Licensed User

    thats not the line!

    well Ive redownloaded it direct to the device and theres a close brackets missing on line 273
    fuel = abs(round(200-y) +200

    odd that it goes ok 4 u on the desktop because that wont go on the device IDE. (NB EREL thats what I mean about few people using BASIC4PPC on the PPC anymore lol!)

    update - wont get thro the v6 IDE either with that brackets error!

    Just out of interest Im curious of ur use of Timers. e.g. Timer4 does something once, U turn this on when u want that code to run and it turns itself straight off! Why not just call a standard sub procedure - why do this as a timer???
     
    Last edited: Jan 3, 2008
  6. colin9876

    colin9876 Active Member Licensed User

    Pitty me and my PDA!

    Hey dont know about Lunar Lander but its a flippin Treasure hunt just to get all the bits togther to get this to run on my PDA!

    Can anyone just compile it and post the device exe here so I can play it?
    Thanks
     
  7. Stellaferox

    Stellaferox Active Member Licensed User

    Put a bracket behind the last 200. That does the trick. parentheses are equalled then. Where are the BMP files besides the crash.bmp?
    Thnx
     
  8. taximania

    taximania Well-Known Member Licensed User

    Try google, ha ha ha
    I've been there all bloody night :-(
     
  9. colin9876

    colin9876 Active Member Licensed User

    ughhhh!

    ok Brian, I finally got it to work, and there are a few nice things about it. eg graphics are ok, but unfortunately I have to say there are some horrible ways of doing stuff.
    I point this out not to criticise u but as a constructive excercise.

    for example ...

    Timer1
    In this main loop text boxes are set, colors set etc
    every 10ms when they only need to be set once at the beginning.
    Having once only code re running in the main loop just slows it down.

    The use of Timers is horrible, there only needs to be one timer, not one for every procedure!!
    Turning a timer on which then turns itself off is a wateful way of just calling a sub procedure???

    hope u dont mind me pointing this out
     
    Last edited: Jan 4, 2008
  10. bGoody_iPAC_rx1950PPC

    bGoody_iPAC_rx1950PPC Member Licensed User

    landar zipped files

    Heres the zipped files you asked for.BMP file moon1c just fit...Has all the files used in the program.Had to make 2 of them.
    And yes I was having a bit of a problem with the timers.
    When you hit the up key the screen would freeze and not update??
    I knew someone would see my quick working fix....

    Now if I could get rid my mutated cold....I could maybe think straight
    again!!!! That program should of took me 1/2 day not the whole weekend.

    LOL -Anyway I hope people enjoy it.Maybe when I feel better I,ll try open
    gl with Basic4ppc-now that would be game!!!!! LATER every and have
    a great newyear,Ive got to getsome rest...
     

    Attached Files:

  11. colin9876

    colin9876 Active Member Licensed User

    Newtonian equations of motion!!

    well its an interesting coding style!
    by the way, just a tip, u might want to rethink the physics ..
    ppc=0.01
    at=at-.7
    a=a*.1+gr*3+at*.08
    v1=v1*ppc+a
    hf=(h1+v1)
    h1=hf+v1
    y=hf-1647
    ....is unclear and hugely redundant.

    Ive changed it to

    y=y+dy
    dy=dy+.3 'gravity effect
    if thrust up dy=dy - 2

    runs smoother, and drops better!
     
    Last edited: Jan 4, 2008
Loading...