Re: developing a kind of radar?

2015-01-13 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
Re: developing a kind of radar? The wait function in BGT was pretty novel for me, on the grounds that Id been working primarily in Java and _javascript_ up to that point._javascript_ first. This was way before HTML5. Timers with callbacks were the only way to go.Javas Thread.sleep

Re: developing a kind of radar?

2015-01-12 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: developing a kind of radar? You can use a constant value, and this is likely to be fine.Or (Python again, sorry):while True: start =time.time() do_stuff() end = time.time() took = end-start if took = wanted_time: continue #we dont wait because we took too long. time.sleep

Re: developing a kind of radar?

2015-01-12 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector
Re: developing a kind of radar? Hi, so, I think Im, incredibly close to figuring this out. I do have one question, though. Whats the best way to regulate the time that passes between ticks? I know thats the entire point of the thing, and I looked at that frame clock for bgt, but Im

Re: developing a kind of radar?

2015-01-12 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: developing a kind of radar? Good. We really, really need more people around here advocating for it. It is frustrating to keep watching people use blocking architectures and throwing all their stuff right in the main loop. Sighted people solved these problems for us like 20 years ago

Re: developing a kind of radar?

2015-01-12 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector
Re: developing a kind of radar? Thanks! I think I am beginning to understand this. URL: http://forum.audiogames.net/viewtopic.php?pid=200853#p200853 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https

Re: developing a kind of radar?

2015-01-10 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
Re: developing a kind of radar? The difference betweenwhile(true) {functions(5);wait(5);}andwhile(true) {functions(fps.delay);fps.tick();}Is minor when youre doing something simple. You can go ahead and do it the first way, if you want. The only real advantage to the second way

Re: developing a kind of radar?

2015-01-09 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
Re: developing a kind of radar? For BGT, I wrote a clock class that takes care of the timer shenanigans. All you need to specify is how much time should pass between the start of each frame.A main function might look like this:void main() { clock fps(50); // The constructor takes frames

Re: developing a kind of radar?

2015-01-09 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
Re: developing a kind of radar? For BGT, I wrote a clock class that takes care of the timer shenanigans. All you need to specify is how much time should pass between the start of each frame.A main function might look like this:void main() { clock fps(50); // The constructor takes frames

Re: developing a kind of radar?

2015-01-09 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector
Re: developing a kind of radar? Hi, I think what confuses me is how ticking is different from something like, while (true) {keyboard_function();wait(5);}and how to know when to call something like tick, and how calling tick methods will effect the game. Im really sorry Im having so much

Re: developing a kind of radar?

2015-01-09 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector
Re: developing a kind of radar? Hi, Im still struggling with the concept of frames and ticks. I understand how it can be helpful, and I understand your code in post 2, Im just not sure how for example, youd tell the game how to tick everything properly, given a certain amount of time per

Re: developing a kind of radar?

2015-01-09 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: developing a kind of radar? Im afraid not. Ive gone through like 2 computers since I last looked at it. im now at the point where I can tell you all about DSP, and you probably do not want to see the articles I read at this point (Ive been having huge mileage with an entity component

Re: developing a kind of radar?

2015-01-09 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: developing a kind of radar? This might be a little much for one post. I apologize in advance if it is.To keep using my invented word...Keyboard_function is a ticker. Whatever keyboard_function normally does goes inside one. In reality, you usually end up breaking keyboard handling up

Re: developing a kind of radar?

2015-01-08 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector
Re: developing a kind of radar? Hi, thanks for the suggestions. I dont completely understand, but Ill definitely take a look at some game programming tutorials for information. Im now trying to figure out though, how I can update the angles the radar is scanning based on actions the player

Re: developing a kind of radar?

2015-01-08 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector
Re: developing a kind of radar? Hi, thanks for the suggestions. I dont completely understand, but Ill definitely take a look at some game programming tutorials for information. Im now trying to figure out though, how I can update the angles the radar is scanning based on actions the player

Re: developing a kind of radar?

2015-01-08 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: developing a kind of radar? You dont need timers. You do exactly what I did in post 2. And then:while playing: for i in all_tickers: i.tick(frame_rate) wait(however long)Determining the time to wait can take just a little math if you want it to catch up, but this is your entire

Re: developing a kind of radar?

2015-01-08 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: developing a kind of radar? Youre going to have to record the angle on the radar as an offset, say that it always goes from -45 to 45 for example. You then compute the actual angle by adding this offset. Because of the pattern I am describing--that you have tickers as a class--you can

Re: developing a kind of radar?

2015-01-07 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: developing a kind of radar? This is where the typical architecture breaks down and is also why I advocate reading sighted game programming tutorials. Youll need to architect your whole game to not use wait statements save in exactly one place. The typical approach to this is to define

developing a kind of radar?

2015-01-07 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector
developing a kind of radar? Hi, Im back! I was wondering if anyone has some suggestions as to the best ways to develop a kind of radar, that detects whats in front of the player for maybe 4 or 5 steps, in a half-circle? Ive tried to do this, but in its current form it causes the game

Re: developing a kind of radar?

2015-01-07 Thread AudioGames . net Forum — Developers room : Ian Reed via Audiogames-reflector
Re: developing a kind of radar? +1 for post 2.An important architectural concept for game programming, and explained very well. URL: http://forum.audiogames.net/viewtopic.php?pid=200106#p200106 ___ Audiogames-reflector mailing list

Re: developing a kind of radar?

2015-01-07 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector
Re: developing a kind of radar? Ah, okay. So just make a timer then, and call the update method every time its elapsed? Or I could put the timercheck in the update function itself. I do that with a couple of my classes, doing that for this didnt even cross my mind, hough. Thanks very much

Re: developing a kind of radar?

2015-01-07 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
Re: developing a kind of radar? Camlorn is right on track. The loop-and-wait thing works if you never have multiple things happening simultaneously (or as close to simultaneously as possible, anyway).In BGT, you _could_ use timers to keep track of these various independent mechanisms

Re: developing a kind of radar?

2015-01-07 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: developing a kind of radar? You can use timers in any language. There is only one good reason to even consider it: a fully online game that never pauses. But probably not even then. Being able to work with time in strange ways is an amazingly helpful thing.That said, you can replace