(shouting)

LunaLua Offical Thread

The second SMBX collab!

Shall I stream some LunaLua live development?

Yes
23
92%
No
2
8%
 
Total votes: 25

User avatar
Willhart
Stalker, Doxxer, and Sexual Harasser
Banned
Posts: 2434
Joined: 13 years ago
Location: Finland

Re: LunaLua Offical Thread

Post by Willhart »

When this game is played on multiplayer, the screen splits when the players are far enough away from each other. The split seems to be happening both horizontally and vertically depending on the player placement. Is there any way to control this splitting/view with lua?

Being able to show areas from elsewhere of the level could be interesting for some visual tricks and gimmicks.
Rixithechao
https://www.youtube.com/watch?v=BODxOghVmko
Posts: 1811
Joined: 10 years ago
First name: Mack
https://rixithechao.talkhaus.com/

Re: LunaLua Offical Thread

Post by Rixithechao »

I went ahead and started a Skype group chat for discussing and getting help with LunaDLL, Lua, PGE, etc.

Anyone who's interested in joining should PM either me or romajiQuadhash; I'll be mostly unavailable tomorrow and Friday so ke will probably be able to add you sooner than I will.
Delightful Adventure Enhanced is out now!

Image

There's an official ASMT Discord server! Check it out to discuss Demo games and follow their development! thread, invite link

(Entry requires verification, either with a connected Youtube/Twitter/Twitch/etc account or manually by the server staff.)


Itch.io (albums and eventually games), Youtube (dofur pass and I guess other videos)
User avatar
Kevsoft
LunaLua Master Developer
Posts: 83
Joined: 9 years ago

Re: LunaLua Offical Thread

Post by Kevsoft »

LunaLua v0.7.0.3 has been released with following changes:
* Some small bugfixes
* New APIs: leveltimer.lua and smb3goalcard.lua
* New event: onMessageBox(eventObj, msg)
* New functions: unplaceSprites (to remove placed sprites)
In addition check this new neat API/extension out: https://www.youtube.com/watch?v=f9hBABxCvKg
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4199
Joined: 11 years ago
Location: Nova Scotia

Re: LunaLua Offical Thread

Post by SAJewers »

As awesome as this is, having it as a third line under the star counter looks oddly out of place to me.
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
User avatar
Kevsoft
LunaLua Master Developer
Posts: 83
Joined: 9 years ago

Re: LunaLua Offical Thread

Post by Kevsoft »

SAJewers wrote:As awesome as this is, having it as a third line under the star counter looks oddly out of place to me.
The creator of the API XerX is working on a full smb3 hud. This is still very early.
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4199
Joined: 11 years ago
Location: Nova Scotia

Re: LunaLua Offical Thread

Post by SAJewers »

I meant the timer, not the Cards. Having the timer there with the SMW-style HUD feels off to me.
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: LunaLua Offical Thread

Post by Hoeloe »

Question about the OpenGL stuff. It doesn't seem to be documented yet and I forgot a whole bunch. Is there a way to set vertex colours? Would be super useful for a based 3D rendering system I'm writing.
Image
Image
Image
Image
Image
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: LunaLua Offical Thread

Post by Hoeloe »

So for those of your who aren't on Codehaus or Skypehaus...

I made a thing.

https://dl.dropboxusercontent.com/u/308 ... .35.01.mp4
https://dl.dropboxusercontent.com/u/308 ... .08.01.mp4
https://dl.dropboxusercontent.com/u/308 ... .29.01.mp4
https://dl.dropboxusercontent.com/u/308 ... .37.04.mp4
https://dl.dropboxusercontent.com/u/308 ... .44.03.mp4

It's still very much a work in progress, but currently has these features:
  • Movement, rotation and scaling of 3D objects.
  • Basic texturing (a single texture can be applied to an object).
  • A vector library (which I'll likely release separately as well), which includes support for 2, 3 and 4 dimensional vectors, as well as 2x2, 3x3 and 4x4 dimensional matrices.
  • Camera object can be moved and rotated freely, and the field of view and near and far clipping planes adjusted.
  • Partial support for loading .obj files (obj files currently must be triangulated to work).
I'm still missing features such as depth testing and lighting, but I need access to some more OpenGL functions that to work. It's also extremely slow at the moment, but hopefully I'll be able to shift the projection and transformations to OpenGL and save on a lot of the computation there.

I won't release this until I have a basic 3D renderer working, with lighting and proper depth. Until then, I'll be polishing it up.

P.S. Sorry for the noise in the 3rd video. I was watching GDQ on my other monitor and forgot that I was recording sound.
Image
Image
Image
Image
Image
User avatar
Wohlstand
Moondust and TheXTech developer
Posts: 186
Joined: 10 years ago
First name: Vitaly
Pronouns: he/him/his
Location: Moscow, Russia

Re: LunaLua Offical Thread

Post by Wohlstand »

I think, it's a good news for a SAJewers or any other people:

While I experimenting with loop points insude forked SDL mixer, Kevin also gave me hint to provide ability to read music title from meta-tag of the OGG file!
(Anyway I can provide other tags too)

Here is some changes in the GitHub:
https://github.com/Wohlhabend-Networks/ ... 1fd5a39a18
and usage inside PGE Engine:
https://github.com/Wohlhabend-Networks/ ... b37673d5fc

When I will finish works with loop points on the OGG file, I will also try to provide music title for MP3 and other file formats, and then LunaLUA will get Audio.MetaTitle() API function which will return title of music gotten from meta-tags

What about loop points, you will have to add meta-tags (Vorbis comments) to your OGG file: LOOPSTART=<samples> and LOOPEND=<samples> or (LOOPLENGTH=<samples> instead), and LunaLUA / PGE will play a choisen fragment looped without replaying of music title!

Those tags is possible to add via Audacity ;)

