playMaker

Author Topic: variable sort (on variable tab)  (Read 4743 times)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
variable sort (on variable tab)
« on: June 14, 2019, 09:20:27 AM »
Hi.

Many times i have lots of variables on a fsm and (for example) i want to look for a Array in the list.



It would speed up the process if you would be able to  sort by name, used or type (by click on Name/Used/Type on top)

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 150
Re: variable sort (on variable tab)
« Reply #1 on: June 14, 2019, 10:20:37 AM »
+1

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: variable sort (on variable tab)
« Reply #2 on: July 18, 2019, 02:47:55 AM »
Hi,

 I'd like that too indeed!

Bye,

 Jean

Padenlee

  • Junior Playmaker
  • **
  • Posts: 63
  • You can't hit what you don't shoot for!
Re: variable sort (on variable tab)
« Reply #3 on: July 18, 2019, 01:29:13 PM »
I always name my variables with a lowercase g, s, f, etc... based on what type it is. Example:

gGameObject
sString
fFloat
ect...

This groups the variables along with the added benefit of allowing me to have similar names like iScore and sScore in the same FSM and makes everything super clean and fast to understand.

I also use other naming conventions like:

vPlayerPos
vPlayerPosFrom
vPlayerPosTo
fPlayerRotY
fPlayerRotYFrom
fPlayerRotYTo
iSpawnCount
iSpawnCountMax
fDist
fPosMult
fPosMultBias
vvSpritePos <--Vector2
etc...

I'm wanting to create a Playmaker Best Practices guide soon. I've been making lists of best practices for the last few months. Along with the few shortcomings with Playmaker I'd suggest changing to make the asset a must have for fast game development. If Playmaker got me on Apple's TV show, it can make people 100k+ a year in app sales. Learning how to do that took me far too many years to discover, I'd like to help others get there much quicker. It would be great if people were able to make a profitable game in 3 months with Playmaker that would normally take a year with C#
« Last Edit: July 18, 2019, 01:41:26 PM by Padenlee »
-Paden Pierry
@padenpierry
Apple inc.'s first TV show, EP 1.
Game Dev since 2007
Coolest client: Bridgestone

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: variable sort (on variable tab)
« Reply #4 on: July 18, 2019, 04:29:23 PM »
Hi.
@Padenlee

Naming with using a / is much better for grouping, but that is not the point for this request :)

There is already a type showing, also when you look for a variable on an action it will only show the type you can use or need.

Could you share the shortcomings so PlayMaker can see and maybe adjust or add on a later version?

There is also a best practice wiki page that might be helpful.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: variable sort (on variable tab)
« Reply #5 on: July 19, 2019, 03:56:18 AM »
Hi,

 that's always good to share your tricks and tips!

I use a lot of signs as well, like $Data which is for example a raw data coming from Xml or json that is not yet parsed, like a string date or something.

 I use _ for private stuff that I want other fsm to be aware of this before messing with private vars.

I actually use plain english names as well, which makes it very clear.

Plenty of small stuff like that make up for a very clear fsm once these rules are adopted widely in your body of work.

 Bye,

 Jean