'complex' programming

Hey! It aint that hard!
Post Reply
këö¬t
Member ******
Posts: 80
Joined: 08/07/02, 12:00 am
Location: north of london
Contact:

Post by këö¬t » 03/21/03, 8:35 pm

well, scriping actually, but hey, similar thing. i am scripting a bot in mirc script, mainly because i like it and i'm good at it. but i keep on getting confused when scripting. i'm attempting to do something quite akwardly (damn quakenet won't update to asuka for awhile :() and i've tried to script it many times, ending up with me deleting it because i got lost.
i've drawn a diagram on a5 paper, and that seemed okay, but has confused me again. so i'm starting to draw a diagram of the script on a massive sheet of paper in a bid that i will write every little detail down and hopefully not get confused.

question is, when you embark on a confusing and complex programming/scripting session, what do you do? plan it out on massive paper? write down only the essental bits? code it as you go along?
këö¬t :: [url=irc://irc.quakenet.org/mtuk]#mtuk[/url]

bob
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
Posts: 7565
Joined: 12/03/01, 12:00 am
Location: St. Louis
Contact:

Post by bob » 03/22/03, 1:16 am

My wife never understands why I can't take a break, or why I work on into the night.... I try to tell her "Baby, it's all in my head, and if I stop, I'll lose it....."
WYSIWTF

SOD
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
Posts: 5284
Joined: 12/06/01, 12:00 am
Location: here and there

Post by SOD » 03/22/03, 8:52 am

What you are asking about is the creative process.
I don't know if it can be explained as each process is unique. It is related to how you learn and process information. The thing about code is there are many right answers, which one is best for your application? It sounds like you you need to organize your thoughts then transpose the organization so the language understands it. But remember a diagram is good but consider the dynamics. Programming is an applied science or practice.

<font class=editedby>[ This Message was edited by: SOD on 2003-03-22 16:56 ]</font>

bob
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
Posts: 7565
Joined: 12/03/01, 12:00 am
Location: St. Louis
Contact:

Post by bob » 03/22/03, 11:39 am

Why not just a general outline?
WYSIWTF

SOD
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
Posts: 5284
Joined: 12/06/01, 12:00 am
Location: here and there

Post by SOD » 03/22/03, 9:26 pm

Don't overwhelm yourself take it a section at a time.
Research for examples. We have been working with the windows API in vb6 because vb6 is a derivative language similar to a scripting language there are many ways to write the same thing. I know what you are talking about. We have had the same issue with writing api calls for the win api.(where to begin) bTW what scripting language is it? Is it proprietary to the application?

këö¬t
Member ******
Posts: 80
Joined: 08/07/02, 12:00 am
Location: north of london
Contact:

Post by këö¬t » 03/26/03, 5:40 am

thanks for the ideas so far. have to try and make some space for a long slog of scripting.
it's mircscript, which is indeed proprietary, as far as i know. it's fairly large though, but im trying to do something that hasn't been done, so there isn't anything i can refer to in a sense.

the creative process is indeed unique. i spend half my time designing the ascii art for the logo in the script... :)
këö¬t :: [url=irc://irc.quakenet.org/mtuk]#mtuk[/url]

Gerry
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
Posts: 5727
Joined: 12/04/01, 12:00 am
Location: Perth, Western Australia
Contact:

Post by Gerry » 03/26/03, 8:42 pm

Search for "Program Development Routine" on Google and learn it. If you don't follow any other part make sure you do the first "Create a list of sub problems" then use this to work out your main program framework.

ie. when attempting to make a game I start out like this... THE BASIC FRAMEWORK:

main()
{
initalise();
while(key_pressed != escape_key)
{
draw_map();
move_player();
draw_to_screen();
}
finalize();
}

At this stage I haven't even thought about how these functions work, just what I want them to do. This is just the logic.

Then you do the same for those functions ex.

move_player()
{
erase_last_player_position();
update_player_variables();
use_variables_to_draw_player_in_correct_position();
}

Once you have finished all this you can start working on the smallest parts making functions that work independantly... ex.

erase_last_player_position(bitmap, player_vars)
{
erase player from bitmap using positions specified in player_vars;
}

Ahhhh.... I don't think I'm explaining this right just follow the Program Development Routine.
I answer rhetorical questions for my own enjoyment.

Post Reply