Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Label as a string var
#4
I'm playing with <!-- m --><a class="postlink" href="http://www.worldofspectrum.org/infoseekid.cgi?id=0027713">http://www.worldofspectrum.org/infoseek ... id=0027713</a><!-- m --> to see about updating it.

I wrote a tutorial for ZX Basic on how I did that - and you may find some hints and tips useful. OCMan is very cool - but hard to read. You still have line numbers. (And my ability to read in Spanish is not good, which doesn't help Wink

I try to write procedurally - so I have things like


updateGhosts()
displayScore()
MovePlayer()

As procedures - it should (language aside) hopefully be clear what each line does at the top level.

In fact - my main loop and start point is crazy simple to read (and does so much!) - Without comments and fluff - the whole running game looks like this as a loop:

Code:
'Main loop
    do
        updatePlayer()
        updateGhosts()
        collisionCheck()
        updateTimers()
    loop

So I'm suggesting that you can use this procedural bottom up/ top down approach to make programs easier to read - and being more modular, you can more easily re-use parts in other programs.

For example print42 is just a few subroutines, really - but it's easy to plug into another program from the library!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)