Search found 37 matches

by gordebak
Thu Jan 05, 2012 12:27 pm
Forum: Support and Development
Topic: os.execute and printing text [Solved]
Replies: 10
Views: 2144

Re: os.execute and printing text

miko wrote:You may prefer love.keypressed() instead.
Yeah, that's better.
by gordebak
Thu Jan 05, 2012 11:20 am
Forum: Support and Development
Topic: os.execute and printing text [Solved]
Replies: 10
Views: 2144

Re: os.execute and printing text

If anyone else is interested in something similar, here's the solution:

Add " &" to the end of your command line. This worked for me. And you might want to use love.keyreleased to call the command, that way it runs once.
by gordebak
Thu Jan 05, 2012 8:43 am
Forum: Support and Development
Topic: os.execute and printing text [Solved]
Replies: 10
Views: 2144

Re: os.execute and printing text

Okay then.
by gordebak
Thu Jan 05, 2012 8:40 am
Forum: Support and Development
Topic: os.execute and printing text [Solved]
Replies: 10
Views: 2144

Re: os.execute and printing text

MarekkPie wrote:update() has to end before draw() can be called. Try putting the isDown(" ") in draw(). It probably won't be simultaneous, but it will be quicker than the above.
Nope, same result. If I could show the text before the command, that would be okay too.
by gordebak
Thu Jan 05, 2012 8:15 am
Forum: Support and Development
Topic: os.execute and printing text [Solved]
Replies: 10
Views: 2144

Re: os.execute and printing text

I also tried

Code: Select all

f = io.popen("espeak "..text)
f:close()
The result is the same.
by gordebak
Thu Jan 05, 2012 7:39 am
Forum: Support and Development
Topic: os.execute and printing text [Solved]
Replies: 10
Views: 2144

os.execute and printing text [Solved]

Hello. I have a little problem. I want my program to execute a Linux command when I press space, and it works fine. But I want to show a text when command is executed. But my program shows the text "after" it completes the work of the command. Can't I do them simultaneously? Here's the code: functio...
by gordebak
Wed Jan 04, 2012 8:10 am
Forum: Games and Creations
Topic: One Way To Go
Replies: 30
Views: 6495

Re: One Way To Go

spirulence wrote:This is quite a lot of fun! Kudos. :)
Thanks!
by gordebak
Tue Jan 03, 2012 5:43 pm
Forum: Games and Creations
Topic: One Way To Go
Replies: 30
Views: 6495

Re: One Way To Go

The relative velocity (the velocity at each call) will change. But when you sum the displacement between your position at t = 0 and your displacement at t = 1, it will equal your velocity in pixels/second. If you simply go, x = x + velx, then your velocity is in pixels/dt, which is 1/dt times faste...
by gordebak
Tue Jan 03, 2012 5:36 pm
Forum: Games and Creations
Topic: One Way To Go
Replies: 30
Views: 6495

Re: One Way To Go

I checked the game on another computer, and it works fine. It seems that it's a hardware problem on my side.
by gordebak
Tue Jan 03, 2012 5:10 pm
Forum: Games and Creations
Topic: One Way To Go
Replies: 30
Views: 6495

Re: One Way To Go

Anyway, robin explained it well, you define your speed as pixels per second, then multiply it by dt (every frame) to get the distance traveled between the frames. So: --somewhere, when the speed is set velx = 200 -- pixels per second --and the starting x position of your object x = 15 --in update x...