Search found 1911 matches
- Sun Feb 05, 2012 6:08 am
- Forum: Libraries and Tools
- Topic: Fizz X
- Replies: 85
- Views: 62506
Re: Fizz X
Hi Taehl, where you the person who originally wrote Fizz? Based on that demo, the platform-movement mechanics are all... Bizarre would be a nice term for it. The air control is not what platformer players would expect. And you can fly instead of jumping. Yes, the WASD keys simply set a new velocity ...
- Sat Feb 04, 2012 6:31 am
- Forum: Libraries and Tools
- Topic: Fizz X
- Replies: 85
- Views: 62506
Fizz X
Hi everybody, this is my small contribution to the Love2D community: a modified version of the collision detection lib Fizz. Lib : FizzX Licence : MIT License Description : Fizz is a lightweight collision library in Lua. Fizz is designed specifically for old-school platformers and overhead action ga...
- Fri Feb 03, 2012 5:23 pm
- Forum: Support and Development
- Topic: Clamp Rotating Object
- Replies: 2
- Views: 2374
Re: Clamp Rotating Object
Are you using the physics plugin? I'm pretty sure bounding boxes in Box2D are axis aligned. If you are using Box2D, a simpler solution might be to put some static rectangles to border off your playarea. In case you are handling your own collisions: heroWidth = math.sqrt(math.pow(dxW,2) + math.pow(dy...
- Thu Feb 02, 2012 3:07 pm
- Forum: Support and Development
- Topic: Collision Detection
- Replies: 4
- Views: 2422
Re: Collision Detection
Collision detection can be a very complicated problem. First, you need to identify the scope of your collision system: Do you just need to detect if 2 shapes intersect (which is fairly easy) or do you want to have collision response as well (at this point you may need to program an entire physics en...
- Wed Feb 01, 2012 10:24 pm
- Forum: Support and Development
- Topic: Simple enemy AI
- Replies: 6
- Views: 2169
Re: Simple enemy AI
Hi! Hope you don't mind but I made a small modification to your code (see attachment)
- Wed Feb 01, 2012 6:08 am
- Forum: Support and Development
- Topic: Friction From Scratch
- Replies: 15
- Views: 8276
Re: Friction From Scratch
If I remember correctly, n*n is faster than n^2 which is faster than math.pow(n, 2). Can anyone confirm this please? Haven't tested this but sounds about right. Hey, the reason I'm taking the old length is so you don't have to compute the length more than once. It's a bit funny that you are arguing...
- Tue Jan 31, 2012 3:37 pm
- Forum: Support and Development
- Topic: Friction From Scratch
- Replies: 15
- Views: 8276
Re: Friction From Scratch
Hi again. The code looks better although I still think it's way more complicated than it needs to be. For example: function vlength(x,y) x = math.abs(x) y = math.abs(y) if x ~= 0 and y ~= 0 then return math.sqrt(x^2 + y^2) else return x+y end end Could be simplified to: function vlength(x, y) return...
- Mon Jan 30, 2012 9:32 pm
- Forum: Support and Development
- Topic: Friction From Scratch
- Replies: 15
- Views: 8276
Re: Friction From Scratch
Hi. I have to admit that I don't fully understand your code. However I do have some suggestions: xspeed = math.clamp(xspeed + speed[1] * accel, -maxspeed, maxspeed) yspeed = math.clamp(yspeed + speed[2] * accel, -maxspeed, maxspeed) You are clamping a vector along the two axes seperately. This might...
- Sun Jan 29, 2012 11:42 am
- Forum: General
- Topic: When does "scripting" become "programming"?
- Replies: 36
- Views: 13116
Re: When does "scripting" become "programming"?
I would say so, although it should be mentioned that there were attempts to make processors that run Java code natively.nevon wrote:Going by that distinction, wouldn't Java be scripting, since it's run in the JVM?
- Sun Jan 29, 2012 7:58 am
- Forum: Support and Development
- Topic: Help Making a Word table/list
- Replies: 5
- Views: 2292
Re: Help Making a Word table/list
Hey, I remember the Red Button game from way back. Anyway, try replacing the bottom of your code with something like: responses = { "*Ahem* Do NOT push", "I said don't do it!", "Noo!" } current = 1 text = responses[current] function love.mousepressed(x, y, button) if bu...