Re: BGT game code

Few things here, although you didn't specified which key:
1. Line 37, I guess you meaned jatek=false?
2. You're missing a wait command in your loops. When you want to make an infinite loop for example to catch keys, you need to include call for wait on its end, because otherwise it'll drain cpu and that isn't healthy for hardware. smile
5 ms should work just fine, goal is just to prevent running full speed.
3. The valaszt function, although I didn't get what it should do checks for pressed keys, however only one time. That means, you need to hit exactly the moment where if (key_pressed(KEY_some)) is executed in the program, what is... impossible.
You can higher you chance by pressing the key more times, that's I guess what you meaned by the need to press keys repeatedly.
It's hard to tell the best solution, when I don't know, what is the program supposed to do, however one thing applies independently of purpose - when you're checking for a key press, it always should be looped.

Best regards

Rastislav

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : tdani via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : adel . spence via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : targor via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : targor via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : tdani via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : lukas via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : simter via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : MasterOfDeath via Audiogames-reflector

Reply via email to