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 / DarkCore: DarkBASIC Programming Ruleset.

Author
Message
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 1st Nov 2007 19:08 Edited at: 29th May 2008 22:59


*** UPDATED: 01/12/2008 ***

There are several Role Playing Game (RPG) Rulesets, so why can't there be a Ruleset for Programming? This was my notion when I started writing DarkCore.

The concept has a simple premise: provide a Programming Ruleset that ensures consistency in the development of source code to improve organization, readibilty, reuseability, and expandability of code between DarkBASIC Programmers. In a nutshell, one who uses the Ruleset would know instantly how to read and use others code who use the ruleset.

Now with that long mission statement out of the way, here's the current DarkCore DarkBASIC Programming Ruleset:
Quote: "
1. Objects are created from User Defined Types combined with Unified Arrays.

2. There are 4 kinds of Objects: Template, Entity, Record, Datatype
a. Template: Used to provide default profile values for an Entity object.
b. Entity: Used to represent both state-based physical and virtual objects.
c. Record: Used to represent table formatted data.
d. Datatype: Used to package a specific set of variables (ie: Type Vector X Y Z EndType)

3a. Template and Entity Objects must contain the following properties: ID, Type, State.
3b. Records must contain the following property: ID.
3c. Datatypes do NOT use these properties.

4. Object ID Management. Each object contains a positive integer ID used to randomly/sequentially access the Object and link objects to other objects via Unified Array. IDs can be Dynamically (recycled) or Statically (permanent) assigned. Dynamic IDs are generated and assigned using a stack or queue for management. Static IDs are generated and assigned on the fly using a Incrementing Counter, assigned over a network, or assigned during load from a file.

5. Template and Entity Objects must contain a function for the following purposes:
a. New: Inserts a new object instance
b. Delete: Deletes object instance
c. Start: Initialize the object and subobjects
d. Stop: Shutdown the object and subobjects removing them from memory.
Entity Objects must also include the following functions:
e. Update: updates objects, usually used in main loop

6. Naming Convention
a. Constants: PREFIX_OBJECT_SUBOBJECT_PROPERTY_PURPOSE
b. Globals: Prefix_ObjectSubobjectPropertyPurpose
c. Types: Prefix_Object Name or Prefix_Subobject Name
d. Type Variable (aka Property): Property Name
e. Arrays: Prefix_ObjectSubobject
f. Functions: Prefix_ObjectSubobjectPropertyPurpose
g. Function Parameter: Prefix_ObjectSubobjectProperty (for values pass to properties of the object)
h. Function Parameter 2: Prefix_ObjectSubobjectFunctionProperty (for values pass to properties used locally within function)
i. Array used as Queue, List, or Stack data structure Names end with the word 'Queue','Deque','List', or 'Stack'
j. For...Next Loop Names end with word 'Loop'
k. A UDT Property used to reference, relate, or link to other object, name must end with `ID.`

7. 'this' variable holds the ID of the current object instance to be manipulated and can only be used in functions that belong to that Object.

8. All functions return a value or 0.

9. Use Tab Indention and Spacing between operators.

10. Use GOSUB Labels with Naming Convention.

11. Use of Colon ( : ) to concenate statements is prohibited.

12. Any Var labels assigned a Memory Address, include 'Ptr' Suffix. Example: varPtr = Make Memory() or Get BackBuffer Ptr

13. Any Var label assigned a value within a Memory Address uses the 'Value' Suffix. Example: varValue = *varPtr
"


In addition to the Ruleset, the DarkCore DarkBASIC Programming Ruleset also features:

DarkCore Council
A DB Programmer or group of DB Programmers who approve and manage the DarkCore Ruleset and Tools. Currently F.L.Taylor (ME) is the Chairman and single member on the DarkCore Council. Applications for DarkCore Councilor are being accepted.

