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.

DarkBASIC Professional Discussion / [Game] The DBP experiment project. Post the next line of code.

Author
Message
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 13:56 Edited at: 15th Jun 2014 20:52


Hello. This is a casual experiment based on the influences of social presence, charm and programming skill; and all are invited to observe or take part.

To take part in this community programming game I have created an easy guide for you. Enjoy!


Here is how the game works; you have just one of TWO choices per post


Insert one line of code or block of code limited to 500 characters or your bonus limit anywhere in the program permitted, and suffix the single line of code or code block with your name in the comments. and the version, counting from 0.001 - See also rule number 8. When inserting a block of code, this means one block; one IF block if posting an IF block, one function if posting a function block.

Or remove a single line or block of code, but try to contribute towards building a working program. The removal must also contain your name and version written consistently. DO NOT remove the version tag from the removed code. Consider commenting out instead.

Only one removal is permitted per player per day. See the limits section.

Please note that contributions that violate the rules or the forum AUP will be removed by me, so there is no need to use up your removal limit.

The name and version format


It is very important to use the following format when declaring your name and version.

#Name# (v#Version#) #optional comments#

EG: Chris Tate (v0.001) Any additional comment to follow

Additionally, update the version indicated in the project header.

For alterations to your OWN code; providing you contributed it you may change it. Please comma seperate the latest version of the line according to your program version.

For example if I make 4 submitted changes to my line, its comment would look like this:

rem Chris Tate (v0.001,v0.003,v0.005,v0.010)

The versions correspond to the latest version of the program.

Rules


1: Do not be unsociable in any attempt to spoil the fun; please take up attitude problems to therapy class. Do not contribute an END statement just for the sake of attempting to do what would clearly be impossible for you; trying to be funny.

2: Your latest version must be safe, secure, it should not cause any crashing and not violate any of TGC's policies or any law. If it does not run, it does not count

3: No plugin commands, just native commands; the ones you see in the official documentation.

4: If someone posts their version just before you post yours, you lost the race, and must alter or repost a new version to work with the previous one.

5: You must not edit someone elses code, you can only completely remove someone elses code if doing so does not cause a technical or unlawful problem. If you need something to work differently consider branching off the program flow into your own domain of control; but be nice.

6: You can only contribute ONE line of code, after someone else. You cannot add a line of code in one post, then post the next version after your previous submission. You must wait for someone else to contribute.

7: No assets, just code. If you need images, you will have to program images. If you need music, you will have to program music. If you need 3D models, you will need to program 3D models.

8: Types and Functions can be declared as a single entry. You may declare an entire UDT as one contribution.

You may also declare block statements such as a sub-routine, function, IF, Select, While, Loop as one contribution so to speak. Head the block statement with your name and version like so:




9: You are still only permitted to edit your own code; therefore you must not alter someone elses UDT or structure of code block since they are single contributions.

10: You can only remove code blocks created by yourself, and they must not contain more than one entry contributed by someone else.



In accord with the second contribution option, you may still remove a single line at a time, indicating the new program version.


Tips

You can use colons ( : ); you could use them to create a single lined branch statement. For example



So as long as the program does not crash, your contribution will be acceptable. Otherwise the next version will have to correct the problem, or remove the line that caused the crash.

[/i]Remember to indicate the version of your line and write your name consistently.[/i] On the last day of each month until December 31st I will make a statistic report on the number of contibutions, crashes, line removals and other interesting findings relating to your versions.

Be creative, it could become a game, or it could become the next Micrsoft Notepad. The choice is down to DBPro skills, social dynamics and mother nature.


And here is my first line in version 0.001



The idea of the experiment is to find what kind of software would eventually arise at the end of the year... who knows

Chris Tate : Level 2 - "Colon Apprentice"
TheComet : Level 2 - "Colon Apprentice"
VisualProg : Level 3 - "Programmer with no Life"
-----------==== Players ====-----------

Last update : London GMT 18:52 - 15/06/14 (Level system pending alteration)
Chris Tate : Colon Apprentice : Experience Level 2
Base Limit : 500 characters
Unlocked badges:
BRONZE Ping Pong Player
- Contributed twice in a row after the same contributor (VisualProg) since v0.039
BRONZE Function Contributor
- Contributed at least 1 function since version 0.043
Syntax Errors: 2
------------------------------------
TheComet : Colon Apprentice : Experience Level 2
Base Limit : 500 characters
Unlocked badges:
BRONZE Ping Pong Player
- Contributed twice in a row after the same contributor (Chris Tate) since v0.014
BRONZE Terminator
- Awarded for inserting at least one valid END statement in the program
BRONZE Function Contributor
- Contributed at least 1 function since version 0.024
Syntax Errors: 1
------------------------------------
VisualProg : Programmer with no Life : Experience Level 3
Base Limit : 500 characters
Unlocked badges:
BRONZE Function Contributor
- Contributed at least 1 function since version 0.015
BRONZE Ping Pong Player
- Contributed twice in a row after the same contributor (TheComet) since v0.027
Syntax Errors: 0