loop will NOT work if:
- loopend less than loopstart!
- one of loopstart or loopend less or equal than zero!
- one of loopstart or loopend greater than whole audio data length!
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4199
Joined: 11 years ago
Location: Nova Scotia

Re: LunaLua Offical Thread

Post by SAJewers »

Does that mean we can make a global music cheat code that displays the IDv3 tags of the current song?
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
User avatar
Wohlstand
Moondust and TheXTech developer
Posts: 186
Joined: 10 years ago
First name: Vitaly
Pronouns: he/him/his
Location: Moscow, Russia

Re: LunaLua Offical Thread

Post by Wohlstand »

SAJewers wrote:Does that mean we can make a global music cheat code that displays the IDv3 tags of the current song?
Yea =)

P.S. ID3 just a metadata format for MP3, but for OGG/FLAC there are a "Vorbis Comments" (you will find that in the format specifications)
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: LunaLua Offical Thread

Post by Hoeloe »

Update to Colliders!

http://engine.wohlnet.ru/pgewiki/Colliders.lua

Changes:
  • "Vector" class has been removed in favour of the more complete VectR.lua.
  • VectR.lua is now a dependency, and is included in the download.
  • The functions "collideNPC", "collideBlock" and "collideNPCBlock" now return 3 values instead of 2. The third value is a table containing a list of colliding objects.
Image
Image
Image
Image
Image
TiKi
Posts: 709
Joined: 10 years ago

Re: LunaLua Offical Thread

Post by TiKi »

Axon wrote:Here's another thing I made: Tryclyde, the SMB2 boss:
https://www.dropbox.com/s/fbkaws4hap11v ... yclyde.rar

Image

I tried to make it relatively faithful to the original. If you have suggestions for improvement or would like me to explain some of/add more comments to the code, please tell me.

note: I've used clouds for the platforms, because block-502 is solid in SMBX. I could have replaced the cloud graphics, but I guess I forgot.
Could you please make a tutorial on how to put it in the level, and make it trigger an event on death?
User avatar
Kevsoft
LunaLua Master Developer
Posts: 83
Joined: 9 years ago

Re: LunaLua Offical Thread

Post by Kevsoft »

LunaLua v0.7.1 is out with following changes:
* Some various fixes for the opengl renderer.
* Added screenshot handling with the print-screen button.
* Working loops (intro sequence + main loop)

* Some new functions:
** Added various functions in the Misc-Namespace
** Added various functions in the Graphics-Namespace
** Added Audio.MusicTitle and Audio.MusicTitleTag to get the music title (saved as IDv3 metadata) of the current music file (works well with mp3 and ogg)

* New custom libraries:
** fade.lua - Easy and fast library for creating fade effects and color overlays
** sprite.lua - A library for creating custom animated sprites with movement abilities.
** vectR.lua - A vector library (used for colliders.lua)
User avatar
Wohlstand
Moondust and TheXTech developer
Posts: 186
Joined: 10 years ago
First name: Vitaly
Pronouns: he/him/his
Location: Moscow, Russia

Re: LunaLua Offical Thread

Post by Wohlstand »

Kevsoft wrote:LunaLua v0.7.1 is out with following changes:
* Some various fixes for the opengl renderer.
* Added screenshot handling with the print-screen button.
* Working loops (intro sequence + main loop)

* Some new functions:
** Added various functions in the Misc-Namespace
** Added various functions in the Graphics-Namespace
** Added Audio.MusicTitle and Audio.MusicTitleTag to get the music title (saved as IDv3 metadata) of the current music file (works well with mp3 and ogg)

