Ah, of course, that makes perfect sense.
Thank you very much for pointing out my mistake.
Search found 43 matches
- Sun Oct 13, 2013 12:43 pm
- Forum: Support and Development
- Topic: Vector Rotation
- Replies: 3
- Views: 3100
- Sat Oct 12, 2013 5:14 pm
- Forum: Support and Development
- Topic: Vector Rotation
- Replies: 3
- Views: 3100
Vector Rotation
I'm trying to make my own vector module, and for the most part it works (as far as I know), but in trying to add rotation I'm getting unexpected results. I'm not 100% sure whether the results are right, and my expectations are wrong, or vice versa. I'm rotating a 3D vector by an angle 'a', and then ...
- Thu Sep 26, 2013 4:10 pm
- Forum: General
- Topic: Make an object appear on the other side of the screen
- Replies: 4
- Views: 2832
Re: Make an object appear on the other side of the screen
Alternatively, you could use the modulo (https://en.wikipedia.org/wiki/Modulo_operation) operator.
Code: Select all
x = x % love.graphics.getWidth()
- Wed Aug 28, 2013 9:54 am
- Forum: Support and Development
- Topic: table[key] when it's the actual table
- Replies: 5
- Views: 2425
table[key] when it's the actual table
So why can I do this: local b = true local t = { [true] = "1", [false] = "2" } print(t[b]) But not this: print( { [true] = "1", [false] = "2" }[true] ) I can replace the b with the value it holds, but I can't replace t with the value it holds? Is this just a f...
- Wed Jun 19, 2013 1:25 am
- Forum: Support and Development
- Topic: Angles (Visibilty Cones & Turning)
- Replies: 4
- Views: 1947
Re: Angles (Visibilty Cones & Turning)
That makes far too much sense.
Thanks for explaining it to me.
Thanks for explaining it to me.
- Tue Jun 18, 2013 2:24 pm
- Forum: Support and Development
- Topic: Angles (Visibilty Cones & Turning)
- Replies: 4
- Views: 1947
Re: Angles (Visibilty Cones & Turning)
So angles go from -pi/2 to pi/2, rather than 0 to 2*pi... Okay.
Thanks very much. It all seems to be working now.
Thanks very much. It all seems to be working now.
- Tue Jun 18, 2013 12:46 pm
- Forum: Support and Development
- Topic: Angles (Visibilty Cones & Turning)
- Replies: 4
- Views: 1947
Angles (Visibilty Cones & Turning)
So I was interested by Jimanzium 's idea about Sound Stealth . So I tried to implelemt something similar. Basically, the guards have a hearing range (shown by the blue circle when debugging) and a visibility cone (shown by the yellow cone when debugging). Thay have patrols which they're meant to fol...
- Fri Jan 04, 2013 11:07 pm
- Forum: General
- Topic: What's everyone working on? (tigsource inspired)
- Replies: 1791
- Views: 1503845
Re: What's everyone working on? (tigsource inspired)
I dunno if you ever played Fury3 (https://www.youtube.com/watch?v=6_8tSpXLuK8&t=1m0s), but how different d'you reckon the basic mechanics are to your starfox clone?
I'd completely forgotten about the existence of this game until I saw your screenshots.
I'd completely forgotten about the existence of this game until I saw your screenshots.
- Fri Jan 04, 2013 1:29 am
- Forum: General
- Topic: Programming got me confused in class!
- Replies: 8
- Views: 3984
Re: Programming got me confused in class!
I feel like I'm being stupid right now, but I don't get it. Velocity is the speed with direction Displacement is distance with direction. I don't get this bit: "in programming games there is ALWAYS velocity during movement". After all the movement, there is no movement. So there is no velo...
- Fri Oct 05, 2012 7:54 pm
- Forum: Support and Development
- Topic: I want to make my own gamestate library.
- Replies: 6
- Views: 3332
Re: I want to make my own gamestate library.
The way I do it is this: In another file, have your state: local state = {} state.__index = state function state.load() local this = {} setmetatable(this, state) -- this is the basic table that represents the state -- so initial values for properties of the state would be set here return this end fu...