Search Unity

Use Wordpress as your game's database

Discussion in 'Assets and Asset Store' started by MrDude, Feb 17, 2014.

?

If I were to build the kits in order of preference, which kit would you like first?

  1. Friends system: Invite friends and see what they are playing. Include PM and chat services

    44.2%
  2. Online privacy: Protect your info select exactly who can see what

    16.3%
  3. Message boards system: Categories for author, clan leaders, groups personal

    18.6%
  4. Online market place: Trade with NPCs or real players. Includes gifting service

    36.0%
  5. Custom character system: Create a character in one game and take him into other games

    20.9%
  6. 2D narrative game template: Write a story, build a game in a day...

    12.8%
  7. Clan system: Access your friends arsenal during your own battles

    8.1%
  8. Wordpress Games portal: Display available games, sell them and show stats (ratings/reviews)

    25.6%
  9. Other: Please specify...

    5.8%
Multiple votes are allowed.
  1. BlankMauser

    BlankMauser

    Joined:
    Dec 10, 2013
    Posts:
    138
    This might be perfect for my project. Few questions...

    So my idea is to create a somewhat online experience in an RPG game where players can upload their character to the internet for others to use in their party. As well as pay real money for virtual cosmetic items.

    Another idea I had was time-sensitive events. Example I could announce "Today is 2x Experience day." on the wordpress, or hide event NPCs or rare items in different places depending on what I set on the site.

    Would this be possible?
     
  2. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hmmm... interesting thoughts... let's see...

    Players uploading new content to the game for others to use... That you would do with AssetStreaming and would not need Wordpress for except maybe as a means of announcing to people "This is now available". Currently your data is your alone and you can share global data with everyone, not limited by author or intended recipient. I.e. WUData is currently capable of storing data that everyone can see, yes, so if you want to upload BadAssTrucker and make it available to all people who play the game, then yes, that you can do! You will need to write your own code to actually upload the model and stream it to the player, of course, but you can use WUData to announce to everyone that "This character is now available.

    Also, notice item 5 on the poll. How I intend to make that work is using the Custom Character Kit. You can create your own character models and attachments and adornments etc and make as many parts and pieces as you like and the kit will allow you to assemble them into a custom character... Take Kaori, for instance (currently on sale, by the way. Buy the Custom Character Kit and get Kaori for free if you send me your invoice number).. She is one of my characters but making characters that are compatible with the system is soooo super simple so you can make any number of models for your game and plug them into this system.

    Now, the Custom Character Kit currently saves out a recipe for how to generate the character you built from scratch and each time you want to load that character, it gets build using that recipe. Super small, plain text. How that custom character plugin is going to work is it is going to allow you to save the character configuration you built to the website and then each game will have access to that recipe... Thus, you define the character in one game and simply load it back up again in another... Technically speaking you can do that already if you use the WUData kit with the Custom Character kit and with a bit of cleverness you can let users send their recipies to other players and have them save it and load them up on their end... The official kit will just give you a clean interface to do that with.

    I seem to be getting a lot of requests for being able to share data between friends, though... Perhaps I should get some feedback from you all as to what you want in the kits... So feel free, if you have any feature requests or something you would like to see in this project, feel free to share your thoughts and ideas and I can see what I can add to what kits for you :)

    Paying for virtual stuff, that you can do right now using myCreds. myCreds are a purely virtual currency but you can sell them for Real money on your website. So tell them to go buy it there, the game will see the updated balance and you can sell stuff using that balance. myCred allows you a HOST os payment methods to get currency from customers so perhaps look into that. Once I release my virtual mall kit you will be able to buy games, virtual content and virtual currency on the website, all of which ( besides the game of course ;) ) will be visible inside your game. So that functionality is coming.

    Time sensitive events... Most definitely. Remember, I just store data... what you do with it is up to you... So, simply generate a new category called Febuary30Event ... inside that category set the start date to 00:00:00 Febuary 29 and the end date 23:59:59 Febuary 31. Tell it to spawn MyBadTrucker at position 0,2,3 and save the entry. Next, update your "AllEvents" category with an entry for "Febuary30Event". Next, inside your game, load all game data. Extract AllEvents and loop through each entry. For each entry, check the dates, check the models, check the locations, do whatever else you want to do...

    WUData allows you to store the data for all clients to see so all you need to do is create a special "Admin" app or scene and use that to actually SET the events. Once it's set, all clients can see it. From there it is up to you what you want your game to do once it sees the event. So anything is possible there... :)

    Example:
    Code (csharp):
    1. void SetNewEvent()
    2. {
    3.     cmlData data = new cmlData();
    4.     data.Set("StartDate", "00:00:00 Feb 29");
    5.     data.Set("EndDate", "23:59:59 Feb 31");
    6.     data.Set("SpecialCharacter", "BadAsTrucker");
    7.     data.Set("position", Vector3(50f,20f, 999f).ToString());
    8.     data.Set("rotation", Quaternion.Identity.ToString());
    9.     data.Seti("XPMultiplier", 2);
    10.     WUData.UpdateCategory("February29Event", data);
    11.  
    12.     data = new cmlData();
    13.     data.Set("February29Event","");
    14.     WUData.UpdateCategory("AllEvents", data);
    15. }
    16.  
    17. void Start()
    18. {
    19.     WUData.FetchAllSharedGameData(parseResults);
    20. }
    21.  
    22. void ParseResults(CML data)
    23. {
    24.     cmlData events = data.FirstNodeOfType("AllEvents");
    25.     if (null != events)
    26.     {
    27.         foreach(string event in events.Keys)
    28.         {
    29.             cmlData eventDetails = data.FirstNodeOfType(event);
    30.             if (null != eventDetails)
    31.             {
    32.                 Transform character = (Transform)Resources.Load(eventDetails.String("SpecialCharacter"));
    33.                 character.positon = eventDetails.Vector("position");
    34.                 character.rotation = eventDetails.Quad("rotation");
    35.  
    36.                 //do something with XP multiplier:
    37.                 Debug.Log("XP multiplier is: " + eventDetails.Int("XPMultiplier");
    38.             }
    39.         }
    40.     }
    41. }
    42.  
    ...done! The first function is the one you would use in your Admin Scene to set the values. The rest is what the client would call to make use of the data. See? Simple :) Of course, the WUData kit does have some functions to simplify that a little more but I like to code in low level :p

    If you have any more questions, feel free to ask. My internet is a bit shady this weekend so I might not answer as fast as I would like but I'll definitely get back to you :)
     
    Last edited: Feb 20, 2015
  3. peanutgallery

    peanutgallery

    Joined:
    Oct 5, 2013
    Posts:
    35
    That's okay! I appreciate the fast response :)
    And I was the person who voted "Other" and this was the requested feature, so no need to track that down ;)

    Looking at the functionality, though, it still seems like it would be possible to get around. For example, let's say I always store data with a "Primary" field that is some sort of ID number. I would have to pull down all the data since it's all shared, but I could still sort through the data on the client and only show the data that had a specific ID tag associated with it, right?
     
  4. fidelsoto

    fidelsoto

    Joined:
    Aug 7, 2012
    Posts:
    87
    Hi, I need some tips on how to integrate the login system with my own GUI (uGUI) instead of using the prefab.
    I also have a few questions about the user data plugin before I buy it.
     
    Last edited: Feb 21, 2015
  5. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    No problems. Send me an email with your questions and I'll see what I can do to help. Support at mybadstudios.com. Be sure to include your invoice in your first contact, please.

    I was planning on releasing an update at some point and making it use UGUI by default but I simply haven't had the time. So yes, any questions, send em my way and I'll get back to you as soosn as I can :)
     
  6. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Okay, so I have sent the user a VERY, VERY detailed email to explain this but for the sake of anyone else who might want to know the same thing, allow me to give you the short, short version of the process required to convert this kit for UGUI...

    Firstly, all the code that makes up the Login kit has been placed in a single location: WULogin.cs
    All the code to create the login kit via OnGUI is placed in WULoginGUI.cs

    ...so to go from OnGUI to UGUI simply remove the WULoginGUI script from your project and replace it with one of your own that derives from WULogin and have your GUI's buttons call the functions I placed in WULogin. These are;
    Code (csharp):
    1.     public interface IWULogin
    2.     {
    3.         void RegisterAccount(cmlData fields);
    4.         void ResetPassword(cmlData fields);
    5.         void ChangePassword(cmlData fields);
    6.         void AttemptAutoLogin();
    7.         void LogOut();
    8.         void AttemptToLogin(cmlData fields);
    9.         void FetchPersonalInfo();
    10.         void UpdatePersonalInfo(cmlData fields);
    11.     }
    12.  
    Every time you contact the server it will send you a response wether it be a positive or negative one. These are delivered via events to you can hook up your code to respond to only the ones you want and do what you want to do in each event. For instance, with OnGUI I use a state machine to decide what window to draw on screen and upon getting a server response I change the state. With UGUI you will most probably have the windows created already and just call SetActive on the current one and the one you want to show next...

    And that is just about it...
    - Get rid of my WULoginGUI.cs script in your project
    - Create your own GUI script and subclass it from WULogin
    - Make it's buttons call the functions defined in WULogin.cs
     
  7. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    You ROCK! I was finally getting a little time to tinker with the asset and was coming here to inquire about converting to uGUI and if I should get rid of that script... lol Talk about timing! Already tested with your demo scene and both successfully logged in and registered a new user. Now I just need to do this conversion and then figure out how to change the other user information when creating a new user, mainly set default bbpress permission group so they have forum access. Is it safe to assume I can do that with UpdatePersonalInfo() since the data is part of the user table in wordpress?
     
  8. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    We are now in the last few hours of the sale...
    Lowest price this login kit will ever be...
    If you haven't bought your copy yet, now is the time to do so...
     
  9. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    And we are done. :D

    Thanks to everyone who supported me during the sale! It is much appreciated! :D
     
  10. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    And to say thank you once again... By popular demand, WULogin version 2.1 now comes with a UGUI prefab! Simply drag the new prefab into a canvas instead of dragging the old prefab into your scene and there you have it :) Enjoy :D

    Also, I have removed the WUProfileImage script as it is now completely redundant. WULogin now automatically fetches the gravatar if you select to fetch the email address during login so this is now part of the WULogin script and no longer needed externally...

    Please give it a test and let me know of any bugs you find. I have found that some times I get a white block covering a large part of my screen when everything is turned off. This seems to be a UGUI issue since the solution is to disable the Canvas itself and then turn it back on again... Luckily I haven't seen that in a while but be aware of this non the less...

    UGUIWindows.jpg
     
  11. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    OMG! Mr Dude, you literally (or figuratively?) ROCK!!! I have been watching this thread again (Unity 5's release inspired me to set aside time again to (yet again) get back to my game)... and... since I started playing with the new UGUI... this is like Xmas in March! Thank you!!! Did I mention you rock?! :D
     
  12. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    lol :D Thanks man! :D Glad to have made your day... :) I did just think of something I should mention, though! I currently have a DontDestroyOnLoad on the prefab but not on the canvas it has to be a child of... not quite sure yet how to handle this... I am thinking the best approach might be to comment out that DontDestroy and let it be re-created each time. After all, I store everything statically anyway so it shouldn't actually matter wether you destroy the object or not...

    Well, anyway, play with it a bit and drop me some feedback, please. Enjoy your Christmas. :D
     
    danreid70 likes this.
  13. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    Will be looking at this hopefully tonight. Just upgraded to new laptop and since I did that, I also freshly installed unity 5 (first time) on new, clean win8.1. So will be a good test of everything. Took all night to churn through my big project files from unity 4.6.2, so I'm trying out pretty much everything brand new and upgraded... Should be fun!
    I'm thinking I'll be parenting the login to my main GUI/HUD that already persists between scenes, so should be ok there.

    Will also probably have to update the Wordpress plugins on my site - I thought I'd already done that a bit ago but to be safe... Best way to do that is to uninstall the plugins from site completely and then install them again, correct? Settings tables should remain intact? I've created a few added "Creds" (resources points).

    Really liking what you're doing with online stores and beefed up Wordpress interfaces! I'll be picking up your new packs as they're released! awesome work, Mr Dude!!! It's amazing how powerful these systems are, and you've made them sooooo easy to implement!!! Again, thank you (I'm sure I speak for every one of your more than satisfied customers!!)
     
  14. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    The latest login update is a dream come true. I had started trying to switch from OnGui to uGUI and was having a ton of issues just getting through the workflow. With the new update, it has been pretty simple to take the existing gui from the included demo scene and just replace the included gui elements with one that I had purchased from Evil. Still going through that process, but everything is working like a charm so far.

    Thanks for the work you put into this MrDude. I'm looking forward to seeing what else you come up with and at some point plan on picking up the ecommerce stuff.
     
    danreid70 likes this.
  15. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    So glad to hear this is so well received! :D Thanks for all the kind words! It is really appreciated! :D Just remember them when you leave your reviews ( koff koff, hint hint koff koff ;) :p )

    @Shawn67 You are replacing the gui elements with something you purchased? I am interested to learn what this means,,, Are you trying to reskin the thing to look differently using a GUISkin package you got from the asset store or what are you doing? Could you maybe link me to the asset you purchased, please? This is the nice thing about ugui, right? How easily you can change the look! :D

    With this ugui prefab I added a background Image component to all the windows so you can easily change the theme/look of the system to fit your game. You can either do what I do and have one image for all screens to create a consistent look or you could make a custom background image per screen in case you want to put the login buttons in Jaws's mouth but have the in-game menu displayed inside the doors of Castle GreySkull.

    It's not much but at least it offers some level of customisation rather than forcing everyone to stare at a white box all the time and allows you to do so without needing to code anything. Like I said, it's not much, but it's something. I'd love to see how you guys mod this kit! Screenshots welcome, guys, screenshots welcome! :D :)
     
    danreid70 likes this.
  16. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    I have the two MMO & RPG skins for uGUI from Evil (https://www.assetstore.unity3d.com/en/#!/publisher/3533) as well as a couple of her other packages that are just PSD and images, no prefabs.

    Still a work in progress, but here is a current screenshot. Still have a lot to change as I get little bits and pieces of time to work on my project... Login.jpg

    It is simply a matter of dragging the sprites of the UI's atlas into the spots in the inspector to replace sprites that you have in the default UI. Also Evil has the free sprite packer asset if you are just using an art pack and need to convert the images to sprites..
     
    ActiveRigStudios and danreid70 like this.
  17. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    What a big difference such a small change makes, huh? :D It's looking real nice :D Thanks for sharing.
     
    danreid70 and BackwoodsGaming like this.
  18. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hey guys... There seems to be some kind of bug either in Unity or the Asset Store upload tool as I have found that the kit you download is not the same as what I upload. The version you get from the store has a number of bugs in them...

    First and foremost, almost all fonts in the prefab has been removed from the prefab. All size, position and location information remain in tact, but the actual font has been removed from the prefab.

    Secondly, and most worryingly, all text that I left exposed in the inspector for you to modify are now replaced with garbage. These two errors only occur in the UGUI prefabs with the former error happening in 4.6 and 5 while this second error only happens in Unity 5.

    The third error is the OnGUI prefab in Unity 5. All Rect values are set to 0,0,0,0, thereby breaking the prefab also until you manually recreate the rect sizes.

    For Unity 4.6 I'm afraid I don't have an answer other than for you to manually fix the fonts. I hope in the next patch version they will fix this issue. As for Unity 5, I downloaded the patch 1 version yesterday and that solves this issue completely. I would thus recommend you download patch 1 or the new patch 2 that released today to avoid any of these issues.

    If you are like me, however, and cannot download Unity again for the time being, here is a little shortcut to help you with the fonts at least.
    1. Open up the demo scene
    2. In the Hierarchy tab, type in Text
    3. Select everything that appears in the hierarchy by clicking on one and hitting CMD + A (mac) / CTRL + A (win)
    4. In the inspector, click on the circle next to the Font
    5. In the window that appears, double click on the Arial font
    6. Clear the search field in the Hierarchy
    7. In the Hierarchy, click on WULoginGUI
    8. In the inspector, wayyyy on top, click on Apply.

    To fix the garbage text, though, that is a bit more tricky... The error messages you can see by opening the script. I think the simplest way to fix that issue to make the variables private instead of public. That way Unity will get it's value from the values I set in script rather than from whatever it loaded in the prefab... In the fetch_meta_info field in the inspector, though, that you will need to set by hand to "nickname" (without the quotes).

    I must apologize to all of you for this annoying situation but unfortunately this is something outside my control. Please download the latest version of Unity at your earliest convenience and this issue will be resolved.

    Thank you for understanding
     
  19. ActiveRigStudios

    ActiveRigStudios

    Joined:
    Mar 7, 2015
    Posts:
    9
    @MrDude

    I have went through your entire thread! All my websites are WordPress.... Few questions.

    Does the Login and all other kits including the points system and woocommerce plugin to purchase credits etc work across all mobile devices?


    I seen your indiegogo campaign can I view your game demo in action? I didn't see a link on your campaign.

    Thanks
     
  20. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    I actually haven't tested the kit with the new WebGL build and will have to do so over the weekend when I get a chance. Apart from that, yeah it works on everything :)

    As for my indiegogo campaign... yeah, that is rather embarrassing :p It was my first attempt at crowdfunding and I realized I suck at it... The most feedback I got was from people asking ME for money to help me GET money... bloody heck, what is THAT all about? I think I had 8 companies contact me saying: "We love your campaign and think it will do excellent. Give us between $10 and $350 and we will make sure it does even better!" lol

    Anyway, the reason why you didn't see a link to that particular game is because beta access was one of the perks offered to supporters. I got no support for the project but i am still planning on making the game (complete with all the bonus stuff I wanted to add) just don't know when I'm gonna do that... Sometime in 2015, though :p

    If you are looking for a demo of the wordpress kits in action, though, that I can provide you... I'll be uploading the Hostage Negotiator demo over the weekend so keep an eye out for it. Unfortunately weekdays are reserved for earning a living and weekends are the only time I get to play with my kits, sorry... ;P But yeah, hang in there, almost there... ;)

    In fact, I can't believe I never uploaded a demo before now... what was I thinking? :O lol... Thanks for planting that seed in my head. Will make sure to upload it soonest. In the mean time, though, here is some screenshots of what it looks like...
    Screen Shot 2015-03-25 at 1.32.14 PM.jpg
    Screen Shot 2015-03-25 at 1.33.27 PM.jpg
    Of course, this demo combines a bunch of my products into one. Here is a shot of it using the Unity Dialogue Engine Advanced (complete with localization active with my native Afrikaans... just to be funny :p ) Afrikaans speaking Naruto fans will appreciate the humor :p ;)

    Enjoy

    Screen Shot 2015-03-25 at 10.18.49 PM.jpg
     
    Last edited: Mar 25, 2015
    ActiveRigStudios likes this.
  21. ActiveRigStudios

    ActiveRigStudios

    Joined:
    Mar 7, 2015
    Posts:
    9
    Looks GOOD!!

    I hear you about making a living during the weekdays I'm in the Same boat but I do get 5-6 hours a day after work to work on my projects.

    That's krazy people trying to get you to pay money when your trying to raise Money!! o_O That's insane!

    I have a exstensive back ground in SEO/Marketing maybe we can work something out. I'm just getting into unity about 3 months now and as I mentioned before I have about 10 websites online right now and ALL are WordPress.

    I have a Game Script I wrote maybe these kits will work well with it. I have to look into your kits a lil further. That's mainly why I want to see a demo.

    I'm thinking of a "Free To Play" monetization strategy. Will the Woocomnerce work with with selling items?

    Thanks
     
  22. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Nah, I make a living working in Unity. I spent 40 to 60 hours per week working on clients stuff and on weekends I work on my stuff (unless I do some more free overtime on their stuff). It's just discipline, is all... Monday to Friday, their stuff, weekends my own. When the contract is up then I can spend 7 das a week on my stuff :)

    Just to be perfectly clear on this, I think I should just once again highlight my vision for the WooCommerce thing...
    One thing I do NOT intend to do is to allow you to buy stuff from within Unity using all the various payment platforms you have setup on your website. No creating WooCommerce products and then showing PyPal login windows inside of Unity then do the back and forth with OAUTH handshaking and bla bla bla... That I have no intention of doing...

    What I intend to do is to allow you to buy content ON YOUR WEBSITE and make that content available inside Unity once you do. So if you have one of those kits that allow you to show a webpage inside your game then you can use that to load up your website and do it that way but me, I will require of you to do this transaction in a web browser and will then transfer that purchase to your game.

    Now this on it's own is a very limited and, honestly speaking, stupid approach to in-game purchasing, I admit and this is why this is not what I had envisioned for this system. My goal was to roll out my own virtual currency, similar to myCred, that you can use alongside or in stead of myCred. I will allow you to earn those credits in game andI will allow you to buy stuff from your website using those credits.

    So, you go to your website and you add 10 new items to your WooCommerce store. You open up Unity and you can buy those items using your virtual currency, that I manage on your website. With me so far? Now, you will also be able to sell that virtual currency as an item in your WooCommerce store so if a player needs 10,000 but only has 53, he does not have to grind his arse off to earn that, he can log in to his account via a web browser and buy the credits he needs.

    While he is there, though, he will also have the option of just buying the item(s) he/she wanted using his/her credit card/paypal/fastpay/bitcoins.whatever else you have setup.... So while on the website they can buy stuff for real money or they can buy credits they can spend in game.

    My plan was to make two separate currency systems.One local to each game and one global shared between all games. It will then be up to the developer to decide how much the global one is worth in terms the local one but this will allow you to sell a single currency on your website and letting players decide where they want to spend it in what game.Stuff you buy from the website will thus have up to 3 prices also: One for each currency and one for cash. Leave one out and it can't be bought for that currency. That simple.

    Next, when it comes to the auction house, that I was planning on running on virtual credits only. If a person wants to bid from the website he will have to buy the credits and bid with them. Credits are deducted immediately to make sure players can afford what they bid and when the auction closes, one's credits is transferred to the seller while all the other people gets theirs returned.

    This was how I perceived this system to work. So, to get to your question, in your store you can have real world products like t-shirts and coffee mugs that are not in-game items but I have devised a super easy way to distinguise between what can and cannot be sold in games. Also, when you create your product you need to specify what game the item is for (i.e. the RaceCar is for F1 Racing 2015, not UnrealTournament 2015) or wether it is a global item (i.e. a character that will be available in all games). As long as you are willing to sell them in game using my virtual currency, then you are good and yes, you can sell your WooCommerce store items that way.

    Or course, since I will allow for you to award credits from within Unity, you are not FORCED to tell people to go to a web browser to buy more credits. You can always implement Google Pay or AppStore items that you sell via Apple or Google or whoever and once you receive the receipt that the payment was successful you can simply call the kit to tell it "give this player this item" or "The player should get 1000 credits".

    From within Unity I give you full control over giving or taking credits. The only thing I don't allow you to do is spend real cash from within Unity using my system. From the website, sure, but not in game. For that you need to go through someone like Apple who is setup to deal with your player's money...

    Make sense?
     
  23. ActiveRigStudios

    ActiveRigStudios

    Joined:
    Mar 7, 2015
    Posts:
    9
    Yes your vision makes sense to me but it's not something I'm interested in. I didn't know about the stipulations. I will look into your WP Login,LeaderBoards etc. I'm going to develop my own F2P store with payment processing.

    But here's a idea for you. You can incorporate a CPA company that has a content locker that lets users earn virtual currency.

    Thanks
     
  24. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    All cool, bro. :) I made my kits to be standalone so people can buy only the modules they want and so that I could easily add more as time went on. Now if someone else wanted to create new modules that also plug into my system... hint hint... wink wink :D
     
    ActiveRigStudios likes this.
  25. ActiveRigStudios

    ActiveRigStudios

    Joined:
    Mar 7, 2015
    Posts:
    9
    I will show you what I make when I'm done.
     
    MrDude likes this.
  26. angie_c

    angie_c

    Joined:
    Apr 6, 2015
    Posts:
    6
    I am working on an app for a wp site that sells downoads of audio and video files. The WU Login seemed perfect for what I need until I read this thread. I'm looking for something that will allow my customers to download their purchases (bought from the website) onto their mobile devices. Since this is not a game app, it doesn't matter if the purchases are made on a pc, as long as they can download to the app.

    If the login is the same for the app and for the WP site, will they be able to access their purchases using your plug in?
     
  27. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    The login kit's purpose is to validate the identity of a person upon login and to keep track of who that person is while logged in. What you do from there is up to you.

    As it is, I have created a number of apps that do things like tracking scores or saving custom data etc etc etc but if you want to do something that I have not yet done then I'm afraid it can't be done until me or someone else [ read: you ] create that functionality. My kits will make sure WHO is logged in, your job will be to say WHAT they can do...

    To put it another way... You just bought a brand new PC and booted it up for the first time. You now call Microsoft and say "I just logged in using the username I created. Can I create music on this laptop now?" the answer is yes, if you have software that allows you to make music... or no if you do not. Just being able to load up Windows is not enough to do anything meaningful on it's own.

    Same here. I let you log in and authenticate who the person is and from there you can do anything you want...as long as you have the relevant plugin installed on your website and can interface with it from Unity. Does that make sense?

    One of the future kits I was planing on releasing, a customer actually made me see the light and realize that it would make life infinitely easier for me and make this entire system incredibly more useful to all of you if I first stopped and created a kit that will allow you to fetch and make posts from you website. Some interface to allow you to fetch any record(s) of any post type, standard or custom...

    Once that is released I believe it will be of immense help to you in what you are trying to do but unfortunately I have not started on that yet and I can foresee a number of tricky parts to that kit that will most likely delay it for a while...

    So I would say the functionality you are looking for is something that you will need in addition to my kits but, while I am going to release something that will aid you greatly, that is not going to come any time soon...

    In your particular case the problem is this:
    When they make the purchase, the data is stored somewhere. I am going to assume it is stored via a custom post type as that is common practice with Wordpress. My kit will authenticate the person and get the person's Wordpress account ID number... but from there it has no idea where you stored your data or how to fetch it. You would somehow need to tell your website '"Hey, this is the person, look in so and such a place for this and that content then send me back a list of only this and so and such info". That is a very specific thing as you can imagine and not something I support yet.

    I hope that answers your question?
    Sorry this answers couldn't be of a more positive nature.
     
    Last edited: Apr 6, 2015
  28. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    Hello MrDude

    Nice looking asset. If I was to get the WUL standalone, would I be able to get the gamedata asset at a later date for it? Or do I have to get the core too?
     
  29. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi there

    The simple, quick answer: Yes.

    Now, the full answer:
    Many of my kits, not just the WP stuff, share the same code base. Each time you install two of my kits, the one overwrites some of the files of the other. If the app you install last was released before the one you installed first, there is the chance that the files that get overwritten now miss some or other function and now your entire project is not able to compile until you re-install the kit that was released last. If you happen to love my work and you have 8 or 10 or 20 of my kits in your project, finding the one that was released last is going to be a pain...

    The alternative is that each time I update the core files, I resubmit all my apps and force you to download all of them again wether they are 5Mb or 500Mb... just cause I added a comment or something small...

    Enter, the third option. MBSCore.
    MBSCore is the files that I share between my kits. If you buy this and install this first then all the kits that share code will all always have the latest, up to date version on their shared data. This means that I release all my kits in 2 versions: Standalone for people who don;t want to install 2 kits to use my work, and then the core version which is exactly the same kit but minus the files found in core.

    (p.s. MBSCore is a product in its own right also. It contains stuff that I believe no project should be without. State machines, runtime typed variable generation, game load/save system, inventory, state machines and more...)

    People who buy MBSCore can then buy all my other kits in the Core version and save $10 on each kit they buy. Currently spending $5 on buying core means you save $10 on WULogin and $10 on the custom character kit and (as soon as it gets approved) $10 on the Unity Dialogue Engine Advanced. Te turn based battle kit will be getting a core version after the Unity 5 update also, saving you $10 there also...

    So Standalone and Core versions are exactly the same product, except the Core versions do not include all the files to make the kit work. They require the MBSCore installed first. In exchange for this minor inconvenience, I give people $10 discount on each and every single last core product I create.

    So THAT is what Core is, actually. Now, WULogin Core requires Core, but the WUData kit only requires WULogin so it doesn't matter what version of WULogin you have, WUData will work, as long as WULogin works.

    Make sense? :)
    Personally, I honestly don't get why everybody don't buy the core version... It just makes sense... Well, to me anyway :p
     
    Last edited: Apr 6, 2015
  30. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    It does thanks. Going to pickup WULogin right now :)

    [edit] bought!

    My company builds wordpress websites as a daily task so getting this for our game websites makes sense! Also impressed with the dedication you show in your assets.
     
    Last edited: Apr 6, 2015
    MrDude likes this.
  31. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Great! :)
    Enjoy ! :D
     
  32. angie_c

    angie_c

    Joined:
    Apr 6, 2015
    Posts:
    6
    Thanks so much, Mr Dude, for such a thorough reply!

    I now know what needs to be done and will be using WU Login to do it :)
     
  33. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Thanks man. Appreciate the thumbs up :D

    @angle_c
    If you have any other questions, feel free to ask. :)
     
  34. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    HI MrDude

    I purchased your asset but unfortunately had this issue. So i reinstalled the newest unity5 - 5.0.0.p3 and redownloaded your assset, and still had the issue. i.e missing fonts at the start, which i fixed as you suggested. But when i try your demo field (putting in my domain url, and ticking online) i do get the login screen first time, but after logging in nothing else is shown just a blank screen.

    then when i run the scene again, im auto logged in (even when making sure auto login is unticked) and get the blank screen. I notice even when unchecking auto login when you run the scene it actually auto ticks it.

    not sure what to do..
     
  35. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi Phillip

    Yeah, unfortunately I also noticed this thing still happens even in the newer unity versions. I have submitted bug report and other developers have done also. We are now just waiting for this to get fixed...

    Now, on to your issue...
    The RememberMe... yeah... I am not sure if that should be called a bug or not... See, the first time you tick "Remember Me" during runtime, that value is stored in PlayerPrefs. If that value is found then autologin takes place in future. It really is a runtime boolean, not a pubic field. So if you turn it off in the editor, it is still set in PlayerPrefs and the stored PlayerPref determines the value, not you... I think that sums it up best. It's a runtime boolean and me showing it to you in the inspector is a mistake... What I should actually do is make it a property and not show it in the inspector at all. I will make a note of that. Sorry for the confusion

    As for the blank screen, that might actually be a good thing as it means the login worked. If you want to verify, open up WUUGLoginGUI.cs and find this:
    Code (csharp):
    1.         virtual public void OnLoggedIn(CML _data)
    Then add this as the first line inside the function:
    Code (csharp):
    1.         Debug.Log (_data.ToString());
    Now run the game again and notice the output in the console. If all went well then you should see your data being displayed in there.

    Now, how this system works is like this... It basically runs in a sandbox and takes care of all the login stuff within itself. Once it successfully logs in to the site,it will send out an event to that event so what you need to do is create your own script and tell it to wait for that event to happen and when it does, do whatever it is you want to do.

    If you look in the demo scene you will notice I created a script that shows a button that brings the in-game menu up again. Basically, for your own projects you just have to do the same. Here is a skeleton script to demonstrate this to you:
    Code (csharp):
    1.  
    2. public class myClass : MonoBehaviour
    3. {
    4.     void Start()
    5.     {
    6.         WULogin.onLoggedIn = RunMyCustomCode;
    7.     }
    8.  
    9.     void RunMyCustomCode(CML login_data)
    10.     {
    11.         Debug.Log(login_data.ToString());
    12.         Application.LoadLevel("MainMenu");
    13.     }
    14. }
    15.  
    Here is what my config looks like for my demo app. As you can see, I have online turned off and this means I am using the offline url. Give the above info a try. Make sure to tick the Online box in the scene's prefab, not on the "global" one. As you may or may not know, once you changed a value in the scene, even if you change it back, it doesn't matter.It will always ignore the main prefab's settings and use what you set in the scene. Anyway, make sure the online is ticked in the scene and then add that line of code to that function of paste this above code into a new script that you attach to anything in the scene.

    :p Obviously, make sure you have a scene called "MainMenu" to load also :p
    If you are still having any problems, shoot me an email and I'll see how I can help get you up and running asap.

    Good luck
    Screen Shot 2015-04-09 at 10.46.37 AM.jpg
     
    Last edited: Apr 9, 2015
  36. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    Hi MrDude

    Yes its because I am logged in.

    lay_name]P*****
    [user_email]P*****
    [user_url]http://www.P*****
    [user_registered]2015-04-08 14:38:15
    [roles]administrator
    [status]0

    UnityEngine.Debug:Log(Object)
    MBS.WUUGLoginGUI:OnLoggedIn(CML) (at Assets/myBad Studios/WUSS/Scripts/Login/uGUI/WUUGLoginGUI.cs:336)
    <CallServer>c__Iterator2:MoveNext() (at Assets/myBad Studios/WUSS/Scripts/Login/WPServer.cs:162)

    but the post display screen doesnt show.
     
  37. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    yes thats in,

    when i run the scene, cos im already logged in (as per your PM) the login screen appears for a second then vanishes. i then expect to see the post login screen but it doesnt appear, empty game scene
     
  38. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Just posting an update for others who are following along.

    IronOxide wanted slightly different behavior than the expected use case scenario but we managed to get him up and running with a few minor code changes. :)
     
    shaneK001 and Iron-Oxide like this.
  39. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    P.s. after that long description explaining what the MBSCore product actually is, I thought I should mention that the UnityDialogue Engine for MBSCore was released today. It works exactly the same as the existing version except it costs $10 less because it uses Core.

    Now, the clever people out there will have done the math and realized that if the full version of any of my kits also include the core kit then it means they can skip buying core and just buy the cheaper versions of my other kits as long as they install whichever standalone kit they bought...

    Well, that is not entirely true since each standalone kit contains only the files it shares with other kits... so for example the UDEA does not make use of state machines and so it doesn't include the state machine code from core... In fact, it only uses one file from MBSCore and I give people $10 discount because that 1 file was removed from the kit... Nice guy, huh? :p However, in some cases this is still true... The missing file from UDEA Core is in fact included in the WULogin Standalone so anyone who bought the WULogin Standalone can now buy the UDEA Core version as long as they always install WULogin into the same project. Buy core and be sure. Buy a standalone kit and it's gamble wether other core kits will work or not... but they might ;)

    So anyway, that was what I was getting at. If you buy core for $5 first, then you would get WULogin and the UDEA for $10 discount each, saving you $20 and you still get exactly the same kits plus a few extra scripts. And of course, my other kits go for cheaper also so the more kits I release, the more you save, if only you spent that $5 in the first instance...

    This is why I keep recommending people go for the core versions but for some reason that I don't get, they still prefer the standalone versions... Either way, it's all good. :) Just wanted to mention that another of my core kits got released today, is all.
     
  40. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Right, now on to other news...

    I am about to announce a free giveaway of a future Wordpress kit on my Facebook page.
    I will be requiring you to go there and like my page and share it with the world... :p

    5 people who like my page will become my beta testers of the new kit... Good luck!

    http://www.tinyurl.com/mybadfacebook
     
    Last edited: Apr 12, 2015
  41. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    People will always be confused imo, no matter how many times you explain. You should have 1 version per kit.

    Anyway, yes thanks for your help. The WULogin standalone is fantastic, and with the amends you helped me with to get it working the way I want is perfect. Also helping me get my old head around it is very easy to customise. I'll rate your kit shortly on the asset store. I'll certainly be buying more of your kits, whichever version it is :)
     
  42. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Thanks for the kind words, mate. I value reviews greatly so I appreciate each one I get :) Thanks again

    As for the core... I would love to have ONLY the core versions but unfortunately sales sucked till I started to release the standalone versions. The way I look at it is one of two things:
    1. Those people have no interest in any of my other kits, so why install 2 kits when you can install 1?
    2. People are just different and each wants what they want.

    I don't judge. I just give em what they want and as long as they are happy, I am happy... and get a review now and then ;) lol

    I have that promotion up on my page now so I am quite curious to see if anyone takes me up on it... Only time will tell :p Become my beta tester now and get a free full copy when it gets released. 5 copies up for grabs
     
  43. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    I did under NetConneXions. I have also posted your page on my Twitter feed (hundreds of game developers following me).

    @playhorde
     
  44. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Yeah, I noticed your like coming through while I was busy typing up the promo. Help me out, was it you I spoke to recently who said he wanted this kit? Or do I have you mixed up with someone else?
     
  45. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    Someone else..but I want this kit for my game Blank.
     
  46. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    Hey MrDude! :) Long time no post (from me, that is... :) ).
    Finally hunkering down a bit and started trying to set up some tie-ins from my game into my WordPress site using WUData. I am using the latest versions of plugins, in Unity and in WordPress site - I'm able to push data up to the site and view it in that sweet plugin you set up to view WUData data on the admin section of WordPress site. VERY slick! The one issue I'm having is: I can't seem to get the CML data to parse when I read it from WordPress back into Unity... When I turn the data ToString - I can see it's there in the debug console... But not seeming to be able to parse it as variables back in from CML data -- if you try out my code below (well, or just skim it and see if I'm doing something stupidly wrong?) you'll see what I mean -- I keep getting "No Data Found" log, so you can see where it's skipping out of my loop... Help Me Obi-Wan-Mr-Dude! :)

    --LOVING this system, by the way! I found a cool Inventory asset that I've also been toying with, and requested that the developer try to get in touch with you to see about tying his Inventory data saving system into your WUData -- thought that might be like adding chocolate and peanutbutter and getting a frikken awesome Reeses peanutbutter cup out of the deal! :) An in game inventory system with all the bells-and-whistles, storing user inventory on a WordPress site with all the bells-and-whistles you already have in place... omg. :) Anyway... below is my soooooooo close to working code:

    Code (csharp):
    1. //c#
    2. using UnityEngine;
    3. using System.Collections;
    4. using System.Collections.Generic;
    5. using MBS;
    6.  
    7. public class NavSectors : MonoBehaviour {
    8.     // Use this for initialization
    9.     public bool setSectors = false;
    10.     public Vector3 v3 = Vector3.zero;
    11.     void SetNewSectorsSample()
    12.     {
    13.         for(int i=0;i<10;i++){
    14.             Debug.Log ("Setting Sector" + i);
    15.             cmlData data = new cmlData();
    16.             data.Set("Name", "Sector"+i);
    17.             data.Set("Scene", "sector-void");
    18.             data.Set("ClaimedBy", "Unknown");
    19.             data.Set("Position", v3.ToString ());
    20.             data.Set("Color", "Black");
    21.             //data.Set("rotation", Quaternion.Identity.ToString());
    22.             //data.Seti("JumpRange", 2);
    23.             //data.Seti("Resources", 999);
    24.             WUData.UpdateSharedCategory("Sector"+i, data);
    25.  
    26.             data = new cmlData();
    27.             data.Set ("Sector" + i, "");
    28.             WUData.UpdateSharedCategory("AllSectors", data);
    29.         }
    30.     }
    31.  
    32.     void Start()
    33.     {
    34.         WULogin.onLoggedIn += InitializeDataRetrieval;
    35.     }
    36.  
    37.     void InitializeDataRetrieval(object data) {
    38.         Debug.Log ("InitializeDataRetrieval");
    39.         if (setSectors) {
    40.             SetNewSectorsSample();
    41.         }
    42.         WUData.FetchAllSharedInfo (ParseResults);
    43.     }
    44.    
    45.     void ParseResults(CML data)
    46.     {
    47.         Debug.Log (data.ToString ());
    48.         cmlData sectors = data.GetFirstNodeOfType ("AllSectors");
    49.         if (null != sectors) {
    50.             foreach (string sector in sectors.Keys) {
    51.                 cmlData sectorDetails = data.GetFirstNodeOfType (sector);
    52.                 Debug.Log (sector.Length);
    53.                 if (null != sectorDetails) {
    54.                     //Transform character = (Transform)Resources.Load(eventDetails.String("SpecialCharacter"));
    55.                     //character.positon = eventDetails.Vector("position");
    56.                     //character.rotation = eventDetails.Quad("rotation");
    57.                     Debug.Log ("Sector Name: " + sectorDetails.String ("Name"));
    58.                     Debug.Log ("Sector Position: " + sectorDetails.Vector ("Position"));
    59.                 } else {
    60.                     Debug.Log ("No Sector Data Found...");
    61.                 }
    62.             }
    63.         } else {
    64.             Debug.Log ("No Data Found...");
    65.         }
    66.     }
    67. }
    68.  
     
  47. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    danreid70 just reminded me of something I've been meaning to bring to people's attention for a while now... If you have ever looked at the function listing at the top of the CML.cs file you will have noticed there are quite a few filtering options available to you when searching through your data. One thing you might not have picked up on is a single function that melts away among the sea of other functions available to you... but this is a function that can be super useful in your projects and deserves special mention.... The function is called DataWithField

    Code (csharp):
    1.     virtual public List<cmlData> DataWithField(string field, string val = "")
    It might look very inconspicuous but it is quite a powerful little function that one... In the case of the WUData kit, each node that is returned is always of type _CATEGORY_ and as such all those lovely little functions like FirstDataOfType() or Children() ... they are all useless to you because all the nodes are of the same type... now what? and that is where that function shines! :D

    But first, let me give you a few practical use case scenarios:

    First, say you have a bunch of Nodes all called "Item". All "Items" have cost and quantity but you know that only food has a field called "EatResult". If you now want to create a store that sells food items you can easily find all food "items" by fetching a list of all Items that contain the field "EatResult"by doing this:
    Code (csharp):
    1. List<cmlData> food = allData.DataWithField("EatResult");
    A second feature of this function is finding nodes that contain a specific field AND that has a specified value. Again, say you keep all your game's items under a single "item" node type but you want to sell collectible items and food and weapons and clothing and whatever else in separate parts of your store, you could simply add a "type" field to your "item" and then search for items by type value...

    Example data file:
    Code (csharp):
    1. //myItems.txt
    2. <All Items>
    3.     <item> name=Heal Litanny; type=potion; heal=50; percentage=true
    4.     <item> name=Phoenix Down; type=potion; heal=25; percentage=true; revive=true
    5.     <item> name=Golem; type=gargoyle; defense=2000
    6.     <item> name=Sword of Kremlin; type=weapon; race=human; att=300; def=233
    7.     <item> name=Bread; type=food; heal=10
    Now say you want to find all "potions" from that list of "item"s you just go:
    Code (csharp):
    1. CML AllItems = new CML("MyItems");
    2. List<cmlData> potions = AllItems.DataWithField("type", "potion");
    3.  
    ...it is just one of the many filtering options CML offers but it is a function I think might easily be overlooked. It has saved my bacon on a number of occasions so I thought I'd give it special mention. It is of particular use with the WUData kit if you don't want to use the functions in WUData.cs but want to work with CML directly instead (like I usually do :p)

    Hope this has been informative :D
     
    Last edited: Apr 12, 2015
  48. shaneK001

    shaneK001

    Joined:
    Dec 15, 2012
    Posts:
    33
    Hello! I'm trying to do a web build but can't seem to save data. I can login and load the data, but I can't seem to write it. It works perfect in an exe build, but not in a web build. Before I rebuild something basic to test, is there something I might be messing up with on the wordpress end or with my browser security settings?
     
  49. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    No,. There was a bug in an earlier version, though, so just make sure you are using the latest version of the kit on your website and just to play it safe, in your code, each time you call a WUData function, be sure to include the WULogin.GameID field in the functions's GameId field.

    However, if it's working in one build then it means the unity end is fine so just make sure you have the latest version up on your website.

    Also, just verify you have the crossdomain.xml in your domain's root folder. If it's web related only then that is the first thing that comes to mind, usually.
     
    shaneK001 likes this.
  50. shaneK001

    shaneK001

    Joined:
    Dec 15, 2012
    Posts:
    33
    Cool, I'll check that stuff out. Thank you MrDude!