* New custom libraries:
** fade.lua - Easy and fast library for creating fade effects and color overlays
** sprite.lua - A library for creating custom animated sprites with movement abilities.
** vectR.lua - A vector library (used for colliders.lua)
Small question:
- Are screenshots in the PNG format?
- Are you going to name screnshot files with date-time stamp instead of unsafe "screen1", "screen2" which sometimes going to overwrite old screens :-P
User avatar
Kevsoft
LunaLua Master Developer
Posts: 83
Joined: 9 years ago

Re: LunaLua Offical Thread

Post by Kevsoft »

Wohlstand wrote: Small question:
- Are screenshots in the PNG format?
- Are you going to name screnshot files with date-time stamp instead of unsafe "screen1", "screen2" which sometimes going to overwrite old screens :-P
Currently only clipboard, but want to change that for the next release.
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4199
Joined: 11 years ago
Location: Nova Scotia

Re: LunaLua Offical Thread

Post by SAJewers »

So, I took some Code from the MAGLX 2 Relay (Thanks, Lejes), and made a Vertical Shooter out of it. Still needs work I think. If someone wants to improve it or clean it up, go ahead:

http://www.mediafire.com/download/3zfam ... moBlade.7z

I'll probably make a level out of this, if some of the kinks can be worked out.
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: LunaLua Offical Thread

Post by Hoeloe »

Been getting this ready for A2XT. I think it's almost there.


Image
Image
Image
Image
Image
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: LunaLua Offical Thread

Post by Hoeloe »

Hoeloe wrote:Been getting this ready for A2XT. I think it's almost there.


This library has now been released! Link is here.

I'll draw up a quick lunaworld.lua including it for A2XT.

EDIT: As it turns out, I don't believe this is actually complicated. This should serve the purpose for lunaworld:

Code: Select all

world_raocoin_lib = loadSharedAPI("raocoin2");
world_raocoin_currency = world_raocoin_lib.registerCurrency(274, true, 472, 66);

local levelFinished = false;

function onLoop()
	 if(mem(0x00B2C59E,FIELD_WORD) ~= 0 and not levelFinished) then --level is ending
		levelFinished = true;
		world_raocoin_currency:save();
	end
end
That should count raocoins and save them to the file when the level ends (thus stopping you from farming by repeatedly dying).
Image
Image
Image
Image
Image
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: LunaLua Offical Thread

Post by Hoeloe »

Small update to Colliders.

I added 6 constants, which are lists of Block IDs. These can be used with the "collideBlock" function to simplify the collision code. For example, to test if the player is touching lava, you can now write:

Code: Select all

if(colliders.collideBlock(player,colliders.BLOCK_LAVA)) then
You can also concatenate these lists together, so to test if the player is, for example, touching lava or a damaging block type (such as spikes), you can now write:

Code: Select all

if(colliders.collideBlock(player,colliders.BLOCK_LAVA..colliders.BLOCK_HURT)) then
(For those who care, the results of these concatenations are cached the first time they are called, so don't worry about the performance of concatenating large lists of IDs.)
Image
Image
Image
Image
Image
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4199
Joined: 11 years ago
Location: Nova Scotia

Re: LunaLua Offical Thread

Post by SAJewers »

I'll mention this here since I can't edit the wiki, but the player offset 0x08 is not "Field or Quicksand timer", but how many bombs Sheath/Link is holding.

Someone who can edit the wiki might want to fix that.
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
User avatar
Wohlstand
Moondust and TheXTech developer
Posts: 186
Joined: 10 years ago
First name: Vitaly
Pronouns: he/him/his
Location: Moscow, Russia

Re: LunaLua Offical Thread

Post by Wohlstand »

SAJewers wrote:I'll mention this here since I can't edit the wiki, but the player offset 0x08 is not "Field or Quicksand timer", but how many bombs Sheath/Link is holding.

Someone who can edit the wiki might want to fix that.
10 is maximum
Rixithechao
https://www.youtube.com/watch?v=BODxOghVmko
Posts: 1811
Joined: 10 years ago
First name: Mack
https://rixithechao.talkhaus.com/

Re: LunaLua Offical Thread

Post by Rixithechao »

Oh hey, I prolly should post about textblox here now that I've made enough progress with it.

This was something I wasn't planning on getting around to until after I resumed work on cinematX in November, but folks on codehaus mentioned the 1-year anniversary of LunaLua so I figured I should do something for the occasion.

(Big animated gif warning)
Image

Customizable, movable blocks of text with monospaced sprite fonts and in-line commands for text animation and effect cues and whatnot, because I'm a sucker for fancy dialogue systems.

It's poorly optimized at the moment (toward the end of the message you see above SMBX dips to 25 fps, and I'm running it on a high-end gaming PC!) and one optimization I'm considering will make it entirely OpenGL-based, so it's definitely not A2XT-ready yet. But if anyone wants to mess around with it, I put it up on the cinematX Github repo.

