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 / Put ANY game in 20 lines!

Author
Message
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 31st Oct 2006 14:20
Here is a way to turn any game into 20 lines:

Run this 20 liner on your game exe:


copy the contents from the created dba file onto the bottom line of this 20 liner:


Running the resulting 10 lines of code will run your game!

PS
I think someones going to have to change the rules

coolgames
18
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 31st Oct 2006 16:31 Edited at: 31st Oct 2006 16:32
Well, there is a rule on external media being over 100K, your game exe could be considered external media. If your exe is larger then 100K, it would break the rules.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 31st Oct 2006 17:38
No, but the exe is not external media, it is in the code

PowerSoft
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 31st Oct 2006 18:52
Also rule on 20commands per line I believe...

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 31st Oct 2006 19:29
It does not put more than one command on a line!
data 1,0,8,82,31,31 etc. is one command

UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 2nd Nov 2006 21:32 Edited at: 2nd Nov 2006 21:39
If you can show me a DarkBASIC compiled executable that is less than 100k, I'll believe that this will work. Otherwise, being counted as external media, it will go over the limit.

Edit: Sorry for jumping to conclusions. I don't have DBP, and I didn't read everything well first. I think it might work, but since the exe created by the program will still be over 100k, it could still count as being over the limit, even when its not there until the first run. IT also looks like a really long first run loading time.

Why don't you try it Diggsey, I'm curious about what the MODs will say

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 2nd Nov 2006 22:03
I could, I just don't exactly have a fast enough PC for copying 10mb of DBP source code!

Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 8th Nov 2006 03:56
Wait, it makes an EXE!? I'll need to take a look at this in the morning.

Tutorials:
Array
Functions
UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 8th Nov 2006 23:00
Hey, I tried this with a 1.5 MB file, and it came out with a 3.3 MB source file. I copied the data command and used the 20-liner that makes the game.exe, but it doesn't work. IT says its not a valid win32 application. Have you tried doing this yet? Try doing this with a program that only prints "Hello World". It doesn't work Nice idea though.

slicer 4 ever
17
Years of Service
User Offline
Joined: 11th Jul 2006
Location: currently: planet gamma3295
Posted: 12th Nov 2006 09:46
wait does this mean that you make the source file of your game and then just run this exe and it well basically run your source threw this?

my smiles love me =-)=-)=-)(-=(-=(-=
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 12th Nov 2006 10:03
No, you have to compile your game source file, and run this on the exe. It will write the executable into one big data statement in a dba file. Copy that onto the end of the second dba file. When the code runs, it turns the data statements back into an exe, and runs the exe.

slicer 4 ever
17
Years of Service
User Offline
Joined: 11th Jul 2006
Location: currently: planet gamma3295
Posted: 12th Nov 2006 10:25
o ok i see

my smiles love me =-)=-)=-)(-=(-=(-=

Login to post a reply

Server time is: 2024-04-25 06:40:45
Your offset time is: 2024-04-25 06:40:45