This is the place for discussion and support for LunaLua and related modifications and libraries.
Moderator: Userbase Moderators
Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?
|
|
|
|
-
Hoeloe
- Phanto

- Posts: 1465
- Joined: Sat Oct 03, 2015 6:18 pm
- Flair: The Codehaus Girl
- Pronouns: she/her
Postby Hoeloe » Mon Apr 18, 2016 5:56 am
Quantumenace wrote:These look much better at the full 65 frames per second.
Looks pretty neat anyway! Looks like a fun element to a level.
It's cool to see what people are doing with Lua, I tend to just get a view of what's happening on development end, which is cool but mostly consists of test cases rather than actual content.
|
|
|
|
|
|
|
|
|
-
underFlo
- Wart

- Posts: 4456
- Joined: Mon Jul 14, 2014 10:44 am
- Flair: sup im lesbiab
- Pronouns: They/She
-
Contact:
Postby underFlo » Thu Apr 28, 2016 5:09 pm
So, I've been working on a cool animation system with rotation, pivots, scaling, parenting etc. it technically works (as in: it draws the sprites at the correct scale and rotation), however, position is kinda messed up, probably because I got something wrong when calculating a sprite's position through its parent's positions. Should be fixable though!
|
|
|
|
|
|
|
|
|
-
Hoeloe
- Phanto

- Posts: 1465
- Joined: Sat Oct 03, 2015 6:18 pm
- Flair: The Codehaus Girl
- Pronouns: she/her
Postby Hoeloe » Thu Apr 28, 2016 6:38 pm
Spinda wrote:probably because I got something wrong when calculating a sprite's position through its parent's positions.
I would urge you to use a transformation matrix for this calculation. It's a much neater system and allows arbitrary transformations (rotation, scale, position, etc.) to be passed down to child objects, regardless of how many parent transforms it's already using, in a very easy-to-manage way (you just multiply the matrices together). It's a very powerful system, and one that most game engines will use.
Vectr will do all the actual matrix maths for you, so all you'd need to do is define the matrices from the transforms you want. How to do that is readily available information on things like Wikipedia: https://en.wikipedia.org/wiki/Transform ... r_graphics
|
|
|
|
|
|
|
|
|
-
underFlo
- Wart

- Posts: 4456
- Joined: Mon Jul 14, 2014 10:44 am
- Flair: sup im lesbiab
- Pronouns: They/She
-
Contact:
Postby underFlo » Fri Apr 29, 2016 1:31 am
Hoeloe wrote:Spinda wrote:probably because I got something wrong when calculating a sprite's position through its parent's positions.
I would urge you to use a transformation matrix for this calculation. It's a much neater system and allows arbitrary transformations (rotation, scale, position, etc.) to be passed down to child objects, regardless of how many parent transforms it's already using, in a very easy-to-manage way (you just multiply the matrices together). It's a very powerful system, and one that most game engines will use.
So, the way to go would be...
1) Translate each of the vertices for an image in a way that the pivot point is at the origin
2) Apply scale
3) Apply rotation
4) Translate so the Pivot is now at the specified position
Would it make more sense to turn all of this into 1 matrix or just apply each of these matrices after each other?
Also, as for the position for a sprite with parents, that can't just be done by chaining the transformations, right? Since this involves anchor points on a sprite's parents which are what the sprite is located in relation to.
|
|
|
|
|
|
|
|
|
-
Hoeloe
- Phanto

- Posts: 1465
- Joined: Sat Oct 03, 2015 6:18 pm
- Flair: The Codehaus Girl
- Pronouns: she/her
Postby Hoeloe » Fri Apr 29, 2016 3:18 am
Spinda wrote:
Would it make more sense to turn all of this into 1 matrix or just apply each of these matrices after each other?
Absolutely by combining this into one matrix, but to do this all you have to do is multiple the matrices together in the reverse order from the one you want them to be applied.
Spinda wrote:
Also, as for the position for a sprite with parents, that can't just be done by chaining the transformations, right? Since this involves anchor points on a sprite's parents which are what the sprite is located in relation to.
Absolutely you can! This is the whole point! The position of a child object should be relative to its parent location, so if the position is set as "0,0", it will be on the parent's anchor point. This allows you to apply the parent transformation, which puts it on the parent's pivot, followed by the child transformation, which offsets it from that pivot. This is hugely powerful, as this also applies to scale and rotation if you set it up right, so rotating a parent would rotate all of the children too, and the child's rotation would be essentially added to the parent rotation.
One note though - you likely want to apply scale and rotation BEFORE you apply translation. These two transformations are most easily done with respect to the world origin, so applying them before applying the position means they will be correct to the object's pivot point.
|
|
|
|
|
|
|
|
|
-
underFlo
- Wart