DarkCore Arbiter
Is a DB Programmer who is knowledgeable in the DarkCore DB Programming Ruleset and authorized by the DarkCore Council to review source code and certify it for DarkCore Compliancy. Currently F.L.Taylor (ME) is the only current DarkCore Arbiter serving the DarkBasic Community. Applications for DarkCore Arbiter are being accepted.

DarkCore Certificate
A Certificate of Compliancy w/ Managed Serial Number issued by a Dark Arbiter to DB Source Code Authors whom submit their Source Code for review and certification. This Certificate comes in the form of a Graphic/Text Logo w/Serial Number to be displayed in viewable documentation.

DarkCore Author
Any DB Programmer who authors source code using DarkCore Programming Ruleset and acquires a Certificate of Compliancy for the Source Code.

DarkCore Wizards
A series of Source Code Tools that generate DarkCore Compliant Source Code. These tools are approved for use by the DarkCore Council.

calcyman
16
Years of Service
User Offline
Joined: 31st Aug 2007
Location: The Uncertainty Principle
Posted: 1st Nov 2007 19:14
This will eventually turn into the W3C, the HTML equivalent of this, and then you will be long regarded as a bunch of men in grey suits! (Which people instinctively consider as being spoilsports!)

Your signature has been erased by a hyper-intelligent pan-dimensional being (a mod)
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 1st Nov 2007 19:29
- Yeah - the mission has merit but
1: What makes you qualified to dictate a coding standard for others to Follow?

2: Game programming is a constant battle of Frame Rates, creative algorythms, out of the box thinking to make system structure serve a particular game etc. Naming Conventions? Yes. Object Style Coding? If it suits YOU.

A rigid set of rules to go by (in addition to all the rules we follow now from user considerations to the ever changing technical landscape) is just more work.

If you're making an open source game - or suite of them - and want to organize your developers/contributors - then that makes sense - but otherwise - I don't see how you'll pull this off - nor why.

By all means - if you can somehow inject some sort of high octane fuel into the game development process for everyone - than I'm on board - but I don't see this as realistic based on what I see above.

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 1st Nov 2007 19:30
Quote: "This will eventually turn into the W3C"
I hope not.

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 1st Nov 2007 19:30 Edited at: 1st Nov 2007 19:30
I agree with jason p sage.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 1st Nov 2007 20:03
He did do some neat work on the TGC emblem though! (I personally love how you made the DarkBasic logo look) BTW - this guy can code pretty decent - I just think its a pipe dream to organize a bunch of game hackers and a select few "aces" with your convention.

On a positive note - this kind of "Standard" you propose is common place in teams and many "Best Practices" are just good ideas - but not necessarily applicable to games - where performance and presentation are the make/break issues. In business environments - they need easy to read/maintain - and if its not that fast - they buy a bigger machine typically. (Which is lame but - so are some of even their Best Practices)

Into Darkness
16
Years of Service
User Offline
Joined: 29th Sep 2007
Location:
Posted: 1st Nov 2007 20:07
Gosub shouldn't be prohibited, there's nothing wrong with it. Goto should be though. That command is pure evil

--- Am I meant to put a signature here? ---
Sigh
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: The Big 80s
Posted: 1st Nov 2007 20:23 Edited at: 1st Nov 2007 20:24
Hmmm, looks a bit like how Im structuring stuff. But I have to agree with the others - program how you are most efficient.

The Great Nateholio
<img src="http://ixeelectronics.com/Nateholio/Pictures/Sigblock.PNG">
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 1st Nov 2007 20:33
Quote: "Gosub shouldn't be prohibited, there's nothing wrong with it. Goto should be though. That command is pure evil "


And is what runs in every single program you use - "jmp $address"

Its not evil. Just very secretive. Program Flow? I don't know if you don't

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Nov 2007 20:58
Like some others here, I could probably come up with good reasons to not use most points on the suggested standard. Some are simply not reasonable (naming arrays with a usage type - already pointed out by WindowsKiller), some will straight-jacket my coding and limit my solutions (only 4 types of objects), and some are religious opinion (colons, gosubs/gotos, naming conventions).

