r/gamemaker • • Mar 11 '20

Pls dont delete

Post image
646 Upvotes

102 comments sorted by

99

u/Bosomtwe Mar 11 '20

Or do sprite_objectname -> change the object name -> never get around to changing the sprite name

23

u/gojirra Mar 11 '20

Every single time.

0

u/[deleted] Mar 11 '20

[deleted]

2

u/buttonmasher525 Mar 11 '20

Honestly it's what I've wanted the most for the longest, it just feels weird for an IDE to lack it

1

u/Erectile_Knife_Party Mar 12 '20

Can you explain what refactoring tools are?

4

u/erogilus Mar 12 '20

When you make changes in one place that the IDE is smart enough to detect other places that would also need to be changed to reflect.

For example, renaming a script should rename all calls that script to reflect. Similar when you rename a sprite, object, or tile set.

Instead of it now, where you have a bunch of broken references to the old name that are invalid and need to be updated by hand.

48

u/Slipin2dream Mar 11 '20

I prefer to name everything 7up_

4

u/SGT3386 Mar 11 '20

... it's an up thing

2

u/[deleted] Mar 11 '20

sierramist_

1

u/CrossBones209 Apr 10 '23

If only it still existed :(

35

u/pabbdude Mar 11 '20

spr_spriteMainChar

21

u/abrasivetroop Mar 11 '20

I prefer sprite0

72

u/KaskDaxxe Mar 11 '20

Why arent there more gms memes i love this

29

u/radfordblue Mar 11 '20

Because subs that allow memes end up being flooded with them, to the point that it drowns out the actual discussions that the sub was created for.

11

u/Hjhawley7 Mar 12 '20

A good compromise I’ve seen is to allow them one day a week. I think it’s a good balance.

4

u/maxvalley Mar 12 '20

There could be a weekly thread for memes

4

u/HomeyDogBiscuit Mar 12 '20

ah true, we should have something like that, a weekly meme day, I’d like that

4

u/Hjhawley7 Mar 12 '20

That’s the best solution I’ve seen that actually works. Allowing memes tends to generate traffic and more activity in general, but it’s very easy to let a sub get oversaturated and tank in quality if the mods aren’t strict.

2

u/HomeyDogBiscuit Mar 12 '20

Yeah this is true, maybe a dedicated “gamemaker studio memes” subreddit then ? I’d give that a sub

4

u/Hjhawley7 Mar 12 '20

I dunno. This may be personal preference but I never really care about those. It’s kind of the worst of both worlds; the main sub is usually boring and the meme sub is flooded with low effort trash.

Having a meme day once a week usually provides a good balance. The sub stays on topic, and the memes tend to be more high-effort because the good ones get more attention.

1

u/HomeyDogBiscuit Mar 12 '20

that’s a good point

2

u/Vertex138 *Waka waka* Mar 11 '20

They're not allowed here normally. For some reason.

34

u/ThingGuyMcGuyThing Mar 11 '20 edited Mar 11 '20

Starting your sprite names with spr_category_ -> Uber Galaxy Brain

  • spr_structure_brick

  • spr_projectile_bullet

The longer I've been coding, the longer my identifiers have gotten.

17

u/PsychoSeel Mar 11 '20 edited Mar 11 '20

Same, readability is a huge plus, I don't mind using long variable names instead of adding comment everywhere.

2

u/SamSibbens Mar 11 '20

I try to make my variable names be the comments. This sounds like an extremely well said sarcastic joke but it isn't; the better the variable and function names, the more readable things are. I agree with you 100%. With auto-completion there is no reason to use short names.

4

u/[deleted] Mar 11 '20

I just make a folder for categories and throw the sprites in there

5

u/ThingGuyMcGuyThing Mar 11 '20

There are other reasons to use categories in a name. Let's say you've got a brick background, but also bricks as weapons.

When you're reading through code, it's clearer to see spr_projectile_brick rather than just spr_brick. Particularly for large codebases or collaborations where you might have hundreds or thousands of similarly-named objects.

1

u/[deleted] Mar 12 '20

Usually if I have more than one of the same item I’ll name it and categorize it by which level it first appears in, not nearly as smart as what you’ve said but it gets the job done.

2

u/wy477wh173 @wy477wh173(Twitter) Mar 11 '20

Yea, I realized this on the 2nd or third project and will never go back.

2

u/Jack55555 Mar 12 '20

I prefer spr_structureBrick

Dunno why, a habit I picked up from php.

10

u/akaryley551 Mar 11 '20

spr_ gang is the way to go

15

u/[deleted] Mar 11 '20

spr no underscore gang

6

u/JacquePorter Mar 11 '20

Capitalize correctly you can read it just fine without the underscore! Saves tens of milliseconds typing by skipping the _!

2

u/wiz3n Mar 11 '20

Even better, sp no underscore. Camel case ftw.

7

u/JacquePorter Mar 11 '20

The ‘r’ is important! As Nintendo taught us in 2003 ‘sp’ stands for ‘special.’ This is not a “hero slashing up and leftward special” it’s a “hero slashing up and leftward SPRite”

1

u/nujuat Mar 11 '20

But all the rest of gamemaker’s syntax uses underscores. Camel case is good, but I want to be consistent.

2

u/VanishMantle Mar 11 '20

I do this for all my naming conventions.

7

u/HaldenCollier Mar 11 '20

Not using an underscore sprPlayer

3

u/maxvalley Mar 12 '20

it’s a start. Just pare it down to sPlayer and the you’re golden

1

u/HaldenCollier Mar 12 '20

I prefer to use 3 letter prefixes, due to this fact:

sBackground sBackground

No difference but now with three letter prefixes

sprBackground sndBackground

3

u/maxvalley Mar 12 '20

I getcha! I’ve solves that by only using the 3 letter prefix for sound. Another option is using ‘a’ for audio

4

u/oldmankc wanting to have made a game != wanting to make a game Mar 12 '20

Works until you have something else that uses an a. You've only got 26 prefixes to work with if you restrict it to a single character.

1

u/maxvalley Mar 13 '20

Yeah so far I have never run into that issue or even come close. But it’s always possible to add another letter or two in special cases where necessary. Still makes typing easier overall and that’s why I do it

2

u/oldmankc wanting to have made a game != wanting to make a game Mar 13 '20

Yeah, our environment team goes with a single character to break stuff up, but their stuff tends to be restricted to a fairly small number of file types (fbx, materials, and textures). I tend to go with something a bit more readable, but characters/animations and such tend to have a bit more stuff associated with them. I also use the prefix for storing information that gets automatically flipped on an asset import (this is all Unity stuff). So using aG_ or aL_ for animations when they've got stuff that's just a_ doesn't leave me feeling in a good place that someone could look at those and know they're entirely two different types of assets, so I go with anmGen, chrMdl, etc.

1

u/maxvalley Mar 13 '20

I don’t use any external file types so my types are limited by the default gamemaker types. In your situation I can imagine using two or more characters would be smarter and easier in the long run!

1

u/oldmankc wanting to have made a game != wanting to make a game Mar 13 '20

Yeah...naming convention meetings can become a thing. >_<

1

u/HaldenCollier Mar 12 '20

Those are both valid solutions, I didn’t think of that. I usually program in C# anyway so I just prefer my 3 letter prefixes.

1

u/maxvalley Mar 12 '20

why, does c# prefer it that way?

1

u/HaldenCollier Mar 14 '20

No, it’s just a preference. Also due to the fact C# has a lot more definitions that GMS.

  • List<T> = colUsers (collection)

  • Boolean = blnIsAdmin

  • etc.

GMS in comparison:

  • var (could be Boolean, collection, etc.)

  • enum

  • object

  • etc.

•

u/DragoniteSpam it's *probably* not a bug in Game Maker Mar 11 '20

This is not a precedent. This subreddit is not a place to post memes, but I'm going to leave this up just this once because I got here three hours late and y'all have already gone wild.

If people want the ruling on memes to be changed you can talk it out with the mod team, but this is not a good way to do that.

6

u/PoshoDev Mar 11 '20

What a weird way of randomly stumbling upon you.

5

u/DragoniteSpam it's *probably* not a bug in Game Maker Mar 11 '20

Small world sometimes, right? (Insert game maker land reference here.)

0

u/[deleted] Mar 12 '20

[deleted]

2

u/oldmankc wanting to have made a game != wanting to make a game Mar 12 '20 edited Mar 12 '20

A single weekly thread would make it a lot easier to ignore at least.

Though, I imagine there's probably plenty of more of that stuff available in the discord.

Having talked w/ the mods about other stuff in the past, one issue is that there's only 2 stickied threads allowed at a time.

4

u/sockmonst3r Mar 11 '20

Nothing grinds my gears more than importing assets and having to change everything to spr_ obj_ rm_ ect

4

u/soozafone Mar 11 '20 edited Mar 12 '20

Can always tell when someone has been following the Shaun Spaulding tutorial

(I’m a big fan of his, but I am nevertheless part of spr_ gang)

edit: oops misspelling

3

u/ShaunJS Video Person Mar 12 '20

*Spalding

3

u/soozafone Mar 12 '20

I was so focused on not saying Shawn :(

4

u/IrisHvCaRvBomB Mar 11 '20

Oh no! I have teh small brain...

sBrain_small

1

u/[deleted] Mar 12 '20

SBS1(Smol Brain Sprite 1)

4

u/XatomXplosionX Mar 11 '20

Anyone else part of the _spr / _snd / _bgr / _scr / _shd / _fnt / _tl / _obj / _rm gang?

👉😎👉

2

u/[deleted] Mar 12 '20

Nope!

1

u/Astabeth Mar 12 '20

🙋🏽‍♀️

4

u/Brusanan Mar 11 '20

Reverse this whole list. Underscores have no place in variable names.

3

u/mdWade Mar 12 '20

but these ain't variables, dawg

10

u/Rohbert Mar 11 '20

If you want to have a conversation about resource naming conventions, then by all means start the conversation. Resourcetype_name is what I always do.

But DO NOT title your post "plz dont delete." That is a fantastic way to get your post immediately deleted. Had you titled it "Use good naming" and added a sentence about why this is important under your pic we would have had zero issues.

Please read the rules and side bar of this subreddit to see what we are about here. We are about helping and supporting each other in our game making adventures.

9

u/Spanktank35 Mar 11 '20

I blame FriendlyCosmonaut for my bigly brain

3

u/ridho_h Mar 11 '20

My brain seems to follow the sCamelSprite subconciously

1

u/maxvalley Mar 12 '20

This is the way to do it! It’s the best

3

u/CrackedGamer573 Mar 11 '20

sThisIsAnExample is my preferred way of doing it. Used to do spr_ but this imo isn't neccessary.

3

u/OckeFFS Mar 11 '20

Same! Spr_ just seems too verbose. Plus i really like the clean loook of the simple s

3

u/maxvalley Mar 12 '20

This is the way I do it too. I’ve arrived at that by basically going in the opposite order of the meme

2

u/awashinima Mar 11 '20

sprite_SpriteName

2

u/cenestral Mar 11 '20

sThing masterrace

2

u/sendnukes_ Mar 11 '20

Literally write "sprite_from_object_blank" It's so intelligent that it's nearly Impossible to someone execute perfectly

2

u/GrroxRogue Mar 12 '20

The transcendent multiverse brains like me put the tag at the end like donkey_spr so it doesn't even help you in the autocomplete PepeLaugh.

2

u/maxvalley Mar 12 '20

sSpriteRed is the superior way to do it. Saves space and is faster to type

I used to do spr_sprite_red and then s_sprite_red but I really like my current naming system

I’m such a geek 🤓

1

u/[deleted] Mar 12 '20

My naming system saves more space but is more dangerous and confusing, oh well!

2

u/maxvalley Mar 12 '20

what’s your naming system?

2

u/[deleted] Mar 12 '20

<letter(s) representing the type of thing it is, for example B for bullet or PB for player bullet> <If it’s a sprite, put the letter S here, or the letters So for sound, etc.> <number is object>. An example would be PBS4(Player Bullet Sprite 4), or BGM7(BackGround Music 7).

2

u/maxvalley Mar 12 '20

I find it weird to indicate them only by a number. I think I’d have trouble remembering!

2

u/[deleted] Mar 12 '20

Yeah... but I develop a good idea of what’s what soon enough

1

u/Jack55555 Mar 12 '20

So you never use sounds in your game?

1

u/maxvalley Mar 12 '20

a for audio

2

u/Anapsys Mar 12 '20

AtI use all four methods at once, randomly

1

u/SoulPixel Mar 11 '20

Am I the only one who does player_spr ?

2

u/marsgreekgod Mar 12 '20

It's faster to know if it's a Sprite /object /room /whatever of it's left to right so that's why most prefer the other way

2

u/Astabeth Mar 12 '20

Hero_spr Lvl1Enemy_obj StartRm_snd

I've done it this way for years, but if the other way is more standard, I may swap.

1

u/clothespinned Mar 11 '20

you're right and you should say it

-grace

1

u/[deleted] Mar 11 '20

Any controllers I have o put ctrl_ Infront of. Like ctrl_game

1

u/mattmccordmattm Mar 11 '20

I always do sprite_ I must be in a whole other galaxy :0

1

u/LukeLC XGASOFT Mar 11 '20

Definitely part of team spr_, but that's more because of GML than my preference. Consistency is valuable for cleanliness and autocompletion, so I try to follow the convention of whatever language I'm working in.

1

u/QW3RTYPOUNC3S nothing quite like a good game Mar 12 '20

the virgin spr_spritename Vs the CHAD sprSpritename

1

u/[deleted] Mar 12 '20

I don’t even do that, my naming conventions are as follows: <single letter representing what the sprite/object is> <if it’s a sprite, put ‘S’, otherwise no letter> <number of it, even if it is and will be the only of its kind>. An example would be PBS1(Player Bullet Sprite 1). Or maybe E3(Enemy 3).

1

u/Shadow15243 Mar 12 '20

How about, Ending your Sprite names with _Spr.

1

u/[deleted] Mar 12 '20

YES looks like I'm smart

1

u/HomeyDogBiscuit Mar 12 '20

Hahaha, I can agree I’m an “spr_” guy

1

u/TartarusOfHades Dec 11 '23

I make mine nameObj or nameSpr

1

u/Valkuil15 Mar 11 '20

My brain is very big apparently