Limits and Bonuses

To reward long term contributors with more program control; an archetype and power-up system will commence from Monday 9th June. See the following posts for more information:

LIMITS

ARCHETYPES

POWER-UPS

Version 0.047 Log


Python leveling and versioning system by TheComet:



VisualProg
16
Years of Service
User Offline
Joined: 31st Mar 2009
Location: RussianFederation, Smolensk
Posted: 6th Jun 2014 14:50
I think you should at least hint to the theme, otherwise the code will be filled with garbage)) - 3D/2D/IF/... (every one be have his interpretation)



MZh[NUL] <---

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 15:14 Edited at: 6th Jun 2014 15:20


I swear to god if someone turns the sync or backdrop on, I will slap you

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 15:30 Edited at: 6th Jun 2014 15:39
Syntax Error : : TheComet v(0.003)

Quote: "Types 'TEMP1' and '&chr' are incompatible at line 6.

PROGRAM TRACE
-------------
"You, "+CharacterName$+", push open the shabby doors of the tow
"


Resoluton : I have corrected the Chr$ typo - CTate



v0.003

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 15:34
Quote: "I think you should at least hint to the theme, otherwise the code will be filled with garbage"


I hope you are wrong. If you are then so as long as the garbage contributors produce something artistically pleasing, then we are at least giving each contributor some respect.

The first few 1,000 lines will most likely carve the theme in stone.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 15:38
Sorry for that! Do I have to sit in the corner now?

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 15:48
That is a very small mistake; it is not that bad. I wonder what is going to happen with the screen resolution; the text gets chopped off the edge



TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 15:57 Edited at: 6th Jun 2014 15:59


I cannot change my line from before with nl's according to your rules. Can I entirely remove my line, and then re-insert it again later on?

VisualProg
16
Years of Service
User Offline
Joined: 31st Mar 2009
Location: RussianFederation, Smolensk
Posted: 6th Jun 2014 16:21
Quote: "I cannot change my line from before with nl's according to your rules. Can I entirely remove my line, and then re-insert it again later on?"

It would be good to make it in the rules - "for one post the author can delete his line, and misses his turn."



Can you speak me how i be add syntax highlight in code?

MZh[NUL] <---

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 16:25
Feel free; You may edit your own lines so as long as they do not cause errors or violations. Comma seperate the version of the line: TheComet(v0.003,v0.006) so it can be extracted and tracked.

The only code you cannot edit is code contributed by someone else; indicated in rule number 5.

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 16:32 Edited at: 6th Jun 2014 16:32
v0.007



TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 16:37 Edited at: 6th Jun 2014 16:40


We are at 6 lines and this is already the biggest mess I've seen in a long time

[EDIT] Creating a UDT requires an "endtype" statement, which you must add simultaneously with a "type" statement. Isn't that impossible to do according to the rules (because you'd be changing two lines at once)?

VisualProg
16
Years of Service
User Offline
Joined: 31st Mar 2009
Location: RussianFederation, Smolensk
Posted: 6th Jun 2014 16:46 Edited at: 6th Jun 2014 16:49
Quote: "We are at 6 lines and this is already the biggest mess I've seen in a long time"

If supplemented by blank lines - code be simplified



MZh[NUL] <---

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 17:01


Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 17:06 Edited at: 6th Jun 2014 17:12
Corrections :

@VisualProg, you left out some of the project text there; and your name is typed incorrectly in there.

Gratz, you are both level 1 contributors with 3 unique lines.

v0.011

SamKM
15
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 6th Jun 2014 17:06
I'm tempted to just add add end, but I wouldn't want to annoy anyone

The code never bothered me anyway...
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 17:07
Quote: "Creating a UDT requires an "endtype" statement, which you must add simultaneously with a "type" statement. Isn't that impossible to do according to the rules (because you'd be changing two lines at once)?"


It is only an error if left uncommented

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 17:09 Edited at: 6th Jun 2014 17:11
@SamKM

I thought about that before, no doubt some people will do that which is why I posted rule number 1; no abrupt END statements or anti-social behavior. lol

@TheComet

