HeroSquare Adventures 0.91 - Dungeon!
Re: HeroSquare Adventures (Project Z) 0.05
New version again, see first post for changes
Re: HeroSquare Adventures (Project Z) 0.058
I'm looking forward to seeing how this project ends up. It has a good atmosphere to it, one that's as strange as it is original.
But I agree that the layering of things could be altered a little.
Edit: I really love how abstract the map is.
But I agree that the layering of things could be altered a little.
Edit: I really love how abstract the map is.
- arquivista
- No longer with us
- Posts: 266
- Joined: Tue Jul 06, 2010 8:39 am
- Location: Insert Geolocation tag here
- Contact:
Re: HeroSquare Adventures (Project Z) 0.058
I believe that the project will end soon if the author don't stop be greedy! play or test it with only 3hp? right! after before having 100hp mobs playing still is synonym of fast death!Luca wrote:I'm looking forward to seeing how this project ends up.
Anyway this time the changes were probably more cosmetical (didn't noticed much new than get the sword) than functional changes. I found the same related problems and real code problems as some "blocky" layered objects appear/dispappear out of time still there. Keep working on this GNX, still a lot to do.
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
Re: HeroSquare Adventures (Project Z) 0.058
We should make a mod for it where you get more HP and better swords. Perhaps levels and experience? I might make it!
Re: HeroSquare Adventures 0.065 - swords, fire, powerups!
bump, probably the biggest content-update so far
Re: HeroSquare Adventures 0.065 - swords, fire, powerups!
For the drawing order, you may want to have a look at this snippet, based on this lib.
You'd have to adapt it in the following way: sort the sprites by y coordinates rather than z. You could use a z parameter to determine how far from the ground a flying object is, ie it's displayed y would be y+z, but, from a drawing priority view point, it would be located at y.
You could (should?) also adapt the library itself to
* quickly skip the initial hidden sprites by adapting the __index() function to be based on the y values rather than on the list index as it is now.
* iterate from a given node instead of starting from the head of the list (see iter()) .
You'd have to adapt it in the following way: sort the sprites by y coordinates rather than z. You could use a z parameter to determine how far from the ground a flying object is, ie it's displayed y would be y+z, but, from a drawing priority view point, it would be located at y.
You could (should?) also adapt the library itself to
* quickly skip the initial hidden sprites by adapting the __index() function to be based on the y values rather than on the list index as it is now.
* iterate from a given node instead of starting from the head of the list (see iter()) .
Hermaphroditism is not a crime. -- LSB Superstar
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: HeroSquare Adventures 0.065 - swords, fire, powerups!
... he doesn't have that many elements to draw (20-30) so I'd go with something simpler: sorting all elements on every frame. Maybe it's less efficient, but it's just 6 LOC.pygy wrote:For the drawing order, you may want to have a look at this snippet, based on this lib.
When I write def I mean function.
Re: HeroSquare Adventures 0.065 - swords, fire, powerups!
kikito wrote:... he doesn't have that many elements to draw (20-30) so I'd go with something simpler: sorting all elements on every frame. Maybe it's less efficient, but it's just 6 LOC.pygy wrote:For the drawing order, you may want to have a look at this snippet, based on this lib.
I think this is exactly what I need
The only problems after z-ordering are certain situations where faux perspective strains the visual coherency (where the drawing order depends on the relative y-values of the objects). I could write code for that too, but I'm not sure it would be worthwhile performance-wise.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: HeroSquare Adventures 0.065 - swords, fire, powerups!
You mean this?Gnx wrote: ... where the drawing order depends on the relative y-values of the objects). I could write code for that too, but I'm not sure it would be worthwhile performance-wise.
Code: Select all
-- used for sorting. This function returns true if entity1 should be drawn 'before/behind' entity2
function sortByYZ(entity1, entity2)
if entity1.y < entity2.y then return true end -- first sort by y
return entity1.z < entity2.z -- then sort by z
end
function love.draw()
table.sort(entities, sortByYZ)
for _,entity in ipairs(entities) do
-- draw each entity
end
end
When I write def I mean function.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: HeroSquare Adventures 0.065 - swords, fire, powerups!
I think this doesn't do what you think it does. If entity1.y > entity2.y, it sorts by z rather than y. I think this would work better:kikito wrote:Code: Select all
-- used for sorting. This function returns true if entity1 should be drawn 'before/behind' entity2 function sortByYZ(entity1, entity2) if entity1.y < entity2.y then return true end -- first sort by y return entity1.z < entity2.z -- then sort by z end function love.draw() table.sort(entities, sortByYZ) for _,entity in ipairs(entities) do -- draw each entity end end
Code: Select all
function sortByYZ(entity1, entity2)
if entity1.y ~= entity2.y then
return entity1.y < entity2.y -- first sort by y
else
return entity1.z < entity2.z -- then sort by z
end
end
Help us help you: attach a .love.
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests