Search found 234 matches

by Beelz
Sun Oct 11, 2015 12:41 am
Forum: Support and Development
Topic: Love2D Tiled Maps Loading Incorrectly
Replies: 7
Views: 2479

Re: Love2D Tiled Maps Loading Incorrectly

I would try using a table like: mapTable = {} function LoadMap(map) local line = love.filesystem.lines(map) for i=1,#line do mapTable.row[i] = {} for j = 1, line:len() do mapTable.row[i].column[j] = {} table.insert(mapTable.row[i].column[j],string.sub(line, j, j)) -- i = each line // j = each char e...
by Beelz
Sat Oct 10, 2015 12:54 am
Forum: Support and Development
Topic: Realistic space flight
Replies: 11
Views: 4544

Re: Realistic space flight

The only thing you do is invert the trig functions:

Code: Select all

if love.keyboard.isDown("s") then
		spaceship.velX = spaceship.velX + -math.sin(spaceship.direction) * spaceship.acceleration * dt
		spaceship.velY = spaceship.velY + -math.cos(spaceship.direction) * -spaceship.acceleration * dt
	end
by Beelz
Sat Oct 10, 2015 12:39 am
Forum: Support and Development
Topic: BUMP related Qs
Replies: 4
Views: 1748

Re: BUMP related Qs

Hmm I never really thought of it like that, but those are great tips! Thanks I'll have to remember that and I gotta take a look at HC.
by Beelz
Fri Oct 09, 2015 7:15 pm
Forum: Support and Development
Topic: Realistic space flight
Replies: 11
Views: 4544

Re: Realistic space flight

Instead of forcing the ship to go whichever direction it's pointed you should have it follow whatever velocity it has gathered regardless of direction. Try this in your update function, adjust accordingly: function love.update(dt) --turn CCW if love.keyboard.isDown("a") then spaceship.dire...
by Beelz
Fri Oct 09, 2015 6:50 pm
Forum: Support and Development
Topic: BUMP related Qs
Replies: 4
Views: 1748

Re: BUMP related Qs

Hmm good idea... I think the only problem will be collisions. Say I rotate the image, the collision bounds wouldn't change so it will overlap another object before it actually collides. I could probably adjust the bounding box's size in real time according to the rotation, but then it could collide ...
by Beelz
Thu Oct 08, 2015 8:55 pm
Forum: Support and Development
Topic: BUMP related Qs
Replies: 4
Views: 1748

BUMP related Qs

I have two questions:

1. Is it possible to rotate the rectangles with the BUMP library? (or in LOVE at all for that matter)
2. Does BUMP handle images?

I feel the answer to both questions is no, but I figured it was worth a shot seeing if anyone else knew.
by Beelz
Thu Oct 08, 2015 3:19 am
Forum: Support and Development
Topic: Lua-enet, Which Ip to put in.
Replies: 7
Views: 3717

Re: Lua-enet, Which Ip to put in.

But being in the update function means you are trying to restart the server every update... That's probably why it isn't working.

To find your internal IP open the start menu and type "cmd.exe". When that opens type "ipconfig". Your internal IP is the IPv4 Address.
by Beelz
Thu Oct 08, 2015 2:55 am
Forum: Support and Development
Topic: Lua-enet, Which Ip to put in.
Replies: 7
Views: 3717

Re: Lua-enet, Which Ip to put in.

I see... I was thinking, I'm not sure this will even work with Love2d because you would need to put a "while true" loop in the update function to keep the server listening, freezing up the rest of the program.
by Beelz
Thu Oct 08, 2015 2:34 am
Forum: Support and Development
Topic: Lua-enet, Which Ip to put in.
Replies: 7
Views: 3717

Re: Lua-enet, Which Ip to put in.

Honestly I've never used eNet so I'm not familiar with its implementation. Looking into the documentation I see: int enet_host_service ( ENetHost * host, ENetEvent * event, enet_uint32 timeout ) You seem to be missing a required variable local event = host:service(100) ------------------ EDIT I also...
by Beelz
Thu Oct 08, 2015 1:59 am
Forum: Support and Development
Topic: Lua-enet, Which Ip to put in.
Replies: 7
Views: 3717

Re: Lua-enet, Which Ip to put in.

If you setup your router to give your computer's MAC address a static IP, you'll only need to forward the port for that IP. If you don't know how to do that I would just open the port for the entire range: 192.168.0.0 - 192.168.0.255 You may be having issues by just having the wrong IP. For others t...