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 / Some codes

Author
Message
Pasky
18
Years of Service
User Offline
Joined: 7th Jun 2005
Location: Spain
Posted: 9th Mar 2008 02:42
Hello.

The truth is that had never visited this section, the 20 lines.
Soil frequenting the forums but I was not involved had happened here.

I would like to participate and I leave with you some codes.

I hope that is one of your liking.

Thank you.

(If something sounds odd blame the translator of Google.)

---------------

Okay.

Start with a code to create a spider and move with the technique of animation by limbs.



The following code is a little joke.
It is a short story.
It could holder "bitter lives" or something like.



The following code is a game.
These go in the shortest possible time a mile road.
The system to run the car is pressing cursors.
Click cursors alternately left and right as quickly as possible to move the car.



This code is quite simple but I think interesting.
For me it is an authentic 20 lines because they are 20 lines of code standard, without uniting with each other.
This time I try to play the movement of a worm or caterpillar.



And finally a code to show that you can create shadows using a "black light".



---------------
Most of them do not have a purpose practiced (except the last).
The write for fun.
Only that.

Goodbye.
Twilight zone
20
Years of Service
User Offline
Joined: 25th Dec 2003
Location: San Angelo, Texas
Posted: 10th Mar 2008 11:49
I tried all of your codes. They are all fantastic. Very innovative and imaginative. I love to see what you come up with without the 20 line restriction.
Pasky
18
Years of Service
User Offline
Joined: 7th Jun 2005
Location: Spain
Posted: 10th Mar 2008 13:01
A lot of thanks.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 11th Mar 2008 22:07
lol, those animations were the funniest!

I couldn't get the game to work, but I liked all the rest!

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Pasky
18
Years of Service
User Offline
Joined: 7th Jun 2005
Location: Spain
Posted: 12th Mar 2008 10:51
Thank you for the good comments.

We thank you for your opinion of me because had just received a comment and did not know whether it was because my codes were not good enough. This forum has a fairly good level and feared not be at your level.
But if I see that my small jobs are generally pleased make more. It is the good of the 20 lines, which are made in a short time and are not too complicated. You just need a little imagination and have some technique.
And it's great fun making them. That about everything.
Thank you.

(And thanks, translator of Google.)
1337 programm3r
16
Years of Service
User Offline
Joined: 19th Nov 2007
Location: Your MOM
Posted: 12th Mar 2008 19:02
I was just curious, what language are you translating from?

Super Cool
Azrael
19
Years of Service
User Offline
Joined: 2nd Mar 2005
Location: Germany
Posted: 13th Mar 2008 16:29
Really impressing codes!
And very inspiring too. Like the worm and the smileys most.

fik
19
Years of Service
User Offline
Joined: 28th Sep 2004
Location:
Posted: 14th Mar 2008 00:45
These are brilliant. The best I have seen
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 14th Mar 2008 16:59
Awesome! Even the visuals in game was good! The shadows and all!

Btw my best time was 4.59

Your signature has been erased by a mod because it was too big
Jeff032
16
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 16th Mar 2008 04:11 Edited at: 16th Mar 2008 04:18
Quote: "I was just curious, what language are you translating from?"


Quote: "Location: Spain "


Spanish, perhaps?

[EDIT]
Very interesting , the game didn't work though

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 16th Mar 2008 18:13 Edited at: 16th Mar 2008 18:14
Game worked for me. I still can't believe you did all that in 20 lines, very nice graphics.

High Score: 6.43 seconds

Pasky
18
Years of Service
User Offline
Joined: 7th Jun 2005
Location: Spain
Posted: 17th Mar 2008 17:02
Wow! I did not expect both public and critical success ...

I am now working on a new 20 lines that I hope you enjoy it as much as those other.

Greetings.
Alsan
18
Years of Service
User Offline
Joined: 20th May 2005
Location: Germany - Nähe Kassel
Posted: 18th Mar 2008 20:35
They're all great, some of the best 20 Liners I've ever seen. The smiley story was very funny. ^^

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 25th Mar 2008 06:45 Edited at: 25th Mar 2008 06:59
Hola!

