Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: bitrunner  (Read 1399 times)

codezero

  • Bay Watcher
    • View Profile
bitrunner
« on: November 05, 2009, 07:20:45 pm »

A quick game I adapted from some old garbage. It's written in freebasic and includes the source, there's plenty of optimisations and stuff you can make to it (the code is shit in other words ;D)

Dodge the purple pixels and collect the treasure.

http://www.mediafire.com/?yzdtwmq2mnz (74k)
« Last Edit: November 11, 2009, 01:02:43 am by codezero »
Logged

Tahin

  • Bay Watcher
    • View Profile
Re: bitrunner
« Reply #1 on: November 06, 2009, 04:10:11 am »

I like it. There seems to be a bug with the treasure and score where it's interpreting it as some huge number and thus it's displaying as something like 0.0000000000E+00. That said, I'm running it in Wine and I don't know if it has the same problem in Windows. Other than that it seems to run perfectly, so I don't know. Anyway, keep up the good work.
Logged

codezero

  • Bay Watcher
    • View Profile
Re: bitrunner
« Reply #2 on: November 06, 2009, 05:24:34 am »

Thanks mate. I rarely get a game to turn out this good. That bug I think has to do with converting integers to decimals, should be easy to get around but I didn't see it as a high priority. I'm working on it now, got a couple of different modes in and about to make it so the high scores are saved. I'll probably update the link soon.
Logged

codezero

  • Bay Watcher
    • View Profile
Re: bitrunner
« Reply #3 on: November 06, 2009, 07:04:44 am »

Updated the first link.
Logged

eerr

  • Bay Watcher
    • View Profile
Re: bitrunner
« Reply #4 on: November 10, 2009, 03:51:30 pm »

Add a cast to integer?
Logged

codezero

  • Bay Watcher
    • View Profile
Re: bitrunner
« Reply #5 on: November 11, 2009, 12:58:28 am »

I think int(num) should do that anyway. The code was something like int(score*100)*.01. Seems to work now anyway.
Logged

zchris13

  • Bay Watcher
  • YOU SPIN ME RIGHT ROUND~
    • View Profile
Re: bitrunner
« Reply #6 on: November 11, 2009, 09:13:34 pm »

wouldn't a /100 work just as well as a *.01
Logged
this sigtext was furiously out-of-date and has been jettisoned

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: bitrunner
« Reply #7 on: November 11, 2009, 09:21:04 pm »

Just a slight issue, when an enemy(or the player, but it's less of a problem) crosses the boundary or treasure circles, and moved on, it leaves a graphical gap. For the player, leaving ends the game, and getting a treasure removes it, but the way the enemies carelessly delete pixels...

Not a problem unless you played with the intention of completely erasing anything, and maybe even an intended feature.
Logged
Eh?
Eh!

codezero

  • Bay Watcher
    • View Profile
Re: bitrunner
« Reply #8 on: November 11, 2009, 10:31:31 pm »

wouldn't a /100 work just as well as a *.01
Yeah it would, but it's less expensive to compute a multiply , even though this isn't a critical area, so it was just a case of habit.

...
I know it can be a problem, I just didn't bother :P, seeing as it's not the most quality game/distraction. I will if you want though. Or you could if you d/l the freebasic compiler. I guess just put a check in the main loop to see if anything is within a bound-box of a ring and redraw it.

Spoiler (click to show/hide)

If you can figure out where to put all that, and you're a better programmer than me IIRC anyway, go ahead. Download freebasic compiler and run from the command line "fbc brunner.bas". It's even likely the source is more up-to-date than the .exe, but not by much. (Haven't logged into windows for a while for a win compile)

afterthought: Or you could use a sqr, probably wouldn't be any cheaper drawing the circle unnessacarily all the time. fk i can't spell that word.
« Last Edit: November 12, 2009, 04:42:47 am by codezero »
Logged