• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Code colors

M

Misty

Guest
So when dealing with massive, behemoths of code, I find the code colors lacking in functionality.

I need additional colors of tint, to categorize.

For example, say you are making a character. Most people do this

/////////////////////////sound code
bla bla bla+=1
x2+=1
etc.
/////////////////////////animation
bla2+=1
bla3+=1
etc.
//////////////////movement
bla4, bla5
bla5=1;
etc.

Thats fine for small snippets of code. But for behemoths of code with lots of scrolling the eyes get hurt and the brain gets lost in a maze of code.

There needs to be some kind of tint you can apply to words.
For example, the code related to movement could all be tinted slightly blue, so you can easily find problematic code that is related to the movement. And the animation code could be tinted some other color, like pink for instance.
So you could easily find and locate different elements of code instead of scrolling through a maze.
 
H

Homunculus

Guest
Or, you could break the code up using regions, or split each funtionality into its own script.

Having massive walls of code is generally considered (as far as i know) a bad practice, although it’s not always easy to avoid
 
M

Misty

Guest
Scripts subtly lag the game so I don't use them. And also because I have to use multiple variables and a script only outputs 1 variable so I'd have to output an array, which isn't as fast as variables I assume. Also because the scripts are asymetrical and dont do the exact same tasks as the other scripts.

Adding slight tint seems really easy from a Windows/Microsoft gui standpoint yet is not done.
 

GMWolf

aka fel666
Scripts subtly lag the game
nope. not in a relevant way.
If you are really concerned, use the inline pragma.

I have to use multiple variables and a script only outputs 1 variable so I'd have to output an array
Scripts dont execute in a vacuum. They execute given the instance of interest. So whatever code you have running in you monolithic event can be literally copy pasted into multiple scirpts and run from that event.
Regions are also a good may to partition your code.

Rather than a tinting of letters, it would be cool if you could tint regions, where the background behind the letters could get a tint.
Simply add a c_* values or hex value after the region markers, for example.
That being said I dont think this should be an area of focus for the IDE team of YYG. Would much rather the IDE not crash when i try to create a new project from the file menu...
 
M

Misty

Guest
nope. not in a relevant way.
If you are really concerned, use the inline pragma.
No idea what that is.


Scripts dont execute in a vacuum. They execute given the instance of interest. So whatever code you have running in you monolithic event can be literally copy pasted into multiple scirpts and run from that event.
Regions are also a good may to partition your code.
I use scripts when I can. But in this particular project they are the wrong tool for the job.

Rather than a tinting of letters, it would be cool if you could tint regions, where the background behind the letters could get a tint.
Simply add a c_* values or hex value after the region markers, for example.
That being said I dont think this should be an area of focus for the IDE team of YYG. Would much rather the IDE not crash when i try to create a new project from the file menu...
Yes Im fine with tinting regions in stead of text. But something of the matter has to be tinted.
And yes YYG should fix all bugs but then theres this.
Focusing on one bug can drive someone insane. It is better to take a break and just work on something else, such as adding tints. :)
 
D

dannyjenn

Guest
I personally don't think I'd ever need a tinting feature.

I'd just go with regions. I haven't used it much (just found out about it the other day), but it can really save on the scrolling. (If you're not aware, you just surround your code with #region and #endregion, and then it becomes collapsible.)
 

NeoShade

Member
I use scripts when I can. But in this particular project they are the wrong tool for the job.
I don't thikn that some sort of tinting for regions is a bad idea, but I'd still love to see exactly what kind of convoluted code you've got that couldn't possibly be split up into scripts.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
So
You make a topic about magically optimizing code and are referred to setting up YYC.
You say that you have no time for such things and instead make a second topic about issues that can be solved by using YYC.
This is not to mention that the overhead of a single script call is comparable to time it takes to assign a value to a local variable (in other words, practically nothing)
 
Top