At last - someone else who has grasped the idea behind the 20-liners board. Well done - all are very impressive.

The game works - you just need to give it 30-40 seconds to build - you'll see why when you see it.

My best time: 6:62 seconds and 2.35 secs if I set the Sync rate to 60!

Oh and they are DBPro and not compatible with DBC.

TDK_Man

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Mar 2008 13:46 Edited at: 26th Mar 2008 13:47
These are fantastic!

I have made a new version of your Black Light, to demonstarte how powerful it is as a shadow technique. It is very easy to make a shadow on a flat surface. But your example works for any surface. I have scaled up the matrix and randomized it to show that it works on bumpy surfaces



Attachments

Login to view attachments
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 27th Mar 2008 00:44
For those of you having trouble getting the game running, are you on Vista? I can't get it to run. First I get an error from Codesurge that object doesn't exist on line 14, but then something drifts up out of visit telling me the display driver stopped working but not to worry because it's fixed. Same thing on re-try. Might be a Vista problem.

Love the rest of them. Especially the spider.
Jeff032
16
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 28th Mar 2008 18:55
I'm on Vista and I get the same problem as you. Object does not exist and display driver crash.

AlexK
16
Years of Service
User Offline
Joined: 23rd Mar 2008
Location:
Posted: 28th Mar 2008 23:21
Very impressive stuff!

Yes the game also didn't work here but the rest did. Am also under Vista.
Keep up the good work please!
Pasky
18
Years of Service
User Offline
Joined: 7th Jun 2005
Location: Spain
Posted: 1st Apr 2008 12:53
Many thanks to the team of TGC.

I just see that you have published ALL codes in the magazine this month.

I, a mere mortal, leaving this wonderful magazine.

You see, Mommy, come as far.
Was only matter of time. Specifically 47 years.

Hahahaha .... Well, well, the truth is that I was very enthusiastic about seeing those little work in your publication.

I encourage everyone to collaborate.
And I try to do some small collaboration.

Today is a great day for me.

Until forever.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Apr 2008 13:27
It was IanM who pointed this thread out to me, so your work has been approved by some of the best
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Apr 2008 17:28 Edited at: 1st Apr 2008 17:29

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Apr 2008 22:37 Edited at: 1st Apr 2008 22:53
I particularly like the "black light" idea for casting shadows.

I'd always assumed that the Help file's reference to negative colour values was a mistake - what a wonderful way to be proved wrong.

All we need to do now is extend the idea to cubes and other objects...

Like many others, I don't visit this board very often. Perhaps that will change.

Edit

The game is good too - apart from the unnerving black screen while things loaded.

Can't beat about 7.5 seconds yet - takes me too long to realise when (and which) button to press first.

Brilliant example of what can be done in 20 "lines" of code - but looks like the trick is to write a (short) program in the usual way and then remove all the carriage returns and other things that make a program readable ...

Nice demos nevertheless.
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 1st Apr 2008 23:01
Doesnt the shadows work on objects already? Or do you mean it should be same shape?

Your signature has been erased by a mod because it was too big

Attachments

Login to view attachments
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 2nd Apr 2008 00:37
I think he means extend the idea of exploiting negative values to objects or other programming entities. For example, you would think that the SCALE OBJECT command deals with positive values only, but in fact if you use the SCALE OBJECT command with negative values, you turn the object inside out. I find this useful with a skysphere I've been wrestling with. It enables me to see my stars texture on the inside surface with the camera inside the sphere and at its center. There are probably many other cases where we can find useful effects with negative values in places where we conventionally regard the quantity as only positive.
Pasky
18
Years of Service
User Offline
Joined: 7th Jun 2005
Location: Spain
Posted: 2nd Apr 2008 00:59
Let me clarify that the original idea of using a light color negative is not mine. It was another user: Morcilla.

