Closed BackpackerSlash closed 3 years ago
This is a really neat idea! I currently have a lot of other extensions to review, but I certainly want to get to this one. Please be patient. :)
I have started working on improving this excellent and useful extension. Here are my changes so far:
https://user-images.githubusercontent.com/8879811/122162222-6d27a980-ce30-11eb-84f8-72fb9c37c941.mp4
Very nice! A very interesting extension :)
The only remaining questions are:
Any ideas?
https://games.gdevelop-app.com/game-7fd1525d-7de2-448e-b939-87f85b5f8f21/index.html
https://user-images.githubusercontent.com/8879811/122630037-452d8580-d07e-11eb-85d4-ed708e711694.mp4
Latest updates:
Holding Shift enables deselection https://twitter.com/VictrisGames/status/1406269312722104328
Control groups added https://twitter.com/VictrisGames/status/1406371403717173250
Before I finalize this extension, any thoughts on the name of it?
1) Select Objects with Cursor 2) Select Units with Cursor 3) (something else?)
Maybe "Select Units with Cursor"? Usually I would prefer a more generic naming, but for a fairly advanced extension like this it's a good idea to give a name that would "inspire"/convey the feeling of what it can be used for :)
I agree, I like "Select units with cursor" better.
Since I am planning on adding "RTS camera controls" next, should I simply call this extension "RTS unit selection"?
Update:
Instead of finishing "RTS unit selection", I started working on "RTS camera controls".
Play here: https://t.co/Nwd0uM4rym
Since I am planning on adding "RTS camera controls" next, should I simply call this extension "RTS unit selection"?
Yes! Good idea to keep the "RTS" here for both extensions. So let's go for "RTS unit selection" (or "RTS-like unit selection" to emphasis that this could be used for something else? As you prefer)
, I started working on "RTS camera controls".
Looks awesome too! I wonder how the scroll is working on touchscreen, should work more or less out of the box (but you won't have zoom in/out of course and all the rest).
Looks awesome too! I wonder how the scroll is working on touchscreen, should work more or less out of the box (but you won't have zoom in/out of course and all the rest).
I'll talk more about this on a new issue for "RTS Camera Movement", but my initial idea is to offer touchscreen camera movement with a three finger drag:
This would leave us with the option to do a two-finger pinch camera zoom, and of course single touch would be used to select units.... but how would you send commands to the units? (perhaps command buttons)
This might be a good time to take a step back to design the entire RTS UI so that we have enough "buttons" to accomplish everything. Here is what I have planned so far:
RTS-like Unit Selection
RTS-like Camera Movement
RTS-like Unit Commands
I decided to start posting my builds here so that others can see them and provide feedback.
Updates:
https://twitter.com/VictrisGames/status/1407564985589403652 https://twitter.com/VictrisGames/status/1407562080165646336
To do:
1) Rename object variables to use "__ExtensionName.VariableName" format 2) Determine if double-clicking ("select all units") actions should be part of this extension
What do you all think about item 2?
RTSUnitSelectionExtension_2.0.0.json.zip
~~RectangularFloodFill.zip (Ignore the name, I have a lot of stuff going on in this project!)~~
I lost a bit track of the progress on these extensions! Is there anything to review/help on? :)
The GOOD news is that I rushed through and implemented a TON of functionality in a short amount of time.
The BAD news is that I haven't taken the time to polish these and get them submitted. I should be able to do this one (now called "RTSUnitSelection") in the next few days.
Thanks for the reminder!
Update: I'm still working on this and trying to think bigger than my own RTS project. For instance, I am adding conditions "is selected", "is preselected" and actions "mark selected", "mark preselected". This will enable people to setup their own methods and keybindings for selecting objects. For instance:
Condition: "F2" is pressed
Condition: TriggerOnce
Action: Mark "MyObjects" as Selected
https://games.gdevelop-app.com/game-cc0238eb-a8a8-41f6-96e0-91f5209b951a/index.html
RTSUnitSelection_Extension_2.2.0.json.zip
RectangularFloodFill_SourceFiles_2.2.0.zip
(Ignore the name, these are the right files)
https://user-images.githubusercontent.com/8879811/126055980-a0dbedbd-5c1c-4ee4-aa91-67f62d903ef0.mp4
@BackpackerSlash since I started this from your template, what do you think of the current state of the extension?
I'm ready for this extension to be reviewed and looking forward to any suggestions for improvement.
@4ian (and team) this extension is ready for review. FYI - I am about to go on vacation for about a week.
Hold on reviewing this. I decided to make this extension more modular and also have more helper functions. I hope to post the update tomorrow.
RTSUnitSelection_Extension_2.3.0.json.zip
https://games.gdevelop-app.com/game-940922ef-f20f-4729-9692-f2ab0afa3815/index.html
Looking really good!
What you think of:
The sentence for RTSUnitSelection is
Select _PARAM1_ with _PARAM7_ mouse button (or touch). Draw a selection box using _PARAM2_ on Layer: _PARAM3_ with Z order: _PARAM4_. Hold _PARAM5_ to add units and _PARAM6_ to remove units.
As it's an action Select
forward that objects will be selected (or it's only me thinking about that).
What do you think of Allow to select...
or Perform object picking by selecting ...
The description is fine, long but fine, it can be reduced? Requirements, Default controls, and new conditions/actions/expressions are minimal things. I think types and variables names are not useful, the extensions ideas is to hide these complexities. Tips are good š
Selection box is for me like a short description.
The extension take in input a shape painter object, and an object to be selected over controls. To customize the selection box edit the shape painter properties.
The extension should works in theory with object group in input, did you tried?
No periods are required to the end of the sentences in the event sheet.
In AssignUnitID there is a repeat loop for Objects, the red comment from RTSUnitSelection about object picking is welcomed to understand why this loop exist. Same for TotalSelectedUnits and others you did it in RTSControlGroups.
Help link is broken
In Author we use handle, tags or names, we don't use URLs. This name will be show in the future to credit users on the extension list.
Looking really good!
Thank you, and thank you for the review.
- The sentence for RTSUnitSelection is
Select _PARAM1_ with _PARAM7_ mouse button (or touch). Draw a selection box using _PARAM2_ on Layer: _PARAM3_ with Z order: _PARAM4_. Hold _PARAM5_ to add units and _PARAM6_ to remove units.
As it's an actionSelect
forward that objects will be selected (or it's only me thinking about that). What do you think ofAllow to select...
orPerform object picking by selecting ...
Sure, I have changed it to "Allow player to select PARAM1 with PARAM7 mouse button (or touch)..."
- The description is fine, long but fine, it can be reduced? Requirements, Default controls, and new conditions/actions/expressions are minimal things. I think types and variables names are not useful, the extensions ideas is to hide these complexities. Tips are good š
I removed variables and a few other lines. How does it look now?
- The extension should works in theory with object group in input, did you tried?
Yes, my example uses an object group called "VisionUnits".
- No periods are required to the end of the sentences in the event sheet.
I have removed periods like that one.
- In AssignUnitID there is a repeat loop for Objects, the red comment from RTSUnitSelection about object picking is welcomed to understand why this loop exist. Same for TotalSelectedUnits and others you did it in RTSControlGroups.
I have added that comment on the instances of ForEach() you mentioned.
- Help link is broken
Try it now.
- In Author we use handle, tags or names, we don't use URLs. This name will be show in the future to credit users on the extension list.
I changed it to: "Slash, Tristan Rhodes (@VictrisGames)"
Thx!
Added in https://github.com/GDevelopApp/GDevelop-extensions/commit/d6ff2aeb68f0b03465b8e47671e022df1a2a8e9f
I've updated to 2.3.2, I've removed parenthesis in author name and simplified it to Slash, Tristan Rhodes, @VictrisGames
Even if two last authors is you this format is better for parsing it, and to a better visual for a future marketplace.
Awesome! So great to see this popping in the extensions library š Thanks both! š
Describtion
Draw a Box with a Shape Painter Object. Place a shape Painter object inside the scenes you want to Draw. "Draw the Shapes relative to the object position on the scene" needs to be unchecked. "Clear the rendered image between each frame" needs to be checked. Selectable Objects should have ther Origin point at the Center. On left click release, if a Box was drawn: For Objects that are more then half inside the drawn Box, the Variable "Selected" of Object is set to 1 For Objects that are NOT more then half inside the box, the Variable "Selected" of Objects is set to 0 A left Click without drawing the box, will unselect all objects, exept the Object under the Cursor, unless the Ctrl key is pressed. Multi-Selection by holding the Ctrl key.
Reserved Variables : Scene Variables: "StartX" / "StartY" / "EndX" / "EndY" / "drawing" Object Variable: "Selected"
remarks: When the Boolean Variables are released to Version 106 of Gdevelop the Object Variable "selected" should be changed to Boolean.
Checklist
Extension file
https://github.com/BackpackerSlash/Box-Selection/blob/main/Box_Selection_Extension.json
Box_Selection_Extension.zip