123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|591|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Wednesday Workshop -> #200 - The 2000 Challenge!

Tue, 05 May 2009, 15:31
Jayenkai

#200 - The 2000 Challenge


The Challenge

No more than 100 characters wide, and a maximum of 20 lines.
That's 2000 characters to make the best game that you can!
Get to it!!!

The Time

Wed 6th May -> 13th May, 2009
You have until this timer hits zero to complete your entry. For the record, that's Tue/Wed, midnight GMT*. (Although that's more frequently becoming "When I bother to wake up, on a Wednesday morning")

The Rules

You're free to reuse functions here and there, if it helps speed up your dev-time. Old art and audio, are pretty much expected, since we don't all have time to create fully working masterpieces within the space of a week!

Other than that, the main coding for each week's task should be pretty much created within the time allocated.

If you use other people's art/sound/functions, give credit where credit's due.
To enter, post your game below. If you can't find anywhere decent to host it, send it to Jayenkai@Gmail.com

Additional rules are available here.

-=-=-
''Load, Next List!''
Tue, 05 May 2009, 23:49
Afr0
Uhm?
2000 characters?
Surely you mean 2000 pixels?

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Wed, 06 May 2009, 00:08
shroom_monk
No, 2000 characters. Of code.

We did something similar for #100, with 100x100, but this turned out to be plenty of space.

-=-=-
A mushroom a day keeps the doctor away...

Keep It Simple, Shroom!
Wed, 06 May 2009, 00:26
JL235
I have an entry in mind for this, I might also try a new language for it.
Thu, 07 May 2009, 16:28
flying_cucco
Minesweeper

Just a quicky.
Thu, 07 May 2009, 18:19
Jayenkai

.exe

My code looks just as bad as Cucco's!

Yeay


-=-=-
''Load, Next List!''
Fri, 08 May 2009, 23:41
cthug
pong2000c

A simple pong; with horizontal movement. Written in freeBASIC using SDL for rendering. Sorry I cheated, the codes a little longer than 2000 characters (3500 characters, 33 lines), but It is difficult when you use SDL, becuase it can take 9 statements just to draw a sprite. EG:



Oh well SDL is still a great library, one of my favorites; with openGL.

AI:



640 being the window width and paddle(1) being the computer's paddle.

download - source & media
download - linux binary & media

Haven't got freeBASIC on my windows machine so I haven't included a windows binary but you can compile easily, because I included a windows makefile. (makefile.win)

-=-=-
CTHUG.co.nr
Get Ubuntu
Sat, 09 May 2009, 00:20
Jayenkai
Keep at it, you're getting there..

Reduce the unneccessary error messages.

Shorten variable names, bl for Ball, pd for Paddle, ds for dest, etc.

"dim prevTime as integer:dim nowT as integer:dim timeLeft as integer" .. all three seem completely unused.

use select:case with "event.key.keysym.sym" to shorten even more, so you don't have to have "event.key.keysym.sym" half-a-dozen times.

It can be done..



-=-=-
''Load, Next List!''
Sat, 09 May 2009, 00:24
cthug
Oh yeah I did make a frame per second setty thing, and font renderer for score but it was far too large, I will reduce variable size and use select, It won't get under 2000 chars tho

-=-=-
CTHUG.co.nr
Get Ubuntu
Sat, 09 May 2009, 01:15
cthug
Ok, I deleted the unused variables, changed all var names to just 2 characters, changed integer types to short, got rid of error messages, put in select - case statement instead if(event.key.keysym.sym).

Down to about 2600 chars, 29 lines. Thank god for find/replace . I am installing freebasic on windows with gcc/mingw, so I will post windows binary soon

|edit| Downloads: |edit|

Download - Source
Download - Linux binary
Download - Win32 binary

-=-=-
CTHUG.co.nr
Get Ubuntu
Sat, 09 May 2009, 18:15
Phoenix
C + Windows API + OpenGL = Really bad choice for trying to make slim code.



I worked pretty hard trying to get it to fit into the 100x20 box It was supposed to be pacman, but I soon realized that there wasn't enough space for that. Two more lines and I could probably have done something more interesting

Download
Sun, 10 May 2009, 02:20
Afr0
o_O

How do you control it?
What's the objective?

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Sun, 10 May 2009, 03:36
Phoenix
You control it with the cursor keys, and you're supposed to avoid the ghosts for as long as possible.
Wed, 13 May 2009, 02:52
Jayenkai
It's been AGES since I closed off a WW, so let's give this a go.

1. Cucco's game gave me a blank area, so I had to guesstimate it's style using the gfx provided.
2. Mine worked.
3. I tried to download cthug's, but every time I downloaded the win-binary, the zip file was corrupt
4. I can only hope that Phoenix's was seriously messed up on my system, 'cos otherwise.. wtf was that about!?!

Well done all.


-=-=-
''Load, Next List!''
Wed, 13 May 2009, 03:19
cthug
Lol, probably should check the files, here is a non corrupty zip.

-=-=-
CTHUG.co.nr
Get Ubuntu
Wed, 13 May 2009, 03:30
Jayenkai
Ta muchly!
Wed, 13 May 2009, 04:56
flying_cucco
Mine worked too!

Try re-downloading, Jayenkai. I unwittingly posted a borked version, and fixed it a few hours later. If the screen was blank you probably have the old one.
Fri, 15 May 2009, 05:52
CodersRule
Yeah a few days ago I tried 1, 2, and 3 on Jay's list and got the same results as his.

EDIT: Oh yeah now I remember! Phoenix's crashed my system and gave me a "serious error". I vote Phoenix.
Fri, 15 May 2009, 13:29
Phoenix
Ha, perhaps I shrunk it too much then. Or you can consider it an easter egg