Jump to content
New account registrations are disabed. This website is now an archive. Read more here.

Search the Community

Showing results for tags 'class'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Main Center
    • Announcements & News
    • Feedback, Bug Report and Forum Help
    • Introductions and Farewells
    • Community Contests & Events
  • Game Development
    • General Game Development
    • Engine Discussion
    • Support
    • Requests
    • Project Recruitment
  • Community Projects
  • Creativity & Design
    • Programming & Web Development
    • Stories and Literature
    • Resource Showcase & Critique
    • The artsy side
  • Off Topic
    • The Cafe
    • Computers, Internet and Tech Talk
    • Video Games
    • Entertainment & Media
    • Role Playing, Interactive Story Telling & Forum Games
  • Archive
    • Forum Archive
  • RPG Maker VX
  • Gamers Corner

Blogs

  • Emily_Konichi's Blog
  • Wyzrd's Blog
  • Marks Bloggy
  • Punkid's blog
  • isaacsol's Blog
  • Cloudstrife's blog of items
  • Lammorra's Blog
  • The most magnificent blog EVER!
  • dietcherrycoke
  • Elric1816's Blog
  • COPY RIGHT...???
  • Chaos Impact - Production Blog
  • Encounters
  • Kiriashi's RMXP Activity
  • bugbite250's Blog
  • polraudio's Blog
  • The Silent Assassin Horror Blog
  • Elandryal's Blog
  • niemitoad's Blog
  • Awakening project Blog
  • XDoggStrafe's Blog
  • Code Geass: Painful Memories Daily Progress
  • Check out what I'm doing... you stalker
  • Aerow's Blog
  • Omar510's Blog
  • Agckuu Coceg Blog
  • My RMXP Projects Blog
  • Franklin's Adventures
  • RMXPUnlimited Dev Blog
  • HedgeKnight.net
  • Zanime Dev Blog
  • Tomo2000's Blog
  • The Programmer's Blog
  • A Bayonetta Inspired game
  • Elviar: Erufu Tairiku Blog
  • ShinyToyGuns' Development Blog
  • Zeriab's thoughts
  • Blogotry
  • Leerox4eva1's Blog
  • Tatsu's
  • O
  • Zark: The Time Storm Blog
  • DS (Devine Shadow) Development Blog
  • Silver Moon Blog
  • Rhijun568's Blog
  • Rhijun568's Blog
  • Mundane's Blog
  • Meh
  • Cutting Through Time Itself
  • This is not a Blog
  • RGangsta's Blog. :D
  • jporter917's Blog
  • Leon's Blog for the Minions
  • Inner Monologue
  • White Rabbit's cave with a view.
  • Darktom77's Blog
  • Salsa de salsa en Malaga
  • mwillems' Blog
  • aaa135139's Blog
  • withinsin's Blog
  • Final Fantasy XP VI
  • The progress of Crym
  • Free to Listen
  • Final Fantasy XP
  • Mega Man Transfer
  • Random Blog
  • Random Blog
  • RPG Maker Inventions
  • Xeyla's Blog
  • 808_legend's Blog
  • My First Non-Fan game
  • kellessdee's Blog
  • Chronicles of the Chronicles
  • YAY! Factors
  • Merlin The RPG Blog
  • newgamergirl2011's Blog
  • Calathandias Blog
  • Jon Bon's Blog
  • RMU Development Blog
  • Glaze Of The Slient
  • Illuminate the pathway, blind the corrosion and set sail for awakening!
  • Project GK
  • frida89's Blog
  • Octopus Shoes
  • Stuffs
  • Uninstaller
  • Music Mayehm
  • Development Blog 2.0
  • Nickz's Blog
  • RageMage's Blog
  • UrHappyPlz's Blog
  • Gmack's Blog
  • Night Horror
  • Tales of Druidia Blog
  • Arcatis Progress
  • Ex-Stigma
  • yiyi's Blog
  • yiyi's Blog
  • jianren925's Blog
  • gaogen's Blog
  • Prince Liam
  • Bon Ink Creations Independent Showcase
  • Video Game Series Where Are They Now?
  • buwawa's Blog
  • Bon Ink Creations Blog
  • Bon Ink Creations Forum Feed
  • White Rabbit's Thought Bubble
  • Pyramid_Head's Grotto of Wonders
  • DarthVollis's Project
  • Day of the Darkness
  • Ovan35's Blog
  • nightprince75's Blog
  • Arcatis Project
  • Code Runners Dev Blog
  • valerinwuba's Blog
  • shontellewilson's Blog
  • Bob Rambles
  • The Other World
  • Audio bible
  • Audiobible

Categories

  • RMXP Projects
  • RMVX Projects
  • Other Games
  • RGSS(RMXP) Scripts
  • Graphical Resource Packs
  • Audio Downloads
    • Audio Packs
    • BGM
    • BGS
    • ME
    • SE
  • Tools & Utilities
  • Misc. Downloads
  • Eventing Systems/Tutorials

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Steam Profile


Website URL


Skype


Facebook


Location


Interests


Other Skills


Project(s)


Referer


Google Plus Profile

Found 1 result

  1. With ES6 classes, trying to extend the parent class in plugins can lead to its children still using the old parent codes. For instance, you can place this in a JavaScript sandbox and verify the console output yourselves: So normally, you'll still have to directly type prototypes: But I wanted to offer an alternative for those not being familiar with ES5 or avoiding prototypes like a plague despite the fact that many RMMZ codes are written that way, and this is what I've come up with: I've tested that it works for adding new instance variables and prototype methods in base classes, and extending and overriding existing prototype methods there(you can place the linked snippet into a JavaScript sandbox and verify the console output yourselves). While I failed to inherit the changes in the static functions of the base classes from plugins as well, this can be easily mitigated by using BaseClass.staticFunc.call(this) instead of super.staticFunc(). Basically, the essence of the issue when aliasing ES6 class inheritance without direct prototyping is this: 1. The original child class inherits the original base class 2. A plugin extends the original base class to alias some of its prototype methods 3. The child class still inherits the original base class So to solve this, simply store the linkage between the child class and the base class right after creating that child class, then points the parent of the child class to the extended base class right after extending it. As for the static functions in classes, while I tried to use the linkage to let the exiting children class use the new static functions from the extended parent class, I failed to cover the case for aliasing existing parent class static functions, because it's just impossible: 1. The super in the static functions of the child class always points to the original parent class 2. The super in the static functions of the extened parent class always points to the original parent class 3. The super in the static functions of the child class's supposed to always point to the extended parent class Clearly, combining 1 and 2 will contradict with 3, which is the goal I've trying to achieve. For those not being familiar with ES5 or avoiding prototypes like a plague, I hope using ExtendedClassAlias won't be too demanding for you, as all you need to do is sticking to these: /* * Do these 2 additional things when using ES6 class inheritance aliasing * without directly typing prototypes: * 1. Add the following code right below a new class inheriting another one: * - ExtendedClassAlias.inherit(Klass); * Where Klass is the new class inheriting another one * 2. Add the following code right below extending an existing class as a way * to alias its methods: * - ExtendedClassAlias.updateClass(Klass); * Where Klass is the existing class being extended as a way to alias its * methods * Right now it doesn't work well with inheriting static functions in classes, * so those in children classes should use ParentClass.staticFunc.call(this) * instead of super.staticFunc() */ P.S.: I've spent almost 24 hours on this and I enjoyed the process a lot, even though this might not be practical enough to be used in MZ :)
×
×
  • Create New...