![]() |
Scripting collab!
So as the dudes in all the other development forums are doing awesome collaborations, the scripting forums should have something similar!
I am going to post a snippet of code, and someone else contributes by adding another snippet. I suppose we should try to keep the code valid at all times, regarding clean formatting and KSI-GS conformance, and actual functionality. Sorry about the old-GS usage, but I am not exactly experienced with the newer dialect! NPC Code: oh god i have no idea where this is going |
Eh, I haven't done GScript in a REALLY LOOOONG time, lets see if this works.
if (forumuser == "Fox1545"){ message "This is stupid..." deleteaccount; } |
I'd like to contribute a semi colon. :)
; I'm interested in seeing how this turns out. :P |
eh... remember when survivor came out.. and it was really big.. and then they made another one.. and it was .. OKAY.. and then 100 more came out and they suck and now you cant turn on TV without seeing a reality show?
lets not turn graal forums into that.. if you get my similie |
function onCreated() {
destroy(); } // Thread over? o_O level and GFX collabs work, this thread really doesn't. |
This might work, if it had a set goal that you wanted to accomplish. Something like a CVS project or so. But if no one knows where they're going with it, I think it will just turn out to be a big mess of random crap that probably won't work in the end.
|
I am gonna have to agree with the majority here;
the first reason to write code should be becasue you have a series of steps that you want to accomplish, and they have been layed out in detail for a human to understand them before you try and make the machine understand them. In other words, first make the algorithm, and then turn it into whatever programming language you want. A random tacking on of code by the masses, with no defined algorithm, will not be pretty. Perhaps conceive of a big enough process and see who can make the most efficient way of doing it. One question: CVS project? Around this part of the country, CVS is a chain of drug stores that have nothing to do with graal or computers. |
Quote:
System where a lot of developers can callaborate. |
Quote:
|
NPC Code:function onCreated() |
Quote:
Quote:
Someone beat you to it >:P |
Shadowless, your semicolon is appreciated.
Silent, you are about as clever as filling up the graphics collabs with flood-filled green tiles. CVS is pretty silly. darcs is a lot more awesome, and the programming language it is written in is likely more awesome than the one C is written in. These might be fine for regular cooperation, but for more intensive purpose you would want to use Gobby. Also, this collab could totally have worked out if you guys were not a bunch of needlessly hostile cretins. If the dudes in the graphics forum can piece together some random picture without stepping on each others' toes, we should be able to do something correlating as well. Of course there needs to be a common goal that everybody is working towards, but the graphics dudes did not plan it all out in advance either, they just added piece for piece. I would have assumed that scripters, who are inherently cleverer than graphics dudes, could do so as well without derailing the thread towards foreign drug stores. why did i even try to post something cool in this forums. also, if (created) { if (strequals(#a,Goboom)) { say2 Go back to your retarded pixelling ok; serverwarp unholy; } } |
Quote:
|
lol, My collabs injection to the graal forums has gone even further, i should so badly get a cookie.
|
NPC Code: haha =D |
I'm not so sure about this thread.
|
Quote:
|
Quote:
|
Quote:
Quote:
|
.. a code contribution *thinks*
Quote:
|
somebody delete EVERY post in this thread, and let us try this again
if (playerchats) { if (strcontains(#c,"name")){ message "My name is Bob"; } } |
Quote:
NPC Code:function onCreated() |
NPC Code:function onCreated() Hey I tried ;)! |
Quote:
|
Quote:
PHP Code:
|
This thread is the scripting forum at its worst
Not because of Fox, no, the idea is great. It started going sour at like the second post, much like all potiential threads do, then it followed when people who dont normally script came by to deposit their much unneeded opinion about the idea. One of the main reasons something like this wouldnt work is because people would contribute solely to mess it up, and make things unorganized. Plus people who just dont script properly, look an xAndrewx and his post, that drives me crazy ;[ (Not to pick on anyone, but thats the easiest one i see to hit up for not following some kind of good style). I would guess a couple of guidelines would have helped out Ex: Adding like 5 lines of code to the initial 5 lines of code, and just let the next people figure out what kind of goal they are all working towards. Oh well, this thread has already gone further south then im willing to go, i still say it could have worked. |
Collaboration lacking abstraction of a problem is a very very bad idea in scripting. You can't just be random. I'd suggest starting with what you want to make. Ex. Chess
Then you work as a group to determine what functions and objects you will make (in our case an object will always be an npc). What would you want for a chess script? Board NPC with board_x[] array for setting the xs where the pieces go board_y[] array Pawn NPCs Knight NPCs Bishop NPCs Rook NPCs Queen NPCs King NPCs Self-Check test/move unsetter Stalemate test Checkmate test movement controller Each piece will have a team var. They will need to check to see if their move is valid I can tell you by experience, that for the pieces, pawns will be the hardest and knights will be the easiest. You would want to start with specifying the chessboard class though, since it's relevant to all other classes and functionality. |
something like a chess game would be a great excersize in algorithm writing.
especially with the player turn control built in somehow through the server etc. Then once the algoritm is sufficient, express it in gs2 |
I believe a knight can only move if the board distance it is being moved is equal to the square root of five.
It cannot move onto a board coordinate that another piece of it's own team occupies. If it lands on another team's piece, that piece is set aside. But yes, if there's going to be a collaboration thread, we'd all have to discuss the functionality and then assign certain objects and tasks to people. Programmers/Scripters are generally the one's that have to collaborate the most. You should be ashamed if you're not able to do so. |
I like how you all have no idea you're actually talking to Loriel.
You silly people who aren't paying attention, you. |
Just because he's Loriel, should they change their opinions on him?
|
Quote:
Edit: I have absolutely no idea why you PMed this to me instead of clarifying it here, but whatever: Quote:
|
Quote:
Yeah, If people knew who it was they may have taken the thought seriously. But since it's just a 'noob' he's free to be bashed away. Prime example of the scripting forums at it's very very best. |
Quote:
|
Quote:
Why do people hate good things and want to put an end to them? They are secretly taking on the archetype of the Suicidal, I think. |
Quote:
|
Quote:
also: privĀ·et n. 1. Any of several shrubs of the genus Ligustrum, especially L. vulgare or L. ovalifolium, having opposite leaves and clusters of white flowers and widely used for hedges. 2. Any of several similar or related plants. - The proper spelling is right in front of you at the top of nearly every page served by these forums. There's no excuse for that misspelling. |
Quote:
Quote:
Quote:
|
Quote:
|
Quote:
Let me start you off since I actually started making a chess script a long long time ago (but since it's old, it might not be as good). Class Knight: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
| All times are GMT +2. The time now is 12:39 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.