Here's my suggestion for the standard instead:
1. Read 'Code Complete' by Steve McConnell.
2. Translate language examples to DBPro where possible.
3. Code according to the lessons learned.

If you are working on a team, then yes, the coding standards of the interfaces for the code should be worked out, as at the end of the day they need to join up. Beyond that though it's personal preference and common sense that should be the standard.

All of which reminds me ... it's been a long time since I read the book, so I should probably schedule some time to do so.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 1st Nov 2007 21:35
you should make them guidelines instead. except for the part involving goto. That command is TABOO! No real good programmer uses it.

This isn't a sig. It's me disguised a sig. Can you get me out?
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 1st Nov 2007 21:37
I agree with IanM. The "Code Complete" is a great book. You can even get the first edition which doesn't cover OOP, but if you get the second edition that's fine too.

Btw, unless I'm mistaken, you need at least one gosub to make global DIM statements (doesn't work in a function). Unless #include can do the same thing, I stay away from #include though.

I'm not a real programmer but I play one with DBPro!
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 1st Nov 2007 21:39
Quote: "No real good programmer uses it."
That's a LIE!

Jonny_S
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 1st Nov 2007 21:40
Quote: "No real good programmer uses it."

So then Linus Torlvalds is a bad programmer? Anyway, the goto issue has been discussed over and over again.

Formerly Supermonkey
gbark
18
Years of Service
User Offline
Joined: 14th Oct 2005
Location: US - Virginia
Posted: 1st Nov 2007 21:46 Edited at: 1st Nov 2007 22:07
I very much disagree with the no gosub rule... Without gosubs you either:

a) Have code that's bunched all together (ie, your main do-loop is like 2 miles long), OR

b) If you use only functions to seperate your code, you'd have to declare pretty much every main variable as a global, otherwise your functions won't see your non-global variables, OR

c) Instead of declaring a bunch of globals, you'd have pass along a bunch of variables to each function, which if you have "nested functions" (ie, your main loop calls the player movement function, which calls a collision function, which in turn calls functions for returning the position for other entities), things can get really complicated and convulted with all these variables being passed and returned... Kinda defeats the whole purpose.


With GOSUBS, you can call specific elements (player movement, enemy movement, collisions, etc) without having to worry about globalizing or passing your variables, and (if you use subroutines correct) every GOSUB ends with a RETURN, so it's not like you're using "spaghetti code" with gosubs.
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 1st Nov 2007 21:47
come on Jonny_S - it was getting fun....

It's often bad practice to use GOTO when other solutions are available. But there ARE times where it is either the ONLY WAY or simply the BEST way for speed and/or simplicity.

BTW - Techlord - I was a consultant for ESPN - and I recommended a naming convention for them not because they just had coders - but they had various technical and not so technical people needing access to the databases, and code to some degree - artists, producer's etc. I drew up a very simple one - based on hungarian notation - and not so technical - and they agreed it was the best thing since sliced bread - but they couldn't make it happen - lack of interest.

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 1st Nov 2007 22:05
Quote: "Those rules are simply stupid. Not sure if you thought about their consequences, but I don't think you did."
Ouch . LOL.

jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 1st Nov 2007 22:08
You are a good Sport TechLord - You really Are Much Respect.

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 1st Nov 2007 22:15 Edited at: 1st Nov 2007 22:18
DarkCore DarkBASIC Programming Ruleset Update #1

Modification

Rule #6.i

Old: Array used as Queue, List, or Stack data structure Names end with the word 'Queue','List', or 'Stack'

New: Array used as Queue, List, or Stack data structure Names end with the word 'Queue','Deque','List', or 'Stack'

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Nov 2007 22:27 Edited at: 1st Nov 2007 22:28
So what do I name an array that is mostly used as an array, that I delete from using the list commands and add to as a stack or a queue?

