How do I rotate an object when condition met.

Get help using Construct 2

Post » Mon Mar 17, 2014 3:30 am

Yann wrote:And building something on assumption about why programmers do what they do is a bit dangerous. There's already a lot of programming style out their and I'm not sure they would all agree on that one (:


At it's core, a loop simply is a repeated set of commands in every language I've seen. How it is accomplished is up to the language and the programmer.

One must always consider who their target audience is, yes? It's funny how they tote that Construct 2 is a "No programming required" way to make games...that tells me exactly who they are marketing it to. Getting a program to work is programming and if they want to make it easier to understand, to make it more suited to their target audience, then this is one thing they should address.
B
20
S
7
G
7
Posts: 88
Reputation: 4,152

Post » Mon Mar 17, 2014 3:49 am

I was mostly refering to what the wait means in construct2.
It doesn't mean blocking a thread it means calling something later.

I agree with you though that C2 should be more programmer oriented in its design. Making things appear too easy for n00bs end up making things hard for more serious projects.
Like, I'd love to have more basic types than number and strings. Booleans and null would be nice. I mean... manipulable boolean, not like the "is Doomed" kind of condition but more like "Doomed == true" or better "Doomed == Function.Call("isAllowedToBeDoomed")"

But otherwise, that doesn't change the fact that wait being a thread blocking function or being a delayed callback mecanism is a matter of choice. And I'm not really sure if the "hack" you suggest is good or not.
What would happen if you call a wait in a multi nested loop? should we multiply by all the loop indices, or just the last one? and what if the user would want to do the former?...
In the end, since javascript is the language construct export to, I think the delayed callback mecanism makes more sense.

And documentation... yeah... documentation... (never really read it <_<)
B
68
S
22
G
14
Posts: 1,485
Reputation: 16,561

Post » Mon Mar 17, 2014 4:16 am

TheDoctor wrote:
Aphrodite wrote:
I don't think it would be a good idea, It is logic right now, it is like having the same set of event (not only actions) placed one after another:
https://www.scirra.com/tutorials/56/how ... ait-action[/url]


Consider this, the entire purpose of a loop is to execute a set of events over and over and over and over until it has done it enough times or stopped by some event. Logic, and the standard way of thinking in most programming languages, I believe, would dictate that loops, intuitively, are simply repeated actions.

If I want to rotate a wheel 90 degrees clockwise, then I would simply rotate a wheel 90 degrees clockwise. You don't need a loop for that. If I want to rotate a wheel 90 times, one degree at a time clockwise, then I'd use a loop. I'd only put a command in the loop one time at one degree and then the loop would execute that 90 times. So, whatever I put in the loop code block, intuitively and logically, I want that to run for as many times as the loop runs. Whatever happens behind the scenes is all up to the creators of Construct. They can choose to program the Wait command any way they want, but I believe that the more intuitive you make something, the better the product is and the happier the users are!

Right now, I believe most new users of Construct, especially those who program in other languages, would find it a headache to wonder why their instructions in a loop execute "all at once". Certainly they can look into the matter spending a few hours searching the manual, looking through many tutorials which aren't cross referenced and even wait for someone to answer "that same question again" on the forums, but that means the user interface isn't as intuitive as it could be. There is room for improvement.

For me, I read the manual many times looking for the answer but couldn't spot it. I was looking through the tutorials, but I didn't think the problem was the Wait command, I thought I was structuring my loops the wrong way! I was doing all kinds of searches on LOOP STRUCTURE! I thought I had the conditions and sub events with my actions in the wrong place!


I wasn't saying that your though was wrong, I was explaining the "why it was like that", to precise that it wasn't a bug of some sort If I can say so, also I think changing that would break project unfortunetelly.

Also a loop always run during one tick itself, that is maybe why I think it was more logic that it was though this way with the wait, it is more a personnal thing at the end.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Mon Mar 17, 2014 4:27 am

Just to be clear, I think that a program development environment like Construct 2 can be intuitive and powerful. I really am enjoying programming with it because after working with other programming languages and environments, Construct 2 seems very familiar, for the most part the documentation is written very well, the website setup is nice and their event system is put together very nicely. I totally believe it can be made a lot easier for the new people and still made more robust for advanced programmers at the same time. Construct 2 doesn't have to be complicated for advanced users, it can be easy for them as well.

Sure Construct 2 was programmed however it was programmed, but they don't sell what is behind the scenes to the customer, what sells is the frontend, which is the programming environment. -that's what users buy! You can always gut or change out the backend. For your target audience though, you should always develop your product with how they would like to interact with it. Recurring issues coming from the products users are sure signs that updates to the program need to be made. At least throw in some hints on what people usually get wrong when they use something.

I also agree with your Function calls. I'm still trying to figure out what all I can do with their parameters in their function call. I have to say, I've never written so many global variables before, which makes me feel like I'm doing something wrong!
B
20
S
7
G
7
Posts: 88
Reputation: 4,152

Previous

Return to How do I....?

Who is online

Users browsing this forum: Construct Monkey and 9 guests