Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / [STICKY] [DBPro] Space Invaders Challenge – Official TGC Competition

Author
Message
James_TGC
7
Years of Service
User Offline
Joined: 26th Jun 2010
Location:
Posted: 6th Jul 2010 18:41 Edited at: 8th Jul 2010 11:14
In this official TGC competition, we would like to invite you to recreate the classic game Space Invaders in the least amount of code! Think you can do it? If so, get your entry in by the 31st July for a chance to win $100 and 2,000 Game Creator Store points!

No external media allowed. The game must create it's own media via code.

Criteria used for judging entries:

* The game with the least amount of characters (not just # of lines)
* Closest replica to the original Space Invaders

Answers to thread questions:

Quote: "Is it based solely on character count?"

It is based solely on character count.

Quote: "So are we limited to only 25 commands per line then or no?"

The character count is the key. The less lines the better, no limit on each line.

Quote: "The atari 2600 or arcade version?"

Arcade version.

To take part, submit your entry to this thread!

Please help spread the word about this competition throughout the TGC forum and on other places you might go online such as Facebook, YouTube and other forums.

Please also feel free to place images of your games in this thread or links to videos so that we can link to these from the official TGC Facebook and Twitter pages!

Online Marketer for TGC
BatVink
Moderator
14
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Jul 2010 21:40
I've put it on my Facebook page - just use the "Add This" button at the top of the forum page



fedekun
8
Years of Service
User Offline
Joined: 28th Dec 2009
Location: Argentina
Posted: 7th Jul 2010 01:36
Sounds interesting !
JLMoondog
Moderator
9
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 7th Jul 2010 04:37
Very cool. I think I'll give this a go.

The night coda
7
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 7th Jul 2010 05:40 Edited at: 7th Jul 2010 20:30
well here it is just strate from the press spent 6 hours doing it and i think it is very good it is 86 lines and i think i have compacted as much as possible.
This is for darkbasic pro
+ Code Snippet

codaing at night alway and forever
IBOL
Moderator
13
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 7th Jul 2010 06:17
OMG this is awesome.

The night coda
7
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 7th Jul 2010 09:01
ah lol i did not mean to have the at the end ah well

codaing at night alway and forever
baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jul 2010 11:04
I'm in... but I've never tried to minimise my code before so it'll probably be about 3000 lines or something [/exaggeration]

The night coda
7
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 7th Jul 2010 13:05
lol i had not done until last night (my time) and i just had to force my self to think simple lol

codaing at night alway and forever
Syncaidius
12
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 7th Jul 2010 15:16 Edited at: 7th Jul 2010 15:43
the rules need explaining a bit more though.. i mean if you really wanted you could fit 100 lines worth on 1 line, and then the guy that actually wrote 100 seperate lines would lose out, or simply make it so we have to stick by the 20 line rules in the "Important Rules for the 20 Line Challenge" sticky thread.

The night coda
7
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 7th Jul 2010 15:38
it depends on what you do it on as my entery shows there is a problem with if statments been put on one line they somethimes work but its not relyable

codaing at night alway and forever
James_TGC
7
Years of Service
User Offline
Joined: 26th Jun 2010
Location:
Posted: 7th Jul 2010 16:13
Hi Syncaidius,

Thanks for your post. I have updated the OP with criteria to be used when judging entries.

James

Online Marketer for TGC
BMacZero
12
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ N_America/ USA/ CA/ South
Posted: 7th Jul 2010 18:40 Edited at: 7th Jul 2010 21:27
Quote: "or simply make it so we have to stick by the 20 line rules in the "Important Rules for the 20 Line Challenge" sticky thread."

I would assume this, as this was posted in the 20-line challenge board .

EDIT: Or is it based solely on character count?

Phaelax
DBPro Master
14
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Jul 2010 20:51
So are we limited to only 25 commands per line then or no?


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jul 2010 22:32
mmm, I just checked the rules and if there's a 25 command limit there's no way mine will be allowed

The night coda
7
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 7th Jul 2010 22:40
I am also hopful that it is not a rule they put on this but if it is ill just have to have that one exstra line lol

codaing at night alway and forever
BMacZero
12
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ N_America/ USA/ CA/ South
Posted: 7th Jul 2010 22:49
@night coda
Yours is hard! I'm sure it could be compressed to fit in 20 lines, though.

BMacZero
12
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ N_America/ USA/ CA/ South
Posted: 8th Jul 2010 00:00
There should probably be a post about this on the regular DBP board or Geek Culture, people won't notice it much here.

These might be useful for those who want to use DATA statements to create media:
+ Code Snippet

Latch
11
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Jul 2010 00:46 Edited at: 8th Jul 2010 00:48
[Edit]
nevermind

Enjoy your day.
The night coda
7
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 8th Jul 2010 02:43
@BMacZero
thanks i know it is very hard unless you change the speed of the invaders lol and i did try but my compiler was not procesing the if statments when they needed to be.

codaing at night alway and forever
BMacZero
12
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ N_America/ USA/ CA/ South
Posted: 8th Jul 2010 03:04
I've found the screwiness happens when you use IF-THEN statements - try switching them to IF-ENDIF format.

The night coda
7
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 8th Jul 2010 03:49
ah yes did noth think about that chears

codaing at night alway and forever
The night coda
7
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 8th Jul 2010 03:54
but if the only 25 commands per line is niplace i mite not be able to use that

codaing at night alway and forever
IBOL
Moderator
13
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 8th Jul 2010 05:06
@James_TGC ,

just to be sure,
we can go OVER 20 lines,
but it's the number of *characters* that counts.

The night coda
7
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 8th Jul 2010 05:07
Well he is my 16 line one just shortened the first one i bilt but i am going to submit both as this mite not be allowed because of its more than 25 commands on one line but as @BMacZero helped me in getting this and suggested i could i felt i should put it up

+ Code Snippet

codaing at night alway and forever
Sepnon
7
Years of Service
User Offline
Joined: 7th Feb 2010
Location: Brazil
Posted: 8th Jul 2010 05:55 Edited at: 8th Jul 2010 08:15
\o/ i'm in

EDIT: the atari 2600 or arcade version?
i prefer arcade
James_TGC
7
Years of Service
User Offline
Joined: 26th Jun 2010
Location:
Posted: 8th Jul 2010 11:07
Thanks for your questions, everyone, I have updated the OP with answers

Online Marketer for TGC
baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Jul 2010 14:17 Edited at: 8th Jul 2010 23:22
Here is my entry (and my first ever 20 liner!!):
+ Code Snippet
EDIT1: Took out "find free sprite()" from Matrix1 Utility plugin...
EDIT2: Changed my messed up "line" commands for drawing the sprites!!!

I just got it working and then compressed it manually and what do you know? It came out at exactly 20 lines!! Character count might be a bit high but it looks pretty original to me (by which I mean like the original) although I'm not sure if I'm doing the spectrum version (which I probably played more!!)...

It could do with some sounds. I'll post the expanded version of the code here in a moment

EDIT Here's the uncompressed version for easier reading!
+ Code Snippet

You might notice I took some liberties with the layout as I haven't done it as a 2 player game you have a "SCORE" then "<level>" instead of "<player>". Also I wasn't sure if the original was green/white or a mixture of colours so I went hardcore all-white. Hope that's close enough as I don't remember the last time I saw an actual Space-Invaders machine and images online are unreliable at best!

Spritzen
8
Years of Service
User Offline
Joined: 12th Aug 2009
Location:
Posted: 8th Jul 2010 14:38
Not sure why people are doing compressed lines, that's not the criteria. It clearly says "* The game with the least amount of characters (not just # of lines)"

I'm going to see if I can get some time on this, but not sure if my /sarc on elite skills /sarc off are up to it
baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Jul 2010 14:41 Edited at: 8th Jul 2010 14:43
Quote: "Not sure why people are doing compressed lines, that's not the criteria. It clearly says "* The game with the least amount of characters (not just # of lines)""

Read what you just copied... "(not just # of lines)"

This is still the 20 liner board right?

Sasuke
12
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 8th Jul 2010 14:44
Oooh! Well I'm definitely in this one

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Jeff032
10
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 8th Jul 2010 15:02
Are plugins allowed? (I don't think they should be)

-Jeff

baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Jul 2010 15:20 Edited at: 8th Jul 2010 15:28
Quote: "Are plugins allowed?"

No, and I just realised I used "find free sprite()" oops... replacing now!

EDIT: Removed from my original post! If anyone spots any more please let me know!!

LBFN
10
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 8th Jul 2010 16:14
Just saw this and was thinking of entering when I ran your code Baxslash. It seemed pointless, as your coding is awesome. Really nice work.


baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Jul 2010 16:21
Wow, thanks! But I'm sure that you could do better than you think!! Have a go anyway... I found it a lot of fun, and learned a few things in the process!

BMacZero
12
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ N_America/ USA/ CA/ South
Posted: 8th Jul 2010 17:02 Edited at: 8th Jul 2010 17:02
I'm pretty sure I've got you beat on characters, baxslash, but yours looks just a little better.

http://i429.photobucket.com/albums/qq18/bmaczero/Keep/20lineinvaders.png

I still need to do the bunkers, but that'll have to be after vacation.

baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Jul 2010 17:11 Edited at: 8th Jul 2010 17:35
Quote: "I'm pretty sure I've got you beat on characters, baxslash, but yours looks just a little better."

I think it's pretty close actually but your explosions are more like the original!

I'm quite pleased with my bunkers

Good luck anyway though! Can't wait to try yours out...

IBOL
Moderator
13
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 8th Jul 2010 18:08
wow you guys,
i worked all day yesterday just on the sprites,
came up with something i thought would be a great way to draw them,
and you have awesome looking full games already.

it's depressing...

i will still try to beat you i guess...

swissolo
8
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 8th Jul 2010 19:58
I agree with LBFN, I thought this would be worth entering, until I saw baxslash's entry. Great job it's just like the original (BTW the uncompressed version doesn't work , and it still has find free sprite()). Plus, it's the second day! I might still enter. Who knows...

swis
The night coda
7
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 8th Jul 2010 20:18
Backslash i think that is a grate game a bit slow on the movment but i did really enjoy the way you have it looking a few more letters than myn but a lot more detail Well done and good luck

codaing at night alway and forever
baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Jul 2010 23:08
Quote: "i will still try to beat you i guess..."

I hope so IBOL, I love to see what people come up with!

Quote: "I agree with LBFN, I thought this would be worth entering, until I saw baxslash's entry. Great job it's just like the original (BTW the uncompressed version doesn't work , and it still has find free sprite()). Plus, it's the second day! I might still enter. Who knows..."

Thanks again but you still have loads of time to better mine and I don't think I'll have time to improve it... I'll edit the uncompressed version though thanks! Worth having a 'full' version for people to look at a bit easier I think.

Quote: "Backslash i think that is a grate game a bit slow on the movment but i did really enjoy the way you have it looking a few more letters than myn but a lot more detail Well done and good luck
"

I agree the movement is a bit slow but maybe that's just how I remember it (rightly or wrongly!). Good luck to you too night coda!

baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Jul 2010 23:26
Sorry for the double post but AAAAGH!!!

@BMacZero, I should have checked my code you were right about my sprites! When I changed from just using "dot" to using "line" (I realised that if you had more than one pixel next to each other the code was shorter) I didn't check the results....!!!??!?!?

Anyway I've edited it so it should look how I made it in the first place. Compressing is far more frought with danger than I thought!!

Also I've edited the uncompressed version to match!



Phaelax
DBPro Master
14
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 9th Jul 2010 00:10 Edited at: 9th Jul 2010 00:29
Here's my entry and first ever 20-liner

19 small lines, but could probably condense it more. It's 2400 characters, with spaces.
+ Code Snippet


Now that I know it's based solely on character count and not lines, I can add a few bells and whistles.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
The night coda
7
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 9th Jul 2010 00:44
@Phaelax
wow that is somthing
i am now sad you managed to under cut my charactor count ah well

codaing at night alway and forever
baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Jul 2010 01:00
Quote: "Now that I know it's based solely on character count and not lines, I can add a few bells and whistles."

Really? Who said that?

If that's the case then I'll add a few meself...

Phaelax
DBPro Master
14
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 9th Jul 2010 01:30
James_TGC added to his first post:
Quote: "It is based solely on character count."



"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Jul 2010 02:16
OK, so here's the contradiction:
Quote: "It is based solely on character count."


next line...
Quote: "The character count is the key. The less lines the better, no limit on each line."


So it seems that less characters is better but if you can use less characters and less lines then better still.

I have a small problem with that... this is the 20 liners forum!! I just spent 2-3 days making and compressing my (first ever) entry based on that simple principle.

Screw it, I probably won't win anyway but I hate it when effort is discouraged by an ambiguous goal... it's like being at work and that's not why I spend so much time on these forums!

IBOL
Moderator
13
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 9th Jul 2010 03:12
baxslash,
don't worry, becuase the other criteria is 'closest to original game'
yours is pretty darn close.

i don't think short efficient code is being discouraged.

Sasuke
12
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 9th Jul 2010 10:34 Edited at: 9th Jul 2010 10:34
Just thought I'd say great work guys so far, I'm nearly done with my entry, hopefully you'll get to see it later

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
baxslash
11
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Jul 2010 10:38 Edited at: 9th Jul 2010 11:31
Thanks IBOL, I had a bit of a rant there sorry! I just don't understand why if it's on the 20 liners board people are even questioning whether it needs to be less than 20 lines...

I guess I'm getting grouchy in my old age

EDIT: Can someone post a screenshot of my post as it looked fine on my home PC last night with my changes to the "Line" command but now at work it looks different!! (see below)



Example of this possible bug. When I draw a line at home I have to draw one pixel past where I need to for it to look right, here at work I have to draw exactly the correct points.

At home "line 0,0,3,0" draws a line 3 pixels in length
At work "line 0,0,3,0" draws a line 4 pixels in length!!

Can somebody tell me what is going on as I'm running from my USB stick so I know it's the same version of DBP!

Attachments

Login to view attachments

Login to post a reply

Server time is: 2018-01-23 01:36:52
Your offset time is: 2018-01-23 01:36:52