Your text is overlapping your input message

@Me
What should I do next...

SamKM
15
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 6th Jun 2014 17:11
Haha, I actually missed that rule, sorry! Good thing I didn't try it

The code never bothered me anyway...
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 17:13
Quote: "It is only an error if left uncommented"


No I mean you physically cannot add two lines at once. You will uncomment "type" and then you will get an error, or you will add an "endtype" and you will get an error.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 17:18


Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 17:20 Edited at: 6th Jun 2014 17:33
Interesting point. Duh! .

I guess we need an exception.

Types and Functions can be declared as a single entry. You may declare an entire UDT as one contribution.

You may also declare block statements such as a sub-routine, function, IF, Select, While, Loop as one contribution so to speak. Head the block statement with your name and version like so:



Nice one TheComet, you inspired a rule change and reached level 2 for contributing 4 unique lines.

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 17:27 Edited at: 6th Jun 2014 17:28
Correction : My name is formatted incorrectly in my UDT comment.
Resolution : Fixed formatting



Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 17:46 Edited at: 6th Jun 2014 17:47
Ok this is the first block statement in accord with rules 8-10.

v0.013

The input field does not accept tabs very well; I had to use spaces

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 17:49


v0.014

VisualProg
16
Years of Service
User Offline
Joined: 31st Mar 2009
Location: RussianFederation, Smolensk
Posted: 6th Jun 2014 18:06 Edited at: 6th Jun 2014 18:18
Replace error in Chris Tate (v0.004,v0.011) "Ink" have 2 args



MZh[NUL] <---

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 18:31 Edited at: 6th Jun 2014 18:35
Syntax Error : By Chris Tate (v0.004,v0.011) LOL : Reported by VisualProg

Used Matrix1 single parameter INK command instead of native two parameter INK command.

Resolution :

VisualProg fixed it.

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

General Log : VisualProg's code name is now VisualProg,

---------------------------------------------
VisualProg and has acquired experience level 2; and the Bronze Function Contributor badge.
TheComet and has acquired experience level 3

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 18:42
TheComet has obtained the Bronze Ping Pong Player badge by contributing after the same contributor (Chris Tate) more than twice in a row since v0.011

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 18:52 Edited at: 6th Jun 2014 19:00
I wrote a python script for processing statistics on the code. Current statistics:


If you give me a list of ranks I can implement that for fun as well Also yes, I know, the version list isn't sorted. I'm working on that now.

Python script:


Save it as "dbp-experiment.py" and save the latest code in the same folder as "code.txt". Run the script from a console with:


TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 19:06 Edited at: 6th Jun 2014 19:06
UPDATE: version list is now sorted.

Current Ranks:


Python Script:


Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 19:06
Thanks; it would be great to have a count of unique entries; that is each version that is a first parameter of the comma seperated parenthesis entry.

That ties in nicely with the experience points which is 3 x 1.25 from 3.



If you want to you can calculate some useful statistics you come up with can be used for badges. Just indicate a bronze, silver and gold version in the report, like I did manually. And I will update the entries in the first post.

Some awards will be a bit time consuming to have scripted, so I will figure them out manually.

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 19:07
As for the ranks, give me some input; no rush. What do you think the rank calculation should be?

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 19:22
v0.016 - Add a bit of beer



MrValentine
AGK Backer
14
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 6th Jun 2014 19:34
I start digging up the garden, get massive calluses and come back to see this running from when I started and until now lol

Too much to read right now but might contribute some 3D modelling if it gets to that stage [in code of course]



When I can type easier that is...

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 19:36 Edited at: 6th Jun 2014 19:47
Chris, what is the formula you used to calculate those levels? Whatever it is it's not n*1.25, it's some kind of quadratic formula. sqrt(unique_entries)/1.5 approximates those numbers somewhat.

VisualProg
16
Years of Service
User Offline
Joined: 31st Mar 2009
Location: RussianFederation, Smolensk
Posted: 6th Jun 2014 19:39
Quote: "Chris Tate (v0.016)"

Box left, top, width, height

"Color" need done separately

MZh[NUL] <---

VisualProg
16
Years of Service
User Offline
Joined: 31st Mar 2009
Location: RussianFederation, Smolensk
Posted: 6th Jun 2014 19:43 Edited at: 6th Jun 2014 19:52
v0.017

split box/ink (v0.016)



MZh[NUL] <---

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 19:54 Edited at: 6th Jun 2014 20:00
@VisualProg You can use color in the same command; the box command has two signatures:

Quote: "BOX
This command will draw a filled box on screen in the current ink color.

