123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|556|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> caseMethodology

Fri, 15 Apr 2016, 06:59
Jayenkai
My code is all over the damn place, but in general I use single letter lowercase variable names for temp stuff, and then CapitalisedWords for most variables and function names.
..although most of my more important arrays (plr, grid, obj, bad) are typically all in lowercase.

peopleTellMeThis is the preferred style, but that first missing capital letter really pisses me off!!

Do you have a preferred style, or is your code as chaotic as mine?

Oh, and I also try to avoid underscores in things. Looks messy once you start doing complicated code.

-=-=-
''Load, Next List!''
Fri, 15 Apr 2016, 07:34
rockford
I use only lower case variables, which are accurate to their use in the game - eg "anim%" for sprite animation number and strangely "dlay%" for animation speed delay (it's the only variable name I do over-shorten). I've used both of these for the last 20 years or so, every single animated feature I have in any of my games are powered by those two variables!

My TYPEs are all identified by adding uppercase "T" to the frontend, so "Tplayer" would be a player TYPE instance.

All my functions are lowercase too and appropriate to what the function actually does. I'm not one for "FUNCTION foobar: " as in two weeks time I won't remember what the fuck "foobar" means!

Basically everything that isn't an included system command, for me, is in lower-casse (except the TYPEs as mentioned above).

That's how I do it and as my code is not open source, only I get to see it. And I don't care if others disagree or say that it's wrong. That's the way I do it.

I do occasionally use underscores for things like "alien_fire" or "alien_xpos" where they are required to be GLOBAL variables.

Also, most people tell you now code indents should be tabbed. Well, I use spaces. Tough titty.

I do comment my code fairly well though - always have.

My code is still pretty neat and readable, so suck it up, cupcakes!


Fri, 15 Apr 2016, 07:48
Dabz
I use hungarian notation, sorta, which is what Jay doesnt like...

In BASIC, I use it pretty loosely:0



That stems from BlitzBasic really since everything that gets returned is mostly an int (handles etc)

When I'm programming in something a bit more hefty, I do generally follow the rule:-



When using GUI, I tend to go:-



I do generally stay in this realm pretty okay, though, if I'm on a monkey at a type writer one, it could go out the window!

Constants are always uppercase

Oh, and I hate underscores, they should ban them... I literally detest using some libraries that has every function or whatever set out this this:-

B3D_Graphics()
B3D_CreateCube()
B3D_RenderWorld()

Though, saying that, I have generally done that myself in the past!

Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit