Luigifan's Development Thread!

This is the place for video games!

Moderator: Userbase Moderators

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Mon Jun 29, 2015 6:28 pm

Battles are a plan! Thinking more Pokemon/Final Fantasy styled instead of Zelda overworld style enemies. But who knows, this is an engine so if I implement it one way, someone may fork it and make it their own ;)

UPDATE: So I've scrapped the original design of the launcher for something i think will work out alot better..
Spoiler: show
Image

Expected
Swooper
Swooper
Posts: 64
Joined: Sat Jun 27, 2015 9:23 am

Re: Luigifan's Development Thread!

Postby Expected » Mon Jun 29, 2015 8:49 pm

I assume that making Pokemon/FF-esque battles would be much more difficult than Zelda style, but if you could pull it off that'd be really cool! Also, I'm really digging the new launcher theme! It really pops. Way better than that old drab one you had. :P

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Mon Jun 29, 2015 9:30 pm

Well I'll start with random encounters for now. I need to have my artist design me some monsters now. Maybe I'll go a full on Pokemon style and only have one enemy appear at a time. Haven't decided yet.

XerX
Phanto
Phanto
Posts: 1487
Joined: Fri Dec 20, 2013 3:33 pm

Re: Luigifan's Development Thread!

Postby XerX » Tue Jun 30, 2015 3:02 am

Luigifan2010 wrote:Battles are a plan! Thinking more Pokemon/Final Fantasy styled instead of Zelda overworld style enemies. But who knows, this is an engine so if I implement it one way, someone may fork it and make it their own ;)

UPDATE: So I've scrapped the original design of the launcher for something i think will work out alot better..
Spoiler: show
Image
Image
Vyvuto wrote:I assume that making Pokemon/FF-esque battles would be much more difficult than Zelda style, but if you could pull it off that'd be really cool! Also, I'm really digging the new launcher theme! It really pops. Way better than that old drab one you had. :P
Not necessarily. Making a bunch of menus that decide an animation and a mathematical algorithm that equals how much damage sounds a lot more simpler than an overworld where you have to code collision data for whatever weapon you're using every time you swing it, while keeping a good framerate by not causing memory leaks from the constant checks made each frame the animation for attacking is made.

Pokemon/FF is derived from the text-based RPG's, whilst Zelda is more visual based.

So technically Pokemon/FF would be simpler. :P

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Tue Jun 30, 2015 8:37 am

XerX wrote:
Vyvuto wrote:I assume that making Pokemon/FF-esque battles would be much more difficult than Zelda style, but if you could pull it off that'd be really cool! Also, I'm really digging the new launcher theme! It really pops. Way better than that old drab one you had. :P
Not necessarily. Making a bunch of menus that decide an animation and a mathematical algorithm that equals how much damage sounds a lot more simpler than an overworld where you have to code collision data for whatever weapon you're using every time you swing it, while keeping a good framerate by not causing memory leaks from the constant checks made each frame the animation for attacking is made.

Pokemon/FF is derived from the text-based RPG's, whilst Zelda is more visual based.

So technically Pokemon/FF would be simpler. :P
And if you remember the original thread, I mention starting this project by porting a text based RPG I wrote in C#




Some old videos of it

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Tue Jun 30, 2015 10:29 pm

So what started off as me just coding a simple player class to test animations then turned into player movement which turned into the camera locking on the player...nice. Again, LibGDX has improved my quality of life. Now it's even more Minicraft like though. Please excuse the Final Fantasy filler characters, but reminder that Terraria did it also ;)
Spoiler: show
Image
Image

Ecruteak
Rocky Wrench
Rocky Wrench
Posts: 675
Joined: Wed Mar 18, 2015 1:53 am
Flair: It's been...
Pronouns: she/they

Re: Luigifan's Development Thread!

Postby Ecruteak » Tue Jun 30, 2015 11:16 pm

Luigifan2010 wrote:So what started off as me just coding a simple player class to test animations then turned into player movement which turned into the camera locking on the player...nice. Again, LibGDX has improved my quality of life. Now it's even more Minicraft like though. Please excuse the Final Fantasy filler characters, but reminder that Terraria did it also ;)
Spoiler: show
Image
Image
It's looking really good! Just a question- will we be able to make our own characters or are there going to be pre-made ones?

Oh, yeah, and will it be available for Mac OS X?

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Wed Jul 01, 2015 6:58 am

ShyGuy37 wrote: It's looking really good! Just a question- will we be able to make our own characters or are there going to be pre-made ones?

Oh, yeah, and will it be available for Mac OS X?
if you look earlier in the thread...
Image

anyway as for customisable characters, part of this depends on my artist and if she's willing to draw a bunch of stuff. at the very least colored shirts shouldn't be a problem or other basic customisations like that.

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Thu Jul 02, 2015 1:51 pm


Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Tue Jul 07, 2015 11:36 am

I haven't done anymore work on the game, besides random encounters. But I have been developing Luigibot, which is now active in the IRC. So please, leave your suggestions for Luigibot here and I will do my best to add them ;)

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Fri Jul 17, 2015 2:19 pm

I picked up LunaLua today, missed the death counter, made my own.



So how does it work?

Using the player memory offsets supplied to me by Kevsoft (this whole script was done with some help from Kevsoft, mostly syntaxing and other misc. tweaks). I tried using PC+0x13C (which is player death state) but it appears to constantly be set to 0. So thus, I used the PC+0x13E (death animation timer) offset. This offset remains at zero until of course, you die. Then it increments up to about 200. That's not important though, what's important is the increase. I check to see if this value is > 0. If so, then set a boolean true so we don't keep incrementing and increment the death counter up one. The death count is saved to a DATA_WORLD variable that's on a per save basis.

The downside: the lunaworld.lua has to be implemented on a per world basis. This is sadly a limitation of LunaLua right now. But I tried to make it easy. In theory, you could copy and paste a lunaworld.lua with a single line into all of your episodes (unless they already have one) and you'd be good to go.

You can find the script here: https://github.com/Luigifan/lunaluascri ... athcounter

It's an API script, so put it in your LunaScriptsLib folder as deathcounter.lua. From there, make a lunaworld.lua file with the following line in it:

Code: Select all

_deathCounter = loadAPI("deathcounter"); 
That's it! It hooks into the needed functions so you don't have to worry about drawing or any of it. It's a set and forget.

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Sat Jul 18, 2015 10:56 am

Image

more on this later!~

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Sun Jul 19, 2015 11:03 am

I've put some thought into this over the past couple of days, but I still need a few more statistics for it.

Enter newcomer:

LunaLua Module Manager

Essentially, the idea will work similar to the SMBX Episode Manager, except for the fact that it will instead manage LunaLua Modules.

So excuse me if I have the name wrong, but these are what I interpret LunaLua modules as:

Image

The "API" scripts. But LunaLua API Script Manager doesn't sound as cool.

Because I understand that LunaLua can be run on not only Windows, but also now Linux with a bit of tweaking, I want to develop the tool using Gtk# and Mono.

Instead of having a seperate file for each script with its metadata, I want to add the metadata to the head of each file, for example in my death counter:

Code: Select all

__title = "Death Counter"
__version = "1.0.0.0"
__author = "Mike Santiago"
__url = "http://mrmiketheripper.x10.mx/"

local deathCounterApi = {}

..

return deathCounterApi;
I plan to keep it strict as in __title is always the first line, __url is always the last. I believe this is all the metadata I'll need.

In addition, dependency management is something I plan to incorporate. For example, if my death counter depended on cinematX for some reason, I would want that to be downloaded if it doesn't exist.

On the server side, I want to incorporate the installation of the script, but also simple usage examples built into the manager for use.

This is where I need a few things:
  • I need to know: is this something anyone would use/contribute to?
  • I need help getting the metadata for these bundled scripts
  • I need help getting usage/examples for each of these scripts.
Please, let me know in this thread if you want to see this and I will begin the work.

Kevsoft
Ripper II
Ripper II
Posts: 375
Joined: Sun Jul 27, 2014 8:03 am

Re: Luigifan's Development Thread!

Postby Kevsoft » Sun Jul 19, 2015 11:43 am

Luigifan2010 wrote: I need to know: is this something anyone would use/contribute to?
Well if it works good then I will bundle it up to the LunaLua download page.
I don't know C# (the programming language you will use, right?) a lot but I can help if you get into any issues.
Luigifan2010 wrote: I need help getting the metadata for these bundled scripts
A simple parser should do it.
In addition:

Code: Select all

__title = "Death Counter"
__version = "1.0.0.0"
__author = "Mike Santiago"
__url = "http://mrmiketheripper.x10.mx/"
That's pretty dangours, because you export these fields to the global enviroment. If you want to keep it hidden and only use it local then add the "local" keyword for every field:

Code: Select all

local __title = "Death Counter"
local __version = "1.0.0.0"
local __author = "Mike Santiago"
local __url = "http://mrmiketheripper.x10.mx/"
or if you want to access these fields from the API you can also do:

Code: Select all

local deathCounterApi = {}
deathCounterApi.__title = "Death Counter"
deathCounterApi.__version = "1.0.0.0"
deathCounterApi.__author = "Mike Santiago"
deathCounterApi.__url = "http://mrmiketheripper.x10.mx/"

..

return deathCounterApi;
Luigifan2010 wrote: I need help getting usage/examples for each of these scripts.
I would suggest to ask the guys at talkhaus as they are more into LunaLua than the SMBX Community. Most APIs are written by them.

In addition you may want to parse this wiki page:
http://engine.wohlnet.ru/pgewiki/Catego ... _libraries

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Sun Jul 19, 2015 12:08 pm

Reading the metadata isn't hard, I just need help getting the proper metadata for each script. Keeping them local would probably be better, you're right. That page helps alot btw, thank you!

glitch4
Banned
Posts: 2577
Joined: Tue Dec 31, 2013 3:43 pm

Re: Luigifan's Development Thread!

Postby glitch4 » Sun Jul 19, 2015 2:38 pm

this is awesome! I liked the module manager and coding stuff there. keep up the great work!

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Sun Jul 19, 2015 5:24 pm

In the meantime, I've just finished up work on my level timer.



Of course, this wouldn't be a dev thread without me detailing how I did it.

The most pain in the ass part was timing.

I first started with a simple frame counter overloading the onLoop() method. This counts the amount of frames. To my knowledge, SMBX updates its frames ~60 times per second (at least it tries to). So, if I divide the frames passed by 60 and get 1, then one second has passed.

From there, once I got all of the counting up bugs down, I set a few variables for level time, player variable, UI elements, where to draw them, etc. And then I'm good to go. One challenge was where to put it. I ultimately decided that below the 1-UP counter looked best, but then what if we had stars? I do a simple check to see if our star counter > 0 (that means we have stars and the star counter will be shown) and adjust the drawing position as necessary:

Code: Select all

if(tonumber(mem(0x00B251E0, FIELD_DWORD)) > 0) then
      Graphics.placeSprite(1, uiImage, lf_levelTimerApi.GUIPosition_Stars.x, lf_levelTimerApi.GUIPosition_Stars.y, "", 2);
      Text.print(tostring(secondsleft - timeelapsed), 1, lf_levelTimerApi.GUIPosition_Stars.x + 44, lf_levelTimerApi.GUIPosition_Stars.y + 1);
    elseif (tonumber(mem(0x00B251E0, FIELD_DWORD)) == 0) then
      Graphics.placeSprite(1, uiImage, lf_levelTimerApi.GUIPosition_NoStars.x, lf_levelTimerApi.GUIPosition_NoStars.y, "", 2);
      Text.print(tostring(secondsleft - timeelapsed), 1, lf_levelTimerApi.GUIPosition_NoStars.x + 44, lf_levelTimerApi.GUIPosition_NoStars.y + 1);
    end
Of course, time can be paused and stuff. But one other interesting thing was implementing the additional score from time being leftover.

Code: Select all

if(Level.winState() > 0) then
      passTime = false;
      postWinFrameCounter = postWinFrameCounter + 1;
      lf_levelTimerApi.doEndingStuffs();
    end
Fairly simple, just mostly tweaking and where to draw this stuff (also, used the SMW math: 1 sec = 50 pts.).

Oh, and YES, when your time gets below 100, the SMW warning sound is played.

Code: Select all

if((secondsleft - timeelapsed) <= 100) then
      if(warnedPlayer == false) then
        warnedPlayer = true;
        playSFXSDL(resPath .. "\\warning.wav");
      end
    end
And of course finally, implementing the timer in your level is super simple because I've done all the hard work for you and I've implemented it as an API script. In your lunadll.lua, you just have to put this:

Code: Select all

--This can go in your lunaworld.lua (if you wanted to set a constant time for each level) or in your
--lunadll.lua file if you wanted it on a per level basis.
--Usage is SIMILAR to the death counter, a little more is needed though


--We declare an instance of the timerApi, like the death counter
timerApi = loadAPI("leveltimer");

function onLoad()  
	--But now in the onLoad override, we set a few values
	timerApi.setSecondsLeft(300);
 --For one, we need to set the timer value. No greater than 999
	timerApi.setTimerState(true);
 --Then, we need to make sure we enable it. It's not enabled by default
end
Easy peasy. And yes, this works in conjunction with the death counter really well.

https://github.com/Luigifan/lunaluascri ... leveltimer

Put EVERYTHING (except usage.txt) into your LuaScriptsLib folder and you're good to go!

FanofSMBX
Ludwig von Koopa
Ludwig von Koopa
Posts: 3878
Joined: Sun Dec 22, 2013 12:01 pm

Re: Luigifan's Development Thread!

Postby FanofSMBX » Mon Jul 20, 2015 10:28 pm

I'd love to use the lua file manager but I'm afraid you will not be seeing any contributions from me.

Congratulations on the level timer! I like how you integrated it with the HUD! It's also great that it's easy to use.

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Tue Jul 21, 2015 7:29 am

FanofSMBX wrote:I'd love to use the lua file manager but I'm afraid you will not be seeing any contributions from me.
why not? do you just prefer LunaDLL?
FanofSMBX wrote:Congratulations on the level timer! I like how you integrated it with the HUD! It's also great that it's easy to use.
Thank you much! :)

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Luigifan's Development Thread!

Postby Axiom » Tue Jul 21, 2015 11:11 am

Release: http://mrmiketheripper.x10.mx/leveltimer/

i dont like making websites so i hope you enjoy my terrible css/html


Return to “Video Games”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari