Skip to main content

News

Topic: RadLib (Read 8688 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
RadLib
Hey guys, I'm going to introduce you to a new a powerful game creation library for sphere called radlib!



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
  • Last Edit: March 16, 2013, 02:26:42 am by Radnen
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: RadLib
Reply #1
How easy would it be to extend it or integrate either someone else's code into this or this into someone else's code?

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: RadLib
Reply #2
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
  • Last Edit: April 10, 2013, 09:48:14 pm by Radnen
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Mooch
  • [*][*][*]
Re: RadLib
Reply #3
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.

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: RadLib
Reply #4
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.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Mooch
  • [*][*][*]
Re: RadLib
Reply #5
Alright, thanks.

I might try my hand at tile movement, just for the experience. I'll keep a lookout for yours, though.

Re: RadLib
Reply #6
What kind of license is on your library, Radnen?  Thanks.

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: RadLib
Reply #7
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
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

Re: RadLib
Reply #8
Thanks.