I'm sorry, but here's one person that won't ever qualify for certification under your guidelines.

@WindowsKiller & jason p sage,
What? Pragmatism with goto? At last!

Usually I get drowned out by the anti-goto league when I say that it's another tool in the toolbox. As long as you stick to a few simple rules, goto can be a great help.

1. Always jump forward.
2. Never jump into a control structure, always jump out.
3. Make your targets visible - suggest making the target all uppercase and leaving a blank line both above and below it.
4. Never use it where another construct in the language will do the job more readably.

To be honest, there aren't a lot of uses for it in DBPro, but it can be used to great effect to remove duplicate code (such as error processing & cleanup within functions) and to simplify code that would otherwise require deeply nested sets of if statements.

@aluseus GOD,
Uh, yeah. Right.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 1st Nov 2007 22:57
I agree, goto is a very much needed command. As for code structure, were not pro's so to each his own.
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 1st Nov 2007 23:20
Quote: "So what do I name an array that is mostly used as an array, that I delete from using the list commands and add to as a stack or a queue?"
Deque.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Nov 2007 23:48
Thanks, but I already know what a deque is. It's a double ended queue that allows insertion and removal at each end, usually in constant time.

With the stack and queue commands together I can simulate a deque. But earlier I also included deleting using list commands. Deques do not allow deleting from the middle. I can also insert at any point. I can also randomly access any point, which some implementations allow, but not all.

The point is that there is no standard computer-science name for DBPro's arrays. If you name an array as Deque or Queue, but then access it as a list, the name becomes misleading. If you avoid accessing it as a list when it makes sense, just because it's labelled as a queue or whatever, you are simply hobbling yourself.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 1st Nov 2007 23:49
goto is a low level command, which imho has no place in a higher-level language which already supports gosub, but thats just mho. use it or dont use it, but use it with care. I dont think anyone would argue that if you find yourself relying on it, and slipping it into places because of poor design/forethought you are asking for trouble. Unfortunately new programmers get a hold of this command early on (when learning basic) and develop bad habits with it.

anyway, dinner's on....

My DBP plugins page is now hosted [href]here[/href]
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Nov 2007 00:12 Edited at: 2nd Nov 2007 00:17
Well - I agree mostly with CR except with GOSUB being THE alternative to GOTO.

GOSUB = jsr $address
GOTO = jmp $address

They are completely different in functionality and each has their place. Additionally - functions typically absolve the need for GOSUB - unless you want different entry points in a function - and even then a simple parameter could be passed to a function to do the same thing but I admit GOSUB would likely execute faster for that kind of thing as it would compile to something like:



versus



* - There are various types of jump logic commands - similiar to if (a=b) then goto kinda stuff JE, JNE, plus various flag branch calls - like if carry flag set etc. This is the gibberish your DBPRO code eventually gets compiled to.


NOTE: DARKBASIC PRO has a "characterisic" that is VERY UNCOMMON - that I have never seen anywhere.

Your UDT (TYPES), globals, arrays (AFAIK) CANNOT be "Declared" in a function. THEREFORE - To modularize initialization code - the ONLY SOLUTION I have worked out is to have my MAIN PROGRAM use GOSUB to call CODE with these kids of declarations - but then I use functions elsewhere. I have never seen a language with semantics like this. Just as it has been written - so let it be DONE!

[edit]Just noticed Tiresus referenced this in not so many words... just giving credit to him - Good Eye![/edit]

Profit
18
Years of Service
User Offline
Joined: 19th Feb 2006
Location: United States
Posted: 2nd Nov 2007 00:30
I create arrays in functions all the time. Works great.

common people are walking in line.

Mitsu Fly Ride.
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 2nd Nov 2007 00:51
I have a single Goto statement in Geisha House. There's a situation where it was just the simplest way to jump out of a section of code. Gosub wouldn't have been appropriate because I didn't need to return to that place again. IanM's guidelines for its use are excellent.