Here's the lunadll.lua file, complete with the censored copypasta dinner special deluxe, and here's the font I used for testing, both an 8x8 and a 16x16-px version. Any size font will work as long as it's in a 16x8 tileset arranged like these ones.

And since I forgot to leave this in the lunadll.lua file as a comment block, here's a quick reference for the constants available so far:

Code: Select all

~ = Doesn't do anything yet

textblox.BOXTYPE_NONE
textblox.BOXTYPE_MENU
textblox.BOXTYPE_WORDBUBBLE ~
textblox.BOXTYPE_CUSTOM ~
	
textblox.BIND_SCREEN ~
textblox.BIND_LEVEL ~

textblox.SCALE_FIXED
textblox.SCALE_AUTO
	
textblox.HALIGN_LEFT
textblox.HALIGN_MID
textblox.HALIGN_RIGHT
	
textblox.VALIGN_TOP
textblox.VALIGN_MID
textblox.VALIGN_BOTTOM
Delightful Adventure Enhanced is out now!

Image

There's an official ASMT Discord server! Check it out to discuss Demo games and follow their development! thread, invite link

(Entry requires verification, either with a connected Youtube/Twitter/Twitch/etc account or manually by the server staff.)


Itch.io (albums and eventually games), Youtube (dofur pass and I guess other videos)
User avatar
Wohlstand
Moondust and TheXTech developer
Posts: 186
Joined: 10 years ago
First name: Vitaly
Pronouns: he/him/his
Location: Moscow, Russia

Re: LunaLua Offical Thread

Post by Wohlstand »

Rockythechao wrote:Oh hey, I prolly should post about textblox here now that I've made enough progress with it.

This was something I wasn't planning on getting around to until after I resumed work on cinematX in November, but folks on codehaus mentioned the 1-year anniversary of LunaLua so I figured I should do something for the occasion.

(Big animated gif warning)
Image

Customizable, movable blocks of text with monospaced sprite fonts and in-line commands for text animation and effect cues and whatnot, because I'm a sucker for fancy dialogue systems.

It's poorly optimized at the moment (toward the end of the message you see above SMBX dips to 25 fps, and I'm running it on a high-end gaming PC!) and one optimization I'm considering will make it entirely OpenGL-based, so it's definitely not A2XT-ready yet. But if anyone wants to mess around with it, I put it up on the cinematX Github repo.

Here's the lunadll.lua file, complete with the censored copypasta dinner special deluxe, and here's the font I used for testing, both an 8x8 and a 16x16-px version. Any size font will work as long as it's in a 16x8 tileset arranged like these ones.

And since I forgot to leave this in the lunadll.lua file as a comment block, here's a quick reference for the constants available so far:

Code: Select all

~ = Doesn't do anything yet

textblox.BOXTYPE_NONE
textblox.BOXTYPE_MENU
textblox.BOXTYPE_WORDBUBBLE ~
textblox.BOXTYPE_CUSTOM ~
	
textblox.BIND_SCREEN ~
textblox.BIND_LEVEL ~

textblox.SCALE_FIXED
textblox.SCALE_AUTO
	
textblox.HALIGN_LEFT
textblox.HALIGN_MID
textblox.HALIGN_RIGHT
	
textblox.VALIGN_TOP
textblox.VALIGN_MID
textblox.VALIGN_BOTTOM
Nice! =)
Also please keep support of UTF-8 texts with a support of custom font maps (non-ascii)
Here are some fonts from PGE:
https://github.com/Wohlhabend-Networks/ ... SMBX/fonts
(all fonts are white because you have able to quickly recolor it via great OpenGL things which I'm doing in the PGE)
and the Font Manager which is implementatino of them:
https://github.com/Wohlhabend-Networks/ ... anager.cpp
there are supports unicode even there are raster (non-ttf) fonts. I wanna later to port mine font manager to LunaLUA to provide unicode fonts support include cyrilic/europe, etc. and also mine message box which can replace buiult-in version (I think you saw fading in/out of box while it appears/disappears) and also menuboxes to provide flexibility, etc. New message box is customizable (use any sizable-block like texture and evrything will work fine. Image size is no matter, it gets borders by defined padding and splits out those parts).
Your message box is wonderful! (just a Super Paper Mario dialgues style! =))
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4199
Joined: 11 years ago
Location: Nova Scotia

Re: LunaLua Offical Thread

Post by SAJewers »

SAJewers wrote:So, I took some Code from the MAGLX 2 Relay (Thanks, Lejes), and made a Vertical Shooter out of it. Still needs work I think. If someone wants to improve it or clean it up, go ahead:

http://www.mediafire.com/download/3zfam ... moBlade.7z

I'll probably make a level out of this, if some of the kinks can be worked out.
Now even better, with Bombs and a HUD! (but not with a proper ship graphic)

http://www.mediafire.com/download/d31n7 ... moBlade.7z
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
Post Reply