Syntax

BOX Left,Top,Right,Bottom

BOX Left, Top, Right, Bottom, Color1, Color2, Color3, Color4

Parameters

Left

Integer
This value specifies the top left corners X coordinate.
Top

Integer
This value specifies the top left corners y coordinate.
Right

Integer
This value specifies the bottom right corners X coordinate.
Bottom

Integer
This value specifies the bottom right corners y coordinate.
Color1

Dword
This value is returned from using the RGB(red,green,blue) command.
Color2

Dword
This value is returned from using the RGB(red,green,blue) command.
Color3

Dword
This value is returned from using the RGB(red,green,blue) command.
Color4

Dword
This value is returned from using the RGB(red,green,blue) command.

"


So it is not a syntax error; you may set the color of box calls in the same call; it is natively supported. You should not edit someone elses code, but I will leave it anyway since it achieves the same effect and you are trying to help maintain quality. If it does not cause a syntax error then it should not be altered.

Edit Your change did not draw anything by the way, and is missing my Name comment and the 1 second delay I put there. I guess I'll have to put my code back and insert your latest.

@TheComet

I calculated with Excel. I forgot to mention each coefficient is the previous number of experience points

3*1.25 = 4
4*1.25 = 5
5*1.25 = 6
6*1.25 = 7
7*1.25 = 9

Obviously there is some rounding going on there; and logorithms could have been used, but it is no big deal. Use an array if you have to.

[Edit]You may not have noticed but your 'Enter Name > " text has been overlapped by your text.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 19:59 Edited at: 6th Jun 2014 20:25
Got some ranks going.


Your level is calculated with sqrt(unique_entries/1.25). If you contribute a thousand lines of code, that gets you to level 28. Seems pretty fair.

Python Script:


Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 20:04 Edited at: 6th Jun 2014 20:05
v0.018 - My code was altered to not do what I set it to do, and its comment was removed. Now fixed and I also added VisualProg's latest BitMap type



Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 20:11 Edited at: 6th Jun 2014 20:15
Syntax Error : Chris Tate v0.018

The Matrix1 Box command signature was used, need to use 4 colors in the native call.

Resolution :

Added the native version. Appologies VisualProg; I have to downgrade my Box command to the old one.

v0.019





TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 20:17 Edited at: 6th Jun 2014 20:20


v0.020 - added insults for when the player chooses incorrectly

VisualProg
16
Years of Service
User Offline
Joined: 31st Mar 2009
Location: RussianFederation, Smolensk
Posted: 6th Jun 2014 21:06 Edited at: 6th Jun 2014 21:12
Quote: "So it is not a syntax error; you may set the color of box calls in the same call; it is natively supported. You should not edit someone elses code, but I will leave it anyway since it achieves the same effect and you are trying to help maintain quality. If it does not cause a syntax error then it should not be altered."

Sorry, the reason is that I could not compile it.

Quote: "Now fixed and I also added VisualProg's latest BitMap type"

Thank you)



MZh[NUL] <---

Attachments

Login to view attachments
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 21:30
You got a syntax error, I did not because I have Matrix1 installed; in future I will need to double check my lines because I have lost track of what is native and what is Matrix1.

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 21:37 Edited at: 6th Jun 2014 21:48
@Comet

I know very little about Python consoles; where do I put the script. If I run dbp-experiment.py it gives me an error; no doubt I have the script stored in wrong place? I also tried writing in the folder path.

@VisualProg

You are allowed to structure your functions in multiple lines if you want; it is just the command lines which need to be singular. However, continuing as you are is fine.

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 21:46
v0.022 - Item UDT (Still in progress)



TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 21:47 Edited at: 6th Jun 2014 21:48
Current stats:


@Chris
Looks like my script has syntax errors. I made some changes on the fly thinking I'm perfect in all ways.

Fixed.


If you get something like the following:


It means "code.txt" is not in your working directory (the directory from which you run the script).

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Jun 2014 21:50
How do I set the working directory?

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jun 2014 21:53 Edited at: 6th Jun 2014 21:54
The working directory is the directory from which you execute the script. Just "cd" yourself to wherever "code.txt" is located, and then run the script from there.

MrValentine
AGK Backer
14
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 6th Jun 2014 22:10
Amazing how fast a project like this can veer off course...

I thought the idea was Pure DBPro, you now appear to be adding external content, might as well add .X .DBO models now and Sound and Images...

Unless of course, you are generating the script file inside your code?

Login to post a reply

Server time is: 2025-05-15 02:12:37
Your offset time is: 2025-05-15 02:12:37