Come see the WIP!
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Nov 2007 12:25
@Open_Froz - Cool - didn't have that nailed down Though I do use functions for various Array maintenance - Like AddItem, DeleteItem etc.

@Cash Curtis - I agree!

Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 2nd Nov 2007 12:31
There's enough standization as it is, while standard rulesets are useful if you are working as part of a team on a large project. For small time indi developers it's going to destroy the only thing going for them. Creativity and imagination. Most will fail, but the few that raise above the rest are usually works of art

TinTin
17
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 2nd Nov 2007 13:37
I agree idealy with the whole concept the Techlord is suggesting. If there was a set of rules that we all followed then we'd all spend less time wasted inventing the same stuff over and over.
(Properly documented code is a godsend) I'm not suggesting for a second that we have to limit our scope as to what we develop as a whole. There is already a basic set of rules we follow although in ignorance, the more skilled programmers, tend to forget that the newbies haven't a clue about the more complex aspects of programming, (recursion, shift regesters, buffering etc.) if they followed the ruleset as close as possible then (hopefully) the newbies wouldn't be newbies for long.(Rand Over)

Gosub/Goto I believe that there is a use for both these commands, their usage and scope is completly different, I'll explain this in code...


There are many other uses for these commands (I picked easyest to explain) but looking at the commands from a DBP aspect instead of assembly there completely different, both with viable usage. IMHO


Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 2nd Nov 2007 15:46
Well, as has been said before standardization would be good for a group project.

Quote: "If there was a set of rules that we all followed then we'd all spend less time wasted inventing the same stuff over and over."

I don't see what following coding rules has to do with 'inventing' things. Rules have nothing to do with content, and the thing that we have right now to keep us from doing the same things over and over again is the Code Snippets board. And people that post there do most often standardize their code in the form of a self contained, modular function.

The "DarkCore Council" is an embarrassing idea. None of the rules were very well thought out. It shows that TechLord fancies himself a professional qualified to instruct others how to code. Perhaps, I don't know his skill level. In any event he's using the trial version of DBP so he can't be very serious about Dark Basic.


Come see the WIP!
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 2nd Nov 2007 15:58
Quote: "The "DarkCore Council" is an embarrassing idea. None of the rules were very well thought out. It shows that TechLord fancies himself a professional qualified to instruct others how to code. Perhaps, I don't know his skill level. In any event he's using the trial version of DBP so he can't be very serious about Dark Basic."
Ouch #2 . LOL.

Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 2nd Nov 2007 15:58
But why? None of those rules dictate good practice, they all seem to be just what you prefer. Everyone has different code styles, why is yours better, and why should I use them?
This can't even be compared with W3C standards as someone has done because they set standards that actually have something to do with the definition of a language, not some vague and nonsensical rules on how to USE an existing language with no advantage to using them...

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 2nd Nov 2007 16:15
At least TechLord is being a good sport about this


Come see the WIP!
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 2nd Nov 2007 16:18
Agreed, no offense meant at all TechLord, I think it's good that you're trying to improve things for everyone, I just don't think this is useful.

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 2nd Nov 2007 17:55
Quote: "Your UDT (TYPES), globals, arrays (AFAIK) CANNOT be "Declared" in a function"


Globals and arrays (local or global) can. UDTs can't, but then again, why would you need to? They can go at the very end of your code and stay out of your way

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 2nd Nov 2007 18:05
No offense taken. I desire for DarkCore to be useful so, all opinions (pro and con) are welcomed. Afterall, I didn't provide good examples, just sorta publicly published some nonsensical rules - hehe. Examples are soon to come.

Like the many various Role Playing Game Rulesets, there are many to choose from and that is my conceptual basis for DarkCore. Its NOT the Big Bad Wolf Programming Standard. The DarkCore DarkBASIC Programming Ruleset is just one of many possibilities.

