Search found 16 matches

by kuzika
Tue Mar 30, 2021 8:27 pm
Forum: Support and Development
Topic: Failed to position isometric cube using sti tiled object
Replies: 0
Views: 9426

Failed to position isometric cube using sti tiled object

I am trying to position a cube using an object layer named "POS" and an object named "START with simple tiled implementation (sti) This is how it looks like in game l2dscreenshot.PNG This is where I wanted it to be possitioned. isometric_sti_test.love I have attached my .love project ...
by kuzika
Thu Nov 19, 2020 3:48 pm
Forum: Support and Development
Topic: STI and Bump setup issues
Replies: 2
Views: 3679

STI and Bump setup issues

this is my code to initialize bump world by using STI map function love.load() require 'conf'; require 'vars'; bump = require 'maps/bump'; loc= require("maps/lv1") local sti = require "maps" world = bump.newWorld(16) test = love.audio.newSource("audio/03 Towering Chieftain.m...
by kuzika
Wed May 20, 2020 7:43 pm
Forum: Support and Development
Topic: [SOLVED]2D polygon collision detection cant index table vertices
Replies: 2
Views: 3025

Re: 2D polygon collision detection cant index table vertices

Thanks, it now works perfect. I also cleaned up the if statement so its exactly the same as the original one in C++. Below is the clean code of the polyPoint now working with LOVE2D. function polyPoint(vertices,px,py) local collision = false local next = 1 for current = 1, #vertices do next = curren...
by kuzika
Wed May 20, 2020 4:44 pm
Forum: Support and Development
Topic: [SOLVED]2D polygon collision detection cant index table vertices
Replies: 2
Views: 3025

[SOLVED]2D polygon collision detection cant index table vertices

I'm getting this simple error but I have no idea why lua is not indexing the table... Error main.lua:104: attempt to index local 'vn' (a nil value) Traceback main.lua:104: in function 'polyPoint' main.lua:41: in function 'update' [C]: in function 'xpcall' This is the table with the vertices for a po...
by kuzika
Fri May 08, 2020 9:06 pm
Forum: Support and Development
Topic: [SOLVED] adnzzzzZ windfield collision classes confusion
Replies: 11
Views: 9464

Re: [SOLVED] adnzzzzZ windfield collision classes confusion

I now have a worldstate.lua that contains the world enter and exit functions, this is required in main love.load() under everything else. The player.lua simply checks the player.state itself. All the collision checks will be handled in worldstate.lua from now on and nowhere else as the world updates...
by kuzika
Fri May 08, 2020 3:02 pm
Forum: Support and Development
Topic: [SOLVED] adnzzzzZ windfield collision classes confusion
Replies: 11
Views: 9464

Re: [SOLVED] adnzzzzZ windfield collision classes confusion

Is this better? I used myWorld instead of the player collider to check setEnter and setExit. I think this is what you meant right? function player_state() myWorld:setEnter(function(s1,s2,c,i) if s2:getClass() == "ObjectA" and (p.player.vx > 0 or p.player.vy > 0) then p.player.state = "...
by kuzika
Thu May 07, 2020 4:01 pm
Forum: Support and Development
Topic: [SOLVED] adnzzzzZ windfield collision classes confusion
Replies: 11
Views: 9464

Re: [SOLVED] adnzzzzZ windfield collision classes confusion

pushstuff5.png Thanks this is what worked for me. player.lua 103 --outside update function player_state() p.player.collider:setEnter(function(s1,s2,c,i) if s2:getClass() == "ObjectA" and (p.player.vx > 0 or p.player.vy > 0) then p.player.state = "pushing" end end) p.player.colli...
by kuzika
Wed May 06, 2020 2:24 pm
Forum: Support and Development
Topic: [SOLVED] adnzzzzZ windfield collision classes confusion
Replies: 11
Views: 9464

Re: [SOLVED] adnzzzzZ windfield collision classes confusion

Hmmm, I think I prefer it with Postsolve since as you said it is called when 2 colliders are in contact and after the physics is applied. --control player state self.player.collider:setPostsolve(function(s1,s2) if s2:getClass() == "ObjectA" then self.player.state = "pushing" end ...
by kuzika
Wed May 06, 2020 6:58 am
Forum: Support and Development
Topic: [SOLVED] adnzzzzZ windfield collision classes confusion
Replies: 11
Views: 9464

Re: adnzzzzZ windfield collision classes confusion

When I tried the windfield library I believe I also had some problems with the stay function, maybe it's a bug ? I also made a box2d wrapper if you want to try it out (https://github.com/4v0v/physics). Great, I’ll implement your library and get back to you if there any problems. Thanks a lot. -----...
by kuzika
Wed May 06, 2020 6:51 am
Forum: Libraries and Tools
Topic: deleted
Replies: 3
Views: 8178

Re: ToyBox - A Simple List Inventory System

Awesome, I’m downloading this.