Check if your display is set as your primary screen. LOVE could be starting on the primary monitor, which is set to your HDMI output and so doesn't show up on your main display,Jarodeno93 wrote:I've been playing a game that uses love2d and it was running fine until recently. Now the game can only run when my laptop is plugged into my tv through an hdmi cable. Without it double clicking on the .exe/trying to run it results in nothing happening. Any idea on what could cause this and how to fix this?
"Questions that don't deserve their own thread" thread
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: "Questions that don't deserve their own thread" thread
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: "Questions that don't deserve their own thread" thread
Can someone make me a function that posts to a PHP script and returns the result?
I have this that I found on a Lua forum, but I can't get it working.
I have this that I found on a Lua forum, but I can't get it working.
Code: Select all
local http = require "socket.http"
local ltn12 = require "ltn12"
function postForm(url, body)
local sink, responseData = ltn12.sink.table()
local responseCode, statusCode, headers, statusLine = http.request {
url = url,
method = "POST",
headers = {
["Content-Type"] = "application/x-www-form-urlencoded",
["Content-Length"] = #body -- this header might not be necessary
},
source = ltn12.source.string(body),
sink = sink
}
return table.concat(responseData), responseCode
end
Re: "Questions that don't deserve their own thread" thread
Works for me.
PHP:
Lua (added after your code):
Output:
PHP:
Code: Select all
<?php
foreach ($_POST as $k => $v)
{
echo "$k = $v\n";
}
Code: Select all
local s = postForm('http://www.formauri.es/personal/pgimeno/temp/ping.php',
'data1=first&data2=second')
print(s)
function love.draw()
love.graphics.printf(s, 0, 0, 800)
end
Code: Select all
data1 = first
data2 = second
Re: "Questions that don't deserve their own thread" thread
Ah, I must have been doing it wrong xD
Re: "Questions that don't deserve their own thread" thread
Is the data passed to [wiki]love.image.newImageData[/wiki](w, h, data) always RGBA pixels, left-to-right, top-to-bottom? If not, how do I find what data does it expect?
Re: "Questions that don't deserve their own thread" thread
Hey guys, any chance you could explain to me what the z and w values of the vec4 vertex_position in the vertex shader are for and if there is any way i can utilise them? Working on a small-scale 3d thing for a project (switching between 2d topdown and 3d in realtime), and I believe I can implement it in pure Love2D quite efficiently. cheers.
Re: "Questions that don't deserve their own thread" thread
So i'm doing some basic drawing for a little project i'm working on, and in the draw function i'm drawing rectangles and text and then drawing an image. When I draw the sprite, it is being filled by the color I last set to draw with. Looking at the documentation it seems that there used to be a function "setColorMode" I could use in order to set the way images (sprites) were affected by "setColor" but it was removed for 9.0 and I can't figure out how to do it now!
Help!
Help!
Re: "Questions that don't deserve their own thread" thread
why can't you use tables as values for setColor? lets say I make a variable called r and in setColor I do
whatever I set r to produces the result you would think, but lets say i make a table called colors and do something like
why doesnt this work? the error says its expecting an integer and its getting a nil value, I'm just curious why I can't use tables.
Code: Select all
love.graphics.setColor(r, 255,255)
Code: Select all
colors = {}
colors.r = 255
colors.g = 255
colors.b = 255
love.graphics.setColor(colors.r, colors.g, colors.b)
Re: "Questions that don't deserve their own thread" thread
You can use tables. Theres probably something wrong with your code.Vimm wrote:-snip-
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest