Search found 1911 matches

by ivan
Sun May 05, 2013 9:20 pm
Forum: General
Topic: Elegantly coded entity behaviour
Replies: 6
Views: 4672

Re: Elegantly coded entity behaviour

Kind of explicitly said so. In my first sentence. :awesome: Oops sorry I must have missed it. I find that interesting (if not terribly surprising). Is there much to it beyond the couple syntactical details you pointed out? Sure. I think understanding tables is crucial because the table is the only ...
by ivan
Sun May 05, 2013 7:14 pm
Forum: General
Topic: Elegantly coded entity behaviour
Replies: 6
Views: 4672

Re: Elegantly coded entity behaviour

Hi! I assume you are programming a platformer game. I don't consider myself a Lua "expert" but I've been programming for a few years so I can tell that you're coming from another language by looking at your code. There are two things I would like to point out: Firstly, your code is very st...
by ivan
Thu May 02, 2013 4:21 am
Forum: General
Topic: [Solved] - Beginner - Collision detection with tiles
Replies: 6
Views: 4708

Re: - Beginner - Collision detection with tiles

This is a very common question on the forums. Ok, so you wanna program your own collision system. The classic way to handle collisions for action games (action RPGs in your case) is 2 steps. I'll use (simplified) code examples from a lib that I worked on called FizzX . 1.Detection detect if the movi...
by ivan
Wed May 01, 2013 6:22 pm
Forum: General
Topic: AGen
Replies: 58
Views: 37703

Re: AGen

Hey everybody this is not Love2D-related but I hope the mods won't be too upset. We have a Linux build of the engine, but before we can release it, we need some feedback from Linux gamers. There is an experimental Linux build of one of our games: http://2dengine.com/commando/8Bit_Commando_Demo_i386....
by ivan
Tue Dec 11, 2012 5:04 pm
Forum: Support and Development
Topic: Check if player is touching
Replies: 3
Views: 2483

Re: Check if player is touching

I assume you are talking about Box2D.
There are several ways to do this.
One approach is setting a contact/collision callback and buffering the collision data you get from there.
by ivan
Tue Dec 11, 2012 9:23 am
Forum: Support and Development
Topic: Some pointers wanted regarding user created content
Replies: 11
Views: 6058

Re: Some pointers wanted regarding user created content

One alternative is to scan the script files periodically and re-load them while running the game.
This way you can edit the script files from outside using Notepad++ or whatever and see the changes in-game.
by ivan
Mon Dec 10, 2012 8:46 am
Forum: Support and Development
Topic: Can we make a vector Shadow Caster?
Replies: 2
Views: 3250

Re: Can we make a vector Shadow Caster?

Hey, there are demos on here that show you how to program something like this.
I don't think Box2D's raycasting could be useful in this particular case.
It depends on how complicated you want to make this but usually you can create nice-looking shadow effects using just math.
by ivan
Sun Dec 09, 2012 5:28 pm
Forum: Libraries and Tools
Topic: Fizz X
Replies: 85
Views: 62576

Re: Fizz X

I don't think lines should be used that way. A line is something without dimensions. The real-life equivalent would be a gamma ray or tachyon emission; they go through matter with very rare interactions, and when those occur the result is not movement. You're right, lines don't have an area or volu...
by ivan
Sun Dec 09, 2012 4:18 pm
Forum: Libraries and Tools
Topic: Fizz X
Replies: 85
Views: 62576

Re: Fizz X

You should read it again. The algorithm in fact calculates the magnitude (t0 and t1). Yes, I noticed that you find the intersection points between the line and the AABB. My question is, how would separate the AABB so they are no longer intersecting (assuming the line is static)? The idea in FizzX w...
by ivan
Sun Dec 09, 2012 1:04 pm
Forum: Libraries and Tools
Topic: Fizz X
Replies: 85
Views: 62576

Re: Fizz X

You dont calculate directly the penetration you need the point where both the line and the block crosses, once you have this you calculate the distance between two points, one is the start (or end, depends on wich side is inside the rectangle) and that point thats your penetration. The difficult ta...