The Ruleset is not set in stone and will evolve with the needs of DB Programmers who agree to use them. No DB Programmer is forced to use DarkCore, however, if one chooses to use it (collaborate), a support system is in place.

RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 2nd Nov 2007 18:09
IMHO, this may not be too bad of an idea. Especially for helping newcomers to DBPro. No one would "have to" use it, but the suggestions and advice from the experienced DBPro programmers would be valuable to almost anyone. A thread for discussing how to "best" structure a program would be a nifty place to hold all these discussions (like the goto argument). A thread like that would be pretty much end up being the ultimate reference thread even if nothing was agreed on. Coders could look through, see both sides of the arguments, and decide for themselves.

Group projects could also quickly borrow the guidelines that are established instead of having to figure them all out themselves and discuss them endlessly instead of getting on with the meat and potatoes of their projects.

I don't think you can get folks to agree with a certification process; not at least until there is some fantastic, magical, *and probably non-existent* moment when most everyone agrees that the guidelines are truly optimal guidelines for programming in DBPro.

I say go for it. The "goto" discussion has already been held, as well as some discussion around Arrays. What's next?


Open MMORPG: It's your game!
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 3rd Dec 2007 19:57
Quote: "I don't think you can get folks to agree with a certification process; not at least until there is some fantastic, magical, *and probably non-existent* moment when most everyone agrees that the guidelines are truly optimal guidelines for programming in DBPro."
I agree. LOL.

Dr Schnitzengruber
16
Years of Service
User Offline
Joined: 19th Jul 2007
Location: C:/Projects/failed/ schnitzengruber
Posted: 3rd Dec 2007 23:24
Wow, That was a good joke. Too bad it's not April fools day. Seriously, does the logo you put on a game mean that it's good or that you stole the source code for it. Why would having a certification on source even be important when people only want to see the end product? You do know that the source code is never seen or taking into account on the compiled product? Lets face it, your "certification" will not help a good program get more people to use it, but more importantly, it wouldn't even be helpful for open source works either because the rules themselves are bad. My suggestion is to take out rules 1-11 and give up. Nobody wants to listen to a random person make up rules of how they program. If lee wanted rules, he'd make the compiler stricter.

sorry, I'm kind of mad about how php 5 doesn't include MySQL. I'll get out of this rant in about 3 months.

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 4th Dec 2007 00:30
Rules are useful for a group project. Certifications are pointless, I agree, but standardization is important during group work. Although I think that a pre-existing ruleset would be pointless as it would not meet the demands of individual projects.


Come see the WIP!
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 4th Dec 2007 02:22 Edited at: 4th Dec 2007 02:34
Dr Schnitzengruber I agree with your point-of-view on product output. However, the concept behind DarkCore has a simple premise: provide a Programming Ruleset that ensures consistency in the development of source code to improve organization, readibilty, reuseability, and expandability of code between DarkBASIC Programmers.

Dr Schnitzengruber
16
Years of Service
User Offline
Joined: 19th Jul 2007
Location: C:/Projects/failed/ schnitzengruber
Posted: 4th Dec 2007 04:25
A single standard will not help anyone unless the rule set actually stated things that must be done. This is not really comparable to the W3C since the W3C shows rules that *must* be followed to make all the browsers be able to view the HTML document the same way. In DarkBASIC, the final product will always be the same and the code doesn't matter. I don't mind reading someone else's code on these forums and unless it's a team project, a standard isn't needed. If it is a team project, this standard may not be the best so we should make the programmers decide how to code. Basically, I agree with Cash Curtis's views. To sum up my point, the programmers should be the one to decide how to code to make it easiest for themselves or their team. I know that everyone codes a different way, for example I use spaces instead of tabs to indent and I group similar statements by : . I normally try to make my code as stretched out, long and simple to read.

P.S. I fixed the php problem so I'm not mad any more. The trick is to restart the web server after you make changes to php.ini.