I did a code to show how a black light, but the results were not taught well all possibilities of this technique.

I put the original code shall see to it yourselves.



So write that little demo, to demonstrate the full potential of this trick.

So I am afraid that I have only a small percentage of merit in that code, which seems to be that it is the most liked.

But I think so interesting that I thought desirable put.

The rest of the codes themselves that are 100% mine.

He had to explain this to avoid misunderstandings.
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 2nd Apr 2008 01:47
Pasky: you are a very honest man for posting that. I admire your integrity and your character (and your DBPro codes).

Everyone Else: do we have a forum member fluent in Spanish & English that can steer Pasky to a better translation program? TDK maybe? Also, Pasky's website looks very interesting and reflects a lot of thinking and working in DBPro, but only 4 of 16 sections have been translated.
Pasky
18
Years of Service
User Offline
Joined: 7th Jun 2005
Location: Spain
Posted: 2nd Apr 2008 11:13 Edited at: 2nd Apr 2008 11:15
Thanks, Jeff Miller.

It had an "official translator," Mark Rowsell (MiR), but I found it too abuse and told him to stop.

I am one of those who talk a lot and translate my website and comments inside of my codes is a huge job.

On my codes on the web you would say that many have become obsolete and not even if work with the current version of DBP. Above all, the first I did.

Anyway there are some who recommend it.

The "3D Asteroids," so spectacular it is the 3D effect.
The tutorial "limb", which many people told me that they liked.
Some utilities to make menus, land, etc..

And above all, a pathfinding dll.
They say, one who understands that, the more quickly it has ever seen.
It can handle tables over 500x500 (even more, 750x750) times ridiculously small (less than 50 milliseconds, I seem to remember).

But all this material needs a lot of work to be translated and I can not ask anyone so much effort.

So we better continue for the time being the same.
Making small contributions to your website and helping where possible.

Bye.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 2nd Apr 2008 12:03
Quote: "I find this useful with a skysphere I've been wrestling with. It enables me to see my stars texture on the inside surface with the camera inside the sphere and at its center"


What is even more interesting about this is that you can also put the camera outside the sphere, and still see the scene. The "outside" is culled so it never obstructs your line of view.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Apr 2008 13:20
Quote: "Or do you mean it should be same shape?"


Yes. I think Pasky's method only gives you circular shadows - and at most 7 or 8 as well (?).
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 2nd Apr 2008 23:59
Yes, that's true. But for a cheap way to create a shadow for a pseudo-2D platform game, for example, it would be perfect.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Apr 2008 12:53
Quote: "pseudo-2D platform "


???

Working late again?

But yes, several old games on the PlayStation, for example, have simple shadows following the player and it seems quite possible they use something similar to this. It's certainly a neat trick if you only want a few shadows - and if you only need one or two shadows you could build up a slightly more complicated shadow for the two objects by using two or three lights per object.

Definitely a trick worth remembering.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Apr 2008 15:02
Quote: "Working late again? "


Bear with me on this one...Pseudo-3D is making 3D out of 2D elements - such as parallax scrolling. Surely Pseudo-2D is making 2D out of 3D elements, like VanB's Bruce tutorial in the newsletter?
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 3rd Apr 2008 21:31
"Surely ..". I think you just volunteered to make a DBP Glossary. We need one.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Apr 2008 00:04
Quote: "Surely Pseudo-2D is making 2D out of 3D elements"


I assumed it was either:

1. a typo for Pseudo-3D
or
2. "making 2D out of 1D elements".



Surely Jeff Miller is right.
A Tea Spoon
17
Years of Service
User Offline
Joined: 23rd Apr 2007
Location: good ol USA!
Posted: 10th Apr 2008 00:40
wow this stuff is great. haven't seen this much talent in a long time. very impressive.

Login to post a reply

Server time is: 2024-05-07 04:32:55
Your offset time is: 2024-05-07 04:32:55