Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,599
Reaction score
3,829
First Language
Java's Crypt
Primarily Uses
RMMZ
I'm making a core plugin for all of my plugins, but it'll also be available for anyone else who wants to use the same core.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
857
First Language
English
Primarily Uses
RMMV
@Hudell Aah, neatness. Kind of curious as to how the core plugin looks. :o
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,872
First Language
English
Lol imagine everyone's projects looking like

HudellCore
OssraCore
DoubleCore
NioCore
SolarCore
HimeCore

cause we all have our own preference for aliasing classes using class syntax
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
857
First Language
English
Primarily Uses
RMMV
Yeah, basically, heh. I have whittled the framework plugin I have been tinkering on down to around a hundred lines of code, or even a bit smaller should I not need a few features. So I could cram all the code I need into each plugin, or I could toss out a framework plugin. Not certain which direction I will go. I kind of feel like cramming the code -- of any length -- into each plugin is a waste, but I am also not entirely sure I want to go the framework route ... blarg.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,965
Reaction score
3,068
First Language
French
Primarily Uses
RMMV
afterseing the Cyclone engine that Hudell was working on. I was like : wow his plugins does everything my core do but better. So my idea will be to use the Cyclone Engine for those technical aspect but also add my own Core engine.

Gemstone engine have mostly Common function I reuse often such as :
Code:
    /**
     * Convert a value to a percent.
     *
     * @export
     * @param {number} a
     * @param {number} b
     * @return {number}
     */
    export function PercentOf(a: number, b: number, large: boolean = false): number {
        return a / b * (large ? 100 : 1);
    }

    /**
     * Convert a value to a rounded percent.
     *
     * @export
     * @param {number} a The value to convert
     * @param {number} b The target max value
     * @param {boolean} large convert the percent to a small value (0 ~ 1) or a large value (0 ~ 100)
     * @return {number}
     */
    export function RoundedPercentOf(a: number, b: number, large: boolean = false): number {
        return Math.round(PercentOf(a, b, large));
    }

// ...

I think having a common framework for those thing is fine but also having our own framework for our own useful common method is always nice.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,599
Reaction score
3,829
First Language
Java's Crypt
Primarily Uses
RMMZ
I'm usually against cores too, but this time I gave up the fight and joined the enemy. At least the core is doing a little more than just adding a way to patch classes.

I wrote a small documentation of it here:
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,814
Reaction score
963
First Language
Chinese
Primarily Uses
N/A
My consideration on this is the size of the duplicated codes, the number of duplication, and their rate of changes.
In general, the larger they are, the more duplication are there and the more frequently they change, the more reasons for me to extract those codes into something like a core plugin.
Also, if the core plugin doesn't have any breaking change, it'd be a great bonus for me :)
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
857
First Language
English
Primarily Uses
RMMV
Dah, Cyclone does look rather neat. Makes the framework I had been working on look silly.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,599
Reaction score
3,829
First Language
Java's Crypt
Primarily Uses
RMMZ
The code for the `patchClass` function would be super simple if all you want to support is methods. It got a bit more complex to include support for properties, then a little more to automatically copy old properties to the $super object and then even more to copy inherited old properties to the $super object.
I don't know if anyone has ever needed to alias an object property though, so I may be overkilling it there. Just wanted to ensure it was compatible with anything. I can make a simple `patchClass` function without property aliasing if anyone wants to copy it into their own plugins.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
549
Reaction score
238
First Language
English
Primarily Uses
RMMV
Lol imagine everyone's projects looking like

HudellCore
OssraCore
DoubleCore
NioCore
SolarCore
HimeCore
There won't be a SolarCore anytime soon, as I currently have no plans to buy MZ. Even in MV the SFG_Utils plugin isn't anything so elaborate as a core plugin - it's literally what it says, just a few utility plugins.

cause we all have our own preference for aliasing classes using class syntax
My preference is, don't do that and just alias functions in the ES5 way. I basically just don't use the class syntax for anything.
 

Nekohime1989

Nekohime
Veteran
Joined
May 31, 2014
Messages
498
Reaction score
227
First Language
English
Primarily Uses
RMMZ
Now I just need to figure out how to load the meta... -_-
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,634
Reaction score
1,452
First Language
French
Primarily Uses
RMMV
Lol wait ! be sure your are using at least Babel to compile code to ES5 if your use `super` !
`super` work fine and are support by all browser now, but have terrible performance :mad:.
I made for your a bench to see why you should never use super without Babel to transpile to es5.
Sure ,for a app or webpage is fine, but for a game engine is not good idea!
Or at least avoid placing '.super' in the game loop.

and we are not talking about a small difference!

1609158989216.png
Babel is over there:

 
Last edited:

Latest Threads

Latest Profile Posts

My original idea of a quest where you just paid money to complete it (it made sense in context) somehow got turned into decorate a table with a variety of choices so that the majority of players will have different looking tables.
XGkudjn.png

Latest custom tileset work for Raptor Revolt includes beach debris and palm tree. Can't wait to go to the beach!
Doing RPG Maker News #13 | More Yokai, Overworld Edits, Actor Specific Movement, Ultra Localization
One year on, one year off seems to be my theme lol
unknown.png

Finished coloring her and giving her different character portraits. Wanted to show a few of them :)

Forum statistics

Threads
110,469
Messages
1,053,552
Members
143,565
Latest member
jl4867
Top