The epic love demo thread!

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Re: The epic love demo thread!

Post by qubodup »

MHD wrote:A little thing I am working on atm...
Fuuuun! :D
a.png
a.png (21.37 KiB) Viewed 4971 times
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: The epic love demo thread!

Post by Kaze »

MHD wrote:A little thing I am working on atm...
This is fun :P

I made wheels~ :o
Image
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: The epic love demo thread!

Post by rude »

Awesome. Did you implement a convex-polygon algorithm?
User avatar
MHD
Prole
Posts: 18
Joined: Fri Nov 14, 2008 11:45 pm
Location: Denmark

Re: The epic love demo thread!

Post by MHD »

No, it is still only beta :?
I r awsum at looah ^^
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Re: The epic love demo thread!

Post by qubodup »

MHD wrote:No, it is still only beta :?
Hm. It's all fun and fine but then gravity comes and destroys all. ALL.
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Re: The epic love demo thread!

Post by qubodup »

I prettied Shapes.love a bit using color and sounds. Now it's SuperShapes.love
Image
PS: something to read if you have nothing better to do :)
Attachments
SuperShapes.love
(20.63 KiB) Downloaded 226 times
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Life of Land Shark

Post by qubodup »

Hello, I'm a land shark! Image

Someone made a land shark life simulator (it's not that exciting really). It's called "Life of Land Shark"

Download LOLS 1.0 here

Or browse the source files here
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
User avatar
mikembley
Citizen
Posts: 72
Joined: Wed Dec 17, 2008 5:30 pm
Location: Blackburn, UK
Contact:

Re: The epic love demo thread!

Post by mikembley »

om nom nom nom! Image

LÖVE it!
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Life of Land Shark

Post by bartbes »

qubodup wrote:(it's not that exciting really)
There isn't even something to eat?
User avatar
Xcmd
Party member
Posts: 211
Joined: Fri Feb 13, 2009 10:45 pm

Re: The epic love demo thread!

Post by Xcmd »

This is just some code for making a thing go where the mouse clicked. It's not perfect (if you use anything other than 1 to iterate the movement, it gets all wobbly and jiggly and it goes poorly for us all). It also doesn't go DIRECTLY to where the mouse clicked. It actually goes along the shortest axis first, then goes along the rest. So if you've clicked at 50, 60 and the circle is at 0,0, then it's going to go to the X (50), first, then complete the Y (although it'll have gone part of the way towards the Y, until it's on a 0 parity with the X--if that makes any sense).

Anyway, code:

Code: Select all

-- Move to Cursor Love
--
-- How to use: Click on the screen and the ball will move towards the
-- mouse's position.

function load()
	mousePressed = false
	gotoX = 0
	gotoY = 0
	playerBallX = 400
	playerBallY = 300
	speed = 5
end

function update(dt)
	if mousePressed == true then
		if playerBallX ~= gotoX then
			if playerBallX < gotoX then
				playerBallX = playerBallX + 1
			elseif playerBallX > gotoX then
				playerBallX = playerBallX - 1
			end
		end
		if  playerBallY ~=gotoY then
			if playerBallY < gotoY then
				playerBallY = playerBallY + 1
			elseif playerBallY > gotoY then
				playerBallY = playerBallY - 1
			end
		end
	else
		mousePressed = false
	end
end

function draw()
	love.graphics.circle(1, gotoX, gotoY, 5)
	love.graphics.circle(1, playerBallX, playerBallY, 20)
end

function mousereleased(x, y, button)
	if button == love.mouse_left then
		mousePressed = true
		gotoX = x
		gotoY = y
	end
end
Didn't bother .love-ing it because, well... I didn't feel like it. There are better ways to do this, but if you can't figure them out, or if the hiccups in this don't matter then here you go. The mousePressed code isn't really necessary, other than to keep the circle from moving towards 0,0 at the beginning when it's opened.
We don't borrow, we don't read, we don't rent, we don't lease, we take the minds!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 88 guests