Ric
19
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 4th Dec 2007 14:22
Interesting thread! Kudos for putting the time and effort in to coming up with your ruleset - but I have to agree with the majority of others here in that any rules on how to use the language can only serve to limit creativity and confuse people (it is called 'Basic', and it's meant to be!). The rules of the language have already been defined, and as there is only one compiler, there is no compatability issue. There are simply different styles. Telling someone they can't use commands or structures which are clearly allowed by the compiler, would be like telling a poet a list of words he can't use that are already acceptable within the English language. Or telling a painter he shouldn't use black paint (yes, I've heard that one too!). In any creative process, the only rules should be what works, and styles should be allowed to evolve naturally. Goto next_post:Cheers



Visit www.andromedus.com today!
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 4th Dec 2007 15:22 Edited at: 4th Dec 2007 19:19
WindowsKiller, I agree with most of your points which is the motivation behind the DarkCore Council, Arbiter, and Certification process. I'm not opposed to suggestions. What I propose in DarkCore can be comparable to the moderation of a forum in which a small selection of individuals have been awarded the authority to govern the forum. The DarkCore Council is a small selection of individuals awarded the power to govern the ruleset. Currently, I'm the only member and authority, but, it is a start.

Until recently I had no Membership criteria, so here's what I've come up with: Use the current ruleset to exploit strengths and weaknesses. Provide examples. Only then can a fair assessment for modification, additions, etc be made. IMHO this is comparable to individuals whom have demonstrated thorough knowledge in the Forum rules and are awarded priviledge of Moderator.

All of us come here to the forum free of will, collaborating in one form or another by choosing to follow the forum ruleset. I believe programmers can apply a governing ruleset to share code. No one is forced to use the Ruleset, however, if they choose to do so there are tools in place to support it. Many have stated, DarkCore 'appears' to be more suitable for Team project. IMHO, when a DB Programmer shares code libs, snippets, etc, they are a Team Player in a Game Creation Community.

I'm not sure why its assumed that adopting some rules for presentation will hender the creative juices, after all a conditional loop is a conditional loop, you can just make look pretty. I use these rules myself, and I'm refining them to eliminate barriers. One would be very surprised to discover how these rules can freeup the creation process, but, you have to use them to experience this. Thus far I have been able to use the current ruleset without much fuss, I'm sure that when I get into more complex math etc I will have to devise new rules.

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 4th Dec 2007 19:55 Edited at: 4th Dec 2007 20:01
Quote: "
The rules of the language have already been defined, and as there is only one compiler, there is no compatability issue. There are simply different styles.
"

Agreed. DarkCore only defines a ruleset for Code Presentation (Style and Structure) for Humans. This is where DarkCore Wizards will serve purpose.

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 31st Dec 2007 16:03 Edited at: 12th Jan 2008 13:57
DarkCore DarkBASIC Programming Ruleset Update #2

Addition

Rule #12

Any Var labels assigned a Memory Address, include 'Ptr' Suffix.

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 31st Dec 2007 16:20
Quote: "DarkCore Council"

Can I be a DarkCore Warlock? We can wear black cloaks with hoods and whisper in the darkness about how people that don't use arbitrary programming rules are simpletons and mortals that don't deserve true power.


Come see the WIP!
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 31st Dec 2007 16:55
Quote: "Can I be a DarkCore Warlock? We can wear black cloaks with hoods and whisper in the darkness about how people that don't use arbitrary programming rules are simpletons and mortals that don't deserve true power. "
LOL.

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 12th Jan 2008 13:55 Edited at: 12th Jan 2008 13:57
DarkCore DarkBASIC Programming Ruleset Update #3

Rule #13

Any Var label assigned a value within a Memory Address uses the 'Value' Suffix. Example: varValue = *varPtr

Login to post a reply

Server time is: 2024-04-27 02:17:37
Your offset time is: 2024-04-27 02:17:37