Spherical forums

User-Made => Libraries => Topic started by: Radnen on March 16, 2013, 02:16:58 am

Title: RadLib
Post by: Radnen on March 16, 2013, 02:16:58 am
Hey guys, I'm going to introduce you to a new a powerful game creation library for sphere called radlib!

(http://rpgmaker.net/media/content/users/6429/locker/radlib.png)

What is it?
RadLib is a library intended to aid the development of Sphere games. I looked at the most common pieces of code between all of my game projects and developed a library that I could use to have instant access to those features.

What's in it?
Everything! You have various distinct classes:

Assert: To check code statements, tests.
Audio: To play sounds, music.
Color: Various colors.
Debug: To log messages; display errors.
Game: To wrap update/render scripts of map engine.
Input: Keyboard and Joystick interface.
Lib: General Library values
Mouse: Mouse interface.
Resources: Manager of game resources.
StateManager: Game state manager.

Plus many, many other classes and features.

Where can I get it?
You can check out the bleeding-edge version at github here: https://github.com/Radnen/radlib

No official version has been announced, but it will likely release as several different versions:
- Release: JsMin version of the source; no help provided.
- Development: Full code, not JSMin'd, and all comments available.
- RadGui: As a separate release from the core package
- Full suite: Core library with all sub-libraries, such as RadGui
Title: Re: RadLib
Post by: N E O on March 16, 2013, 03:39:08 pm
How easy would it be to extend it or integrate either someone else's code into this or this into someone else's code?
Title: Re: RadLib
Post by: Radnen on March 16, 2013, 04:20:09 pm
Fairly easy. However, a lot of the namespaces are global. But, they all use closures, so none of their internal functions pollute the global scope. You just can't have an object called, 'Resources', or 'Audio' for example. But even if you did, so long as you load RadLib first, further classes would just overwrite earlier classes. So, in the long run, RadLib might not be so hard to work with anyways.

I didn't exactly design it to be very easy to integrate with other libraries though, because it was intended for Sphere rather than, say, the internet. Instead I tried making the library itself, or at least the GUI potion easily extendable. So I'm sure someone could adapt their library into this library easier than trying to get multiple libraries working simultaneously.

For example, suppose you have your own way of handling update and render scripts. One, you can decide to ignore the 'Game' class and handle them the way you normally do. Or two, you can use the Game.updates and Game.renders hook lists and hook into them the methods you use to handle the update and render scripts respectively.

Finally, instead of loading all of the radlib library you can cherry-pick portions out of it by requiring only the individual files. Files that rely on other files have redundant require scripts, so automatic dependency resolution is handled. Most things are self contained, however.

Test edit
Title: Re: RadLib
Post by: Mooch on April 17, 2013, 02:30:00 am
Does RadRPG contain RadMove? And if so, did you ever resolve the NPC movement problem RadMove had? As I recall, if you blocked an NPC's path, it would mess it up.
Title: Re: RadLib
Post by: Radnen on April 17, 2013, 03:43:39 am
You mean in RadLib? No, it doesn't currently have a tile based movement system. My older models were kinda cruddy. I intend to make a better tile movement system when I have the time (and then add it to RadAct). RadRpg has not been added yet to this newer iteration of RadLib.
Title: Re: RadLib
Post by: Mooch on April 18, 2013, 01:53:13 am
Alright, thanks.

I might try my hand at tile movement, just for the experience. I'll keep a lookout for yours, though.
Title: Re: RadLib
Post by: redspark on November 13, 2013, 04:47:04 pm
What kind of license is on your library, Radnen?  Thanks.
Title: Re: RadLib
Post by: Radnen on November 13, 2013, 07:38:44 pm
Hmm, it appears I didn't add a license. :P

Assume MIT/BSD styled license, so it's free of you to modify, edit, re-release it, just add me in the credits that's all. I didn't want a restrictive license since it's really geared for Sphere, so it's rare to see any gains from commercializing it or anything of that sort.

I would say public domain, but I want to make sure there's something about the fact the software is "as is", it's not complete and you might damage your game from using it incorrectly, that's all. :P
Title: Re: RadLib
Post by: redspark on November 14, 2013, 08:12:34 am
Thanks.