- Posts: 4456
- Joined: Mon Jul 14, 2014 10:44 am
- Flair: sup im lesbiab
- Pronouns: They/She
-
Contact:
Postby underFlo » Fri Apr 29, 2016 3:32 pm
Got animation to work! It looks great imo.
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Sat May 14, 2016 10:03 pm
(Found out it's already been done)
Last edited by PixelPest on Tue May 17, 2016 6:02 pm, edited 1 time in total.
|
|
|
|
|
|
|
|
|
-
Nat The Porcupine
- Monty Mole

- Posts: 123
- Joined: Tue Nov 10, 2015 2:55 pm
Postby Nat The Porcupine » Wed May 18, 2016 8:53 pm
Sonic the Hedgehog maybe? I know Pyro wanted a playable Sonic in SMBX 2.0 & Toad is the fastest character after all. In your gif, Toad also seemed to charge up something, which I presume to be a spindash. That's my best guess anyway...
|
|
|
|
|
|
|
|
|
-
NoodlesButt
- Shy Guy

- Posts: 5
- Joined: Sun Oct 11, 2015 9:01 am
Postby NoodlesButt » Fri May 20, 2016 12:06 pm
Making a thwomp power-up, when the player presses down Mario shoots downwards like a Thwomp.
|
|
|
|
|
|
|
|
|
-
h2643
- Reznor

- Posts: 2890
- Joined: Sat Dec 21, 2013 7:23 am
-
Contact:
Postby h2643 » Fri May 20, 2016 12:31 pm
I think "Ground Pound" is a better name for it 
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9891
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Fri May 20, 2016 12:48 pm
Nat The Porcupine wrote:
Sonic the Hedgehog maybe? I know Pyro wanted a playable Sonic in SMBX 2.0 & Toad is the fastest character after all. In your gif, Toad also seemed to charge up something, which I presume to be a spindash. That's my best guess anyway...
http://i.imgur.com/zNPQs19.gifv
This one is a bit more advanced. I think it's possible to find out who it is if you know the character.
|
|
|
|
|
|
|
|
|
-
Enchlore
- Spike

- Posts: 272
- Joined: Thu May 08, 2014 3:40 pm
Postby Enchlore » Fri May 20, 2016 3:40 pm
NoodlesButt wrote:Making a thwomp power-up, when the player presses down Mario shoots downwards like a Thwomp.
Sometimes I press down while jumping to better avoid projectiles. Wouldn't it be better to have the player hold another key while pressing down to execute the ground pound?
|
|
|
|
|
|
|
|
|
-
NoodlesButt
- Shy Guy

- Posts: 5
- Joined: Sun Oct 11, 2015 9:01 am
Postby NoodlesButt » Sat May 21, 2016 8:58 am
Enchlore wrote:NoodlesButt wrote:Making a thwomp power-up, when the player presses down Mario shoots downwards like a Thwomp.
Sometimes I press down while jumping to better avoid projectiles. Wouldn't it be better to have the player hold another key while pressing down to execute the ground pound?
Good point, I'll probably change it to the tanooki button.
|
|
|
|
|
|
|
|
|
-
TDK
- Phanto

- Posts: 1440
- Joined: Wed Nov 11, 2015 12:26 pm
- Flair: Retired
Postby TDK » Wed May 25, 2016 10:44 am
|
|
|
|
|
|
|
|
|
-
Circle Guy
- Rocky Wrench

- Posts: 645
- Joined: Mon Jan 04, 2016 9:25 pm
Postby Circle Guy » Sat Jun 11, 2016 5:49 am
When are you releasing that?
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Thu Jun 16, 2016 9:54 pm
I'm working on updating my galaxyComets API. It will involve more comet missions and features, as well as a new HUD with the SMG life counter. Read more about it here: http://www.smbxgame.com/forums/v ... 63#p223263. Screenshots coming soon to a Screenshot Thread near you
|
|
|
|
|
|
|
|
|
-
MECHDRAGON777
- Pink Yoshi Egg

- Posts: 6422
- Joined: Fri Dec 20, 2013 6:40 pm
- Flair: Nuclear Queen of Reversion.
-
Contact:
Postby MECHDRAGON777 » Sun Jun 19, 2016 6:20 pm
A Way to have battle stages have a profile setting. (For when Online play comes into effect.) ...it would be more of a level and lua code, and not an API, but still. I think it would be helpful.
Edit, also, I am making a Contest level with some lua, but I o not know if that is "advanced or basic" coding.
|
|
|
|
|
|
|
|
|
-
Rixitic
- Spike

- Posts: 275
- Joined: Sat Dec 12, 2015 1:00 am
-
Contact:
Postby Rixitic » Tue Jun 21, 2016 2:08 am
Back to lua after a bit of a slump, finally finished up proportional fonts, tailed word bubbles and NPC tracking in textblox.
Currently auto-tracking and positioning only works through lua-generated Text Blocks, but I'm gonna see if I can get the library to keep track of which NPC initiates a message so it'll work with npcParse and/or overridden vanilla messages.
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Tue Jun 21, 2016 9:12 pm
Just finishing off smgModder.lua (my Super Mario Galaxy "Mod.") at the moment. I'll release a few more updates to it after some bugs or opportunities to optimize the code are found, or any new ideas to implement are discovered.
after that, I plan to remake the Peach/Toad/Link HUD to be usable by Mario and Mario/Luigi's HUD to be usable by Peach, Toad, and Link, including item boxes
|
|
|
|
|
Return to “LunaLua”
Users browsing this forum: No registered users and 3 guests
|