This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
StarCastler's profile picture

Bomb

Started by StarCastler, 26 February 2016 - 03:38 PM
StarCastler #1
Posted 26 February 2016 - 04:38 PM
Hello all! I have created a game called Bomb, in which you must stop falling bombs from reaching the bottom of the screen!

Screenshots:
[attachment=2508:2016-02-26_11.28.52.png]
[attachment=2509:2016-02-26_11.29.07.png]

So anyway, the game is slightly buggy and could probably be improved but here you go.


Installer V 1.1:
pastebin get bHtUgM09
Installer V 1.2:
pastebin get 48k40S9w

V 1.1: Floppy Disk install, old release.
V 1.2 Hard Drive install, new release.

Custom Backgrounds should work, just make sure you put a custom background as /images/applications/Background.img
Feel free to make all sorts of backgrounds. :)/>
Edited on 03 March 2016 - 01:16 AM
LDDestroier #2
Posted 29 February 2016 - 01:05 PM
Kaboom! For the atari!
StarCastler #3
Posted 29 February 2016 - 10:28 PM
;)/>
I plan on updating the installer soon to allow for installation & playing anywhere. Nice to see someone else knows about old games too!
Bomb Bloke #4
Posted 06 March 2016 - 12:03 PM
You've got a bit of flickering going on there…

A quick workaround for that is to add these lines into your rendering loop:

  while gameplay == true do
    --Draw the sprites
    term.current().setVisible(true)
    term.current().setVisible(false)
    term.clear()

Advanced computers run everything though windows by default, and you can use those windows as stop-gap display buffers to smooth rendering (by toggling their visibility). Note that this works much better in CC 1.74 or later.

Really though, you want to stop redrawing the whole display every time something moves. You can do this to draw individual pixels from your loaded images:

paintutils.drawPixel(x, y, world[y][x])

By keeping track of where your bombs / bucket were located during the last display update, you can track exactly which pixels of the world need to be redrawn, and skip drawing all the rest.