Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   How do you approach a new script? (https://forums.graalonline.com/forums/showthread.php?t=134257902)

DustyPorViva 02-05-2010 11:56 PM

How do you approach a new script?
 
So, you've got a new script to do. How do you approach it?

1) OH I'VE GOT A GREAT IDEA... I don't have much of an idea how I'm going to do it, but who cares! *Opens up RC and starts scripting until something works* You often hit snags in your code and rescript entire methods over and over again as you come up with better ways to approach it.

or

2) OH I'VE GOT A GREAT IDEA... Let me think about it, plan it out and come up with something solid and then start scripting. You'll still occasionally have to rescript things or come up with new methods, but you were always one step ahead of everything.

12171217 02-05-2010 11:59 PM

I just say screw it and go at it.. My scripts get written twice; the initial implementation, and the optimized/unsucky one.

Immolate 02-06-2010 12:52 AM

A bit of both really. I used to just go at it and script every system on my projects without much thought but it got ugly fast such as extremely tightly coupled systems e.g breakage of systems that should have been indepedent of the system I editted.

Now it's:

Right, is it small and indepedent enough that I can just hack away or should I really think this through?

If it's professional job outside of scripting, I always plan.

cyan3 02-06-2010 02:22 AM

When scripting for Graal I tend to just mess around with the coding until it works, mainly because scripting for Graal is more of a pass time than a professional job but when I'm writing scripts at college I put much more thought and planning into them.

xXziroXx 02-06-2010 02:23 AM

Meh, I noticed now that I voted for the wrong thing - I usually plan my scripts out a fair bit in my head.

DrakilorP2P 02-06-2010 02:37 AM

If it's a GUI script I may sketch it in Balsamiq Mockups or on paper.

If it's going to be used by other scripts I often write down how it's going to look to the outside world (the "interface"). These notes tend to transform into documentation.

If it's something complicated I find it useful to write down what it's going to do so I don't overlook something.

On a particular GUI script I didn't know enough to plan much, so I just dumped ideas on a dedicated page of my notebook and tried a lot of things. I had to rewrite it twice.

DustyPorViva 02-06-2010 03:00 AM

I definitely don't plan out my GUI layouts, which I really should :(

Skyld 02-06-2010 03:09 AM

My code is usually split up into small enough chunks to just be written on impulse and edited later if needed. I usually know at least what I want to achieve, the rest is usually just tinkering about until I find a way to get there.

Immolate 02-06-2010 03:10 AM

Quote:

Originally Posted by DrakilorP2P (Post 1554423)
If it's a GUI script I may sketch it in Balsamiq Mockups or on paper.

If it's going to be used by other scripts I often write down how it's going to look to the outside world (the "interface"). These notes tend to transform into documentation.

If it's something complicated I find it useful to write down what it's going to do so I don't overlook something.

On a particular GUI script I didn't know enough to plan much, so I just dumped ideas on a dedicated page of my notebook and tried a lot of things. I had to rewrite it twice.

Balsamiq Mockups looks really handy. That's definitely going on my to-obtain list.

Inverness 02-06-2010 05:49 AM

Quote:

Originally Posted by xXziroXx (Post 1554420)
Meh, I noticed now that I voted for the wrong thing - I usually plan my scripts out a fair bit in my head.

You don't seem to plan out your poll votes though.

Stephen 02-06-2010 06:53 AM

I don't often do any sort of programming, but when I do I usually have the method(s) pretty well thought out.

Often, however, my method(s) has to be modified on the fly - as it is not always feasible.

cbk1994 02-06-2010 07:58 AM

I can probably find a hand-drawn diagram of every GUI I've ever made in the past year or so, and some plans for mostly everything complex that I've made.

xXziroXx 02-06-2010 01:02 PM

Quote:

Originally Posted by Inverness (Post 1554476)
You don't seem to plan out your poll votes though.

Buttons needs to be clicked, so I tend to be a bit hasty with it. :cry:

maximus_asinus 02-06-2010 02:22 PM

When I used to script back in GS1 days, I would sit down and just start writing. I had a general idea of what I wanted the NPC to do, but usually no idea how I would go about doing it. So I'd sit and start writing, experiment with various methods, and end up with a functional yet very ugly and inefficient script (sometimes I'd leave blocks of code, or variables in my script that had no function whatsoever due to eliminated code :p). I always promised to go back and rewrite some of the code but when I was coding, I was very busy with Management issues so it would never get done.

Crono 02-06-2010 06:57 PM

i lose interest while planning and never end up doing anything

Grey 02-06-2010 07:35 PM

I usually have a good plan in my head of how everything will work and connect in my head but unless I am building something extremely complex or that requires a lot of calculation I rarely write anything down.

WhiteDragon 02-06-2010 09:57 PM

I thought I might as well detail my choice.

I plan stuff out, but I'm always in the code window, otherwise nothing will get done. Some things only crop up when you start doing them anyways.


All times are GMT +2. The time now is 12:56 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.