Mynotoar
Active member
Hey guys... sorry to keep bugging you, but you really are wonderfully helpful when it comes to VB, and I could much use your input again!
Our Computing teacher is encouraging us to try making games with Console in VB, and I like the idea, but there's one big problem with a lot of games that I don't know how I'd get around: there needs to be a game tick that's running constantly, but while the tick is running you would be able to use inputs as well. For example, say Tetris. The blocks are falling constantly, every tick they move down, but while the time is elapsing from one game-tick to the next, the Console needs to allow you to be able to read a ConsoleKey so you can change the path of that block or rotate it.
I've heard something about Threading which runs multiple functions at once - is this the sort of thing I need to be looking into? At the moment, all I know how to use is Threading.Thread.Sleep(Val in Milliseconds) to hold the Console (thanks Ian!), but is there any way to use this principle to accept input while the Console is waiting? Is there an even simpler way I'm overlooking?
If it is Threading or something even more complicated, I'd very much appreciate if someone could intuitively explain to me how it would work - I've only been doing VB for four months and a lot of the more complicated stuff I find very hard to grasp.
Hope you can help! Thanks a lot in advance!
Our Computing teacher is encouraging us to try making games with Console in VB, and I like the idea, but there's one big problem with a lot of games that I don't know how I'd get around: there needs to be a game tick that's running constantly, but while the tick is running you would be able to use inputs as well. For example, say Tetris. The blocks are falling constantly, every tick they move down, but while the time is elapsing from one game-tick to the next, the Console needs to allow you to be able to read a ConsoleKey so you can change the path of that block or rotate it.
I've heard something about Threading which runs multiple functions at once - is this the sort of thing I need to be looking into? At the moment, all I know how to use is Threading.Thread.Sleep(Val in Milliseconds) to hold the Console (thanks Ian!), but is there any way to use this principle to accept input while the Console is waiting? Is there an even simpler way I'm overlooking?
If it is Threading or something even more complicated, I'd very much appreciate if someone could intuitively explain to me how it would work - I've only been doing VB for four months and a lot of the more complicated stuff I find very hard to grasp.
Hope you can help! Thanks a lot in advance!