What's everyone working on? (tigsource inspired)

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: What's everyone working on? (tigsource inspired)

Post by Davidobot »

Tjakka5 wrote:
Positive07 wrote:
Tjakka5 wrote:-snip-
I totally need a library out of this!
Huh, I didn't think people would be interested in using this.
I'll work out a few more kinks, and try get a release-able version out soon.
Oh hell yeah we're interested. Does it have better performance than the 3D viewer released on the Projects and Demos subforum?
How does the z-sorting work, in terms of accounting for different heights and such?
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
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Re: What's everyone working on? (tigsource inspired)

Post by Tjakka5 »

Davidobot wrote: Oh hell yeah we're interested. Does it have better performance than the 3D viewer released on the Projects and Demos subforum?
How does the z-sorting work, in terms of accounting for different heights and such?
Quick disclaimer, the whole process it pretty slow, I can render about 1200 models before things start to hit about 60 fps on my decent laptop.

The 3D viewer seems to use a system very similair to mine: The model's texture is a spritebatch, you generate the quads, and render it accordingly. The only difference is that my system only re-renders when it has so. (When either the camera or model rotation change.)

The z-sorting is done according to a 'Depth-score', which is calculated with the following line of code:

Code: Select all

return x * ximportance + y * yimportance + z
(Where z is height)

ximportance and yimportance are numbers between -1 and 1, these values are determined by the camera rotation.

Originally z-sorting was done with table.sort, but I've written a algorithm that works like lists (http://lovefiddle.com/zRbrTvMapCshjCxym) that sorts it a lot faster.

All in all, the system is quite limited, you can't really overlap models, creating art for it is really hard, particles will be very hard to implement, but the end result is very unique.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: What's everyone working on? (tigsource inspired)

Post by Jasoco »

I spent all day working on an animation for opening chests. It just draws an open chest and a lid and scales the lid from 1 to -1 when opened and when it reaches less than 0 it switches to a second image of the inside of the lid instead.

Image

All without having to use if/then to switch the images thanks to my favorite Lua trick: output = something == value and result or other result.

quad = self.quad[self.openScaleAnimation > 0 and 2 or 3][self.color] (Returns 2 if the animation value is >= 0 or 3 if less than 0. With quad 2 being the lid and quad 3 being the inside of the lid. Quad 1 of course being the chest itself.)
scale y = self.openScaleAnimation

Not 100% sure on the vanishing aspect though. Should the lid remain? Or should it disappear? I'd also like to play with a neat "lid flying off violently" animation. I dunno. Keeping the lid on looks nice but may just get in the way visually later on.
Fuzzlix
Citizen
Posts: 60
Joined: Thu Oct 13, 2016 5:36 pm

Re: What's everyone working on? (tigsource inspired)

Post by Fuzzlix »

Jasoco wrote: Not 100% sure on the vanishing aspect though. Should the lid remain? Or should it disappear? I'd also like to play with a neat "lid flying off violently" animation. I dunno. Keeping the lid on looks nice but may just get in the way visually later on.
Looks good already until the lid reaches its highest point. Imagine how it would look, when keep turning the lid past its highes point and turning the lid behind the box.
User avatar
Alexar
Party member
Posts: 174
Joined: Thu Feb 05, 2015 1:57 am
Location: Chengdu,China

Re: What's everyone working on? (tigsource inspired)

Post by Alexar »

Tjakka5 wrote:I'll work out a few more kinks, and try get a release-able version out soon.
great work, we love it ~ if there would be a lib for 3d collision :awesome:
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Re: What's everyone working on? (tigsource inspired)

Post by Tjakka5 »

Alexar wrote:
Tjakka5 wrote:I'll work out a few more kinks, and try get a release-able version out soon.
great work, we love it ~ if there would be a lib for 3d collision :awesome:
I found HC to work pretty well for it, you don't really need collision in 3d, since rendering gets a bit wonky when objects are above/under each other.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: What's everyone working on? (tigsource inspired)

Post by Jasoco »

Fuzzlix wrote:
Jasoco wrote: Not 100% sure on the vanishing aspect though. Should the lid remain? Or should it disappear? I'd also like to play with a neat "lid flying off violently" animation. I dunno. Keeping the lid on looks nice but may just get in the way visually later on.
Looks good already until the lid reaches its highest point. Imagine how it would look, when keep turning the lid past its highes point and turning the lid behind the box.
Just experimented with it and it looks really bad sadly. Like not natural at all.

I am however experimenting with an elastic effect where the lid swings up and down after opening. Then vanishes. Looks neat so far. But now I have to go to work.
Remixful
Prole
Posts: 6
Joined: Sun Jun 12, 2016 11:16 am

Re: What's everyone working on? (tigsource inspired)

Post by Remixful »

I started to create my own library that's heavily influenced by GLua.

So far, I've implemented a hook library, timer library and a few other useful things. I'll be working on a net library using lua-enet in the future as well.

Here's some example code in main.lua:

Code: Select all

-- require stuff

local function createsometimer()
	timer.Simple(2.5,function() print"2.5 seconds have passed since load" end) 
	return false -- returning false overrides love.load - meaning this and other hooks will get called instead
end

hook.Add("load", "test", createsometimer)

-- As you might've guessed, a timer gets created at love.load and when 2.5 seconds have passed a message is printed.

hook.Add("keypressed", "test", function(key) if key == "escape" then love.event.quit() end end)
hook.Add("keypressed", "test", function(key) if key == "escape" then print("nope!") end end)
-- pressing escape prints "nope!"

-- Some more stuff with hooks and timers
hook.Add("update", "test", function(dt)
	print(dt)
	if not timer.Exists("remove_updatehook") then
		timer.Create("remove_updatehook", 5, 1, function() hook.Remove("update", "test") print"bye bye update hook!" end) 
	end
end)
-- Prints delta-time every frame for 5 seconds 

--PrintTable function
function myloadfunction()
	local myTable = {4,5,6, FirstTable = {hello = world, {tableception = {true}}}}
	PrintTable(myTable)
end

hook.Add("load", "test2", myloadfunction)

--[[
Output:
[1] number:4
[2] number:5
[3] number:6
["FirstTable"] table:
	[1] table:
		["tableception"] table:
			[1] boolean:true
]]
User avatar
megalukes
Citizen
Posts: 94
Joined: Fri Jun 27, 2014 11:29 pm
Location: Brazil

Re: What's everyone working on? (tigsource inspired)

Post by megalukes »

I decided to revive an old project of mine. I was developing it in RPG Maker but after a while its limitations made me stop. It's been tough work in Love. I'm not using an editor (apart from Tiled for maps), so everything is way harder than before. I almost finished the message system so I made a gif to celebrate.
text test.gif
text test.gif (176.76 KiB) Viewed 3458 times
Scalling was hell because it was impossible for me to find a center for a lot of objects at the same time. I had to push/translate/pop a lot. Scissor was weird to configure too, for some reason. But everything is working smoothly at the moment. I'll try to post more here.
User avatar
D0NM
Party member
Posts: 250
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

Re: What's everyone working on? (tigsource inspired)

Post by D0NM »

megalukes wrote:Scalling was hell because it was impossible for me to find a center for a lot of objects at the same time. I had to push/translate/pop a lot. Scissor was weird to configure too, for some reason. But everything is working smoothly at the moment. I'll try to post more here.
Nice work. Tons of pus/translate/pop is fine for a retro jRPG-like game. Keep it up )))
Now your message windows look way better than RPG Maker's defaults.
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:
Post Reply

Who is online

Users browsing this forum: No registered users and 91 guests