A compo for the lazy of us.

Announce and discuss the progress of your various programming-related projects...programs, games, websites, tutorials, libraries...anything!

Moderators: Pete, Mods

Post Reply
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

A compo for the lazy of us.

Post by {Nathan} »

Heres a compo that will last until August 31, starting when you read this (because I know you will get started ASAP). Here it is.

A low-line pixel scroller!

here are the rules: at least 3 tiles
at least a 20 by 20 map
no random generation
must be pixel by pixel
can be in freebasic
if you chain to another program, it still counts as code. it is how many lines of code you have.
and NO COLINS!!!
Image
SBM Productions
Coder
Posts: 11
Joined: Sat Jan 08, 2005 8:56 am
Location: Australia
Contact:

Post by SBM Productions »

hmm. I might enter that. Is there an fps limit?

EDIT:
Here's my entry

Code: Select all

SCREEN 13
DIM tiles%(19, 19, 2), map%(19, 19), mapx AS INTEGER, mapy AS INTEGER
FOR i% = 0 TO 399
tiles%(i% \ 20, i% MOD 20, 0) = (i% \ 20) XOR (i% MOD 20) + 16
tiles%(i% \ 20, i% MOD 20, 1) = ((i% \ 20) + (i% MOD 20)) \ 2 + 16
tiles%(i% \ 20, i% MOD 20, 2) = SQR((i% \ 20 - 10) ^ 2 + (-10 + i% MOD 20) ^ 2) + 16
map%(i% \ 20, i% MOD 20) = INT(SIN(i% \ 20) * COS(i% MOD 20) * 1.5 + 1.5)
NEXT
DO
FOR i% = 0 TO 10000
macmpx = (mapx + i% \ 100) \ 20
macmpy = (mapy + i% MOD 100) \ 20
PSET (i% \ 100, i% MOD 100), tiles%((mapx + i% \ 100) MOD 20, (mapy + i% MOD 100) MOD 20, map%(macmpx, macmpy))
NEXT
k$ = INKEY$
IF k$ = "w" AND mapy > 0 THEN mapy = mapy - 1
IF k$ = "a" AND mapx > 0 THEN mapx = mapx - 1
IF k$ = "s" AND mapy < 299 THEN mapy = mapy + 1
IF k$ = "d" AND mapx < 299 THEN mapx = mapx + 1
LOOP UNTIL k$ = CHR$(27)
20 lines...
Post Reply