Search found 355 matches
- Jul 03, 2017 14:20
- Forum: Beginners
- Topic: Short-Circuit: Why Use their Bitwise Counterparts?
- Replies: 7
- Views: 1470
Re: Short-Circuit: Why Use their Bitwise Counterparts?
Personal preference is: short-cut operators (speed). However, can also be done without (the binary operators) but, with more code to get close, e.g.: If (cond1) Then If (cond2) Then If (cond3) Then If (cond4) Then ... End If End If End If End If With the short-cut operators: If (cond1) AndAlso (con...
- Jul 03, 2017 13:27
- Forum: Beginners
- Topic: Short-Circuit: Why Use their Bitwise Counterparts?
- Replies: 7
- Views: 1470
Short-Circuit: Why Use their Bitwise Counterparts?
My main preference when coding is to use the bitwise operators (such as OR, AND). However I am also aware of the short-circuit "equivalents" (i.e. ORELSE, ANDALSO), and after some reflection, I'm not too sure why the bitwise operators would be used in their LOGICAL uses (i.e. if x > 5 and ...
- Jun 26, 2017 21:25
- Forum: Beginners
- Topic: Weird keypress bug in GFX?
- Replies: 14
- Views: 3121
Re: Weird keypress bug in GFX?
Hi datwill310, obviously you try to assign certain keystrokes to actions in your game. As a general driver cannot "know" all KB layouts (and the corresponding return codes) I suggest to let the user define which keyboard hits should be assigned to these actions. I had seen this kind of &q...
- Jun 23, 2017 15:15
- Forum: Beginners
- Topic: Weird keypress bug in GFX?
- Replies: 14
- Views: 3121
Re: Weird keypress bug in GFX?
This IS complicated o_O. I want to thank you for doing this.TeeEmCee wrote:Looking closer, I see this is really complicated.
- Jun 23, 2017 14:36
- Forum: Beginners
- Topic: Weird keypress bug in GFX?
- Replies: 14
- Views: 3121
Re: Weird bug?
I've not actually put it in the game code, but I've initialised the same screen mode with the same settings and am using DirectX.TeeEmCee wrote:Could you check which driver is in use?
Code: Select all
' (Whatever 'screen' command) dim driver as string screeninfo , , , , , , driver ?driver
- Jun 23, 2017 14:18
- Forum: Beginners
- Topic: Weird keypress bug in GFX?
- Replies: 14
- Views: 3121
Re: Weird bug?
There is surely a utility somewhere (I could provide one if needed) which prints out information about win32 keypress events as they occur. If you posted the output of that we could look at it and try to figure out why it's happening. I have used the software at delphiforfun.org and have found the ...
- Jun 23, 2017 14:09
- Forum: Beginners
- Topic: Weird keypress bug in GFX?
- Replies: 14
- Views: 3121
Re: Weird bug?
Are you using Windows? There is surely a utility somewhere (I could provide one if needed) which prints out information about win32 keypress events as they occur. If you posted the output of that we could look at it and try to figure out why it's happening. Yes, I am using Windows. I will look for ...
- Jun 16, 2017 6:30
- Forum: Beginners
- Topic: Weird keypress bug in GFX?
- Replies: 14
- Views: 3121
Re: Weird bug?
Thanks for your post. I was able to trigger the "hello!" event using both B and FN+F11. This is an image of the keyboard I am using (I don't think it's the exact model but it's close enough): https://images-na.ssl-images-amazon.com/images/I/41tOpUYZKHL.jpg In between the Alt Gr and Menu ke...
- Jun 15, 2017 16:18
- Forum: Beginners
- Topic: Weird keypress bug in GFX?
- Replies: 14
- Views: 3121
Weird keypress bug in GFX?
In the game I'm making, I've noticed a strange behaviour with my keyboard where if I hold the Function key and F11 (on my keyboard it turns up volume), it acts as a B key press in my game (I use FBGFX, multikey, and the scancodes). Is this a bug with the library or my game that I should look out for...
- Jun 06, 2017 20:09
- Forum: Game Dev
- Topic: Need help with 2d collision ASAP
- Replies: 58
- Views: 11751
Re: Need help with 2d collision ASAP
so many perspectives of collision code appear from a persons own take on it, its amazing the spin offs of code that come from them. There is SO much to learn no matter how much you know!!! and just looking at other peoples code you can learn so much!!! I posted a topic in this forum i believe almos...
- Jun 05, 2017 0:55
- Forum: Game Dev
- Topic: Need help with 2d collision ASAP
- Replies: 58
- Views: 11751
Re: Need help with 2d collision ASAP
Yes I'll give credit you too ;)!thesanman112 wrote:WHAT!!! Man oh man, it doesn't matter how hard you work you just cant satisfy some people...LOL!!!
- May 31, 2017 20:15
- Forum: Game Dev
- Topic: Need help with 2d collision ASAP
- Replies: 58
- Views: 11751
Re: Need help with 2d collision ASAP
First quick try I'd make: define them all as Long ... Thanks for the pointer: collision works as expected now! lol - hate those stupid 'little things' like datatypes that can give errors 'sometimes'... congrats on you finishing the routine! Yes, so do I! Thanks, I've given credit to you and BasicCo...
- May 31, 2017 16:53
- Forum: Game Dev
- Topic: Need help with 2d collision ASAP
- Replies: 58
- Views: 11751
Re: Need help with 2d collision ASAP
EDIT: also forgot to mention, one of my ideas involves the fact that the X and Y values are LONGS, while the WIDTH and HEIGHT values are UNSIGNED LONGS. Could this have something to do with it? First quick try I'd make: define them all as Long ... Thanks for the pointer: collision works as expected...
- May 31, 2017 15:14
- Forum: Game Dev
- Topic: Need help with 2d collision ASAP
- Replies: 58
- Views: 11751
Re: Need help with 2d collision ASAP
Hi all, just thought I'd give an update on the collision situation. Thanks to you guys, collision works perfect! With quite a lot of angle measurements, and changing of moving states upon different directions of collision, characters can now land on things, get damaged, bump their heads! Even those ...
- May 31, 2017 9:40
- Forum: Community Discussion
- Topic: How should I teach Computer Programming?
- Replies: 10
- Views: 2355
Re: How should I teach Computer Programming?
Thanks for the help so far! I'll look over each post on this thread as I begin to structure my tutorials. If I were to learn Python, I definitely wouldn't MOVE to Python, buts that's just a personal thing ;D! I'll look at the link you provided (BasicCoder2). And thanks David for your input!