Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

Combination Circuits/Schematics

For general discussion related FlowStone

Re: Combination Circuits/Schematics

Postby tiffy » Sat Mar 17, 2018 7:15 am

tulamide wrote:A simple tip, if I may. You both are trying it pixel-based (grid-based). In game development, it is all about moving graphics around as fast as possible, and as similar as possible. The latter means, the game should behave the same, no matter if played on a 1 GHz processor, or a 3 GHz processor. Makes sense, right?


Thank you, Tula, for someone with absolutely no formal training in programming languages (me, noob)...I do learn new things every day.
User avatar
tiffy
 
Posts: 310
Joined: Wed May 08, 2013 12:14 pm

Re: Combination Circuits/Schematics

Postby RJHollins » Sat Mar 17, 2018 7:27 am

same here.

Thank-you 8-)
RJHollins
 
Posts: 1243
Joined: Thu Mar 08, 2012 7:58 pm

Re: Combination Circuits/Schematics

Postby Spogg » Sat Mar 17, 2018 3:32 pm

I’m so sorry but I can’t make this work tulamide. I know almost no Ruby though so I guess it’s not surprising :lol:

I have some questions:

@t += dt * @rate :

- dt is undefined in Ruby so I substituted fixed values, like 0.01, 0.1 etc but I suspect there’s more to it than that.
- What stops the above counter and why wouldn’t it carry on forever?
- dt is a small time increment added on every draw call. Does this mean on every screen refresh or only when a change of input maybe triggers a re-draw? If it’s the latter wouldn’t we again be dependant on green timing?

It would help me bigly if you could throw together a working demo so I could see where I’m going wrong and hopefully learn something.

Cheers

Spogg
User avatar
Spogg
 
Posts: 1651
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Combination Circuits/Schematics

Postby DaveyBoy » Sat Mar 17, 2018 6:34 pm

You really should start learning Ruby Spogg . . it takes Flowstone to a whole new level! I started learning it about 18 Months ago and I hardly use greens at all now. It's not difficult at all . . (I'm a similar age and background to you by the way :) )
User avatar
DaveyBoy
 
Posts: 40
Joined: Wed May 11, 2016 9:18 pm
Location: Leeds UK

Re: Combination Circuits/Schematics

Postby tulamide » Sun Mar 18, 2018 1:12 am

Spogg wrote:I’m so sorry but I can’t make this work tulamide. I know almost no Ruby though so I guess it’s not surprising :lol:

I have some questions:

@t += dt * @rate :

- dt is undefined in Ruby so I substituted fixed values, like 0.01, 0.1 etc but I suspect there’s more to it than that.
- What stops the above counter and why wouldn’t it carry on forever?
- dt is a small time increment added on every draw call. Does this mean on every screen refresh or only when a change of input maybe triggers a re-draw? If it’s the latter wouldn’t we again be dependant on green timing?

It would help me bigly if you could throw together a working demo so I could see where I’m going wrong and hopefully learn something.

Cheers

Spogg

Indeed it is not surprising. How do you think to understand a language, if you are not yet familiar with its syntax? That's like trying to speak German without ever having learned how a German sentence is constructed.

"My lovely Mr singing club"

Does this make any sense to you? Of course not. It is a German saying that I translated literally, word by word, without considering English syntax.

"Mein lieber Herr Gesangsverein"

Somebody from Britain had a few German lessons in school, but 20 years later, when we met, he couldn't remember much from it, and the few bits in his mind were additionally twisted. And so he said "Ich bin ein Spiegelei auf dem Boden". Now, this doesn't make any sense. It means "I'm a fried egg on the floor". Obviously he once had a lesson where somebody let fall a fried egg. But he couldn't remember the whole sentence and his mind filled in the gaps.

What I want to say is, learn the syntax first. How Ruby expects you to talk to it, and how Ruby will talk to you. Aspects like local-, global-, class- and class-instance-variables, constants, methods, arguments, the "everything is an object" concept.

Then you will be able to learn from other people's code.


The post I made was not about a fully featured, working example. It was about the principle. You could do the very same in green as well. Just the principles of time-based movement. So, of course it doesn't work right out of the box. I didn't see the need for code that doesn't deal with the principle of time-based movement, but with setting colours or drawing something.

Having said all that, I have made a (VERY SIMPLE!!) example. A fully working Ruby example (only tested in v3.0.6). I interrupted two works for other people on the forum (you know one of them), so I hope they don't get mad at me for the delay.


And Tiffy, I'm sorry for hijacking your thread. I hope you aren't angry and can learn from the example :)
Attachments
time_based_movement.fsm
(13.86 KiB) Downloaded 41 times
tulamide
 
Posts: 1656
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Combination Circuits/Schematics

Postby Spogg » Sun Mar 18, 2018 8:35 am

Thanks so much tulamide, that looked like a lot of work and I didn’t expect that, but I really appreciate it very much.

Yesterday I started to look into Ruby, because I had no idea what I was doing with your code, and I can now see just how impressive a language it is.
I can also see that I had no chance without even the basics in place. However, my pathetic and frustrating attempts have aroused my curiosity and desire to learn.

Cheers

Spogg
User avatar
Spogg
 
Posts: 1651
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Combination Circuits/Schematics

Postby tiffy » Sun Mar 18, 2018 8:39 am

[quote=And Tiffy, I'm sorry for hijacking your thread. I hope you aren't angry and can learn from the example :)[/quote]

First of all, Tula, thank you so much for your help and all the effort you put into helping others.

Not at all, how can I ever be 'angry' at someone offering help?

I just want to explain the reason why I opened this main post under one heading and also under "General" and not under "User Examples" - I really don't want people to get a misunderstanding about this. I did so because I consider my uploads as being too incomplete (as I am still in a learning process) to mess up all those nice User Examples from the Gurus. It is not that I am trying to be different, selfish or separate from others, it is the only reason, I have nothing against anyone really I don't. On the other hand (this was also one of my considerations then), if Admin one day decide to delete all the crap I uploaded so far, it would be just a matter of pressing one 'button' as they are all in one handy location - and as for myself handy in one location if I ever lose some schematic I can quickly download it from this forum.
User avatar
tiffy
 
Posts: 310
Joined: Wed May 08, 2013 12:14 pm

Previous

Return to General

Who is online

Users browsing this forum: RJHollins and 18 guests