Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

(Tutorial) Making Achievements for your OHRRPGCE game.

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade
View previous topic :: View next topic  
Author Message
FyreWulff
Still Jaded




Joined: 02 Apr 2005
Posts: 406
Location: The Internet

PostPosted: Wed Mar 10, 2010 1:47 am    Post subject: (Tutorial) Making Achievements for your OHRRPGCE game. Reply with quote

update 4/10/2010 5:25am CST: Added bits about linking the menus together.

This tutorial assumes you have a general idea of what Xbox / Steam Achievements and PS3 Trophies are.


While playing your favorite Steam/Xbox/PS3 title, you might wanted to have achievements for your own OHRRPGCE game. But it isn't that hard, and it's actually not that scary to do.

I'm going to walk you through 3 versions:

*A basic achievements system with no plotscripting
*A little more complicated achievements with no plotscripting
*A fancy achievements system with plotscripting.

You can download an example .RPG to follow along, if you wish.


Basic Achievements, No Plotscripting

Thanks to the update that allowed custom menus, you no longer need plotscripting to make your own. We're going to make the achievements system using the custom menus feature.

Open up the menu editor from the main menu.



By default, a game will always have a menu '0'. This is the main menu of the game. Press the right arrow key to add a new menu.



Start adding new menu options to your brand new menu. Make sure they are set to type "Caption". These are your achievements, so name them accordingly.



Keep going until you have all the achievements you want! Have a look over your completed list.



Now, we need a way to show that they are 'achieved' or not. We will accomplish this with tags. Go to the tag name editor and name yourself some tags for the achievements to make it easier to work with.



Now go back to the menu editor. Set each menu item to only be enabled if their matching tag is on, like so:



Now we need to add the actual Achievements menu to the main menu. Go to the main menu (0) and then select Edit Items..



Now add a new item, name it "Achievements", then set it's type to "2 Go To Menu". Set the Subtype to 1 (The subtype for this option is the number of the menu you want it to go to).



Save and exit CUSTOM.

If you go and boot up the game now, this is what your achievements submenu should look like:



Now, time to go hook up ways to unlock these achievements!

Since we're not using plotscripting, we're going to use textboxes to turn the tags on (and NPCs to trigger those textboxes).

Time to write up your text box.



Now go and open up the conditionals menu, and set it to always turn the achievement tag on.



Then go attach that textbox to an NPC, as usual.



Now load up your game and talk to the NPC!



Note that it would be a nice courtesy to have the textbox say "Achievement Unlocked" or "Achievement Awarded" or "Accomplishment Granted" or something like that to entice people to check the menu to see that they got it.

Once the tag has been set, it'll be lit up:



Homework to do with the example .RPG file

- Add a new achievement using the menu editor.
- Add a tag name for the new achievement.
- Write a textbox for the achievement and have it set the achievement's tag.
- Create a new NPC to award this achievement.

- Make textboxes and award the existing achievements in the RPG file.

Tommorow: Fancier achievements with no plotscripting! Day 3: Achievements with plotscripting.
Back to top
View user's profile Send private message Visit poster's website AIM Address
binoal




Joined: 20 Jun 2009
Posts: 123
Location: My Own Little World

PostPosted: Wed Mar 10, 2010 9:40 am    Post subject: Reply with quote

This seems like it could be a hamster wheel feature!
_________________
Resident Evil RPG Demo

http://www.castleparadox.com/gamelist-display.php?game=963

Legend Of Zelda: Reptilian Warlord Demo

http://www.castleparadox.com/gamelist-display.php?game=961
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
FyreWulff
Still Jaded




Joined: 02 Apr 2005
Posts: 406
Location: The Internet

PostPosted: Wed Mar 10, 2010 10:20 pm    Post subject: Reply with quote

Part 2 is on hold for a moment while I clarify with TMC on if there is a bug or not.

Otherwise I'll just have to move forward to the plotscripting version tommorow.

edit: confirmed as a bug or just a bad implementation of how textboxes and menus interact, so I guess I'll just have to go ahead with the plotscripted one tommorow.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Thu Mar 11, 2010 10:28 am    Post subject: Reply with quote

I like this article.

I did something similar for the Abilities menu in Bell of Chaos.


FyreWulff wrote:
edit: confirmed as a bug or just a bad implementation of how textboxes and menus interact, so I guess I'll just have to go ahead with the plotscripted one tommorow.


What was the bug? Was it the annoying fact that text boxes always open up behind menus?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
FyreWulff
Still Jaded




Joined: 02 Apr 2005
Posts: 406
Location: The Internet

PostPosted: Fri Mar 12, 2010 4:44 am    Post subject: Reply with quote

James Paige wrote:
I like this article.

I did something similar for the Abilities menu in Bell of Chaos.


FyreWulff wrote:
edit: confirmed as a bug or just a bad implementation of how textboxes and menus interact, so I guess I'll just have to go ahead with the plotscripted one tommorow.


What was the bug? Was it the annoying fact that text boxes always open up behind menus?


I was going to show how you could add descriptions for the achievements by having the menu items pop up textboxes. Well, I did, and when you press space to dismiss the textbox, it activates the menu option again. So, perpetual textbox.

Also the fact that if a menu option brings up a textbox, you can use the arrow keys to change the menu selection and get out of the menu with the textbox still up.

The plotscripting post might be slightly delayed, I have to finish building a computer today which means I'll be out and about for most of the day.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Fri Mar 12, 2010 1:19 pm    Post subject: Reply with quote

Two ways around that problem:

1. Have the menu close when an item is selected. Have the menu reopen after a textbox.

2. Write a script to continually display a textbox based on the currently selected menu item. Crystal Chasers does this with the Jobs menu (the textbox# is encoded as a menu item extra).
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
FyreWulff
Still Jaded




Joined: 02 Apr 2005
Posts: 406
Location: The Internet

PostPosted: Sat Mar 13, 2010 3:59 pm    Post subject: Reply with quote

2 will be covered in the last part. The point of part 2 was to make it fancier without plotscripting.. so a plotscripting fix would be outside of it's bounds.

A bitset for "menu close on select" could be a good idea too
Back to top
View user's profile Send private message Visit poster's website AIM Address
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Sat Mar 13, 2010 5:57 pm    Post subject: Reply with quote

There's already a bitset to close the menu when an item is selected (it's an item bitset, not a menu bitset). Or were you referring to something else?
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
chronoboy
Into the past with a splash




Joined: 04 Jun 2010
Posts: 162
Location: Canada

PostPosted: Sat Oct 02, 2010 1:48 pm    Post subject: Reply with quote

I was just thinking about such a feature, but I was thinking along the lines of using SDL_net library to actually store the obtained achievements on some sort of online server.

For the most part, there is no point of adding achievements into a game unless you can show off to your friends what you did. Facebook is a great example of how social games work.

I was thinking along the lines of an entirely new menu option in CUSTOM.EXE which one could call "Achievements" or something with a nice hamster name to it. In here, one would create them. All in all, they would be very similar to tags and how that work, but after one is obtained, it would contact say a CastleParadox.com PHP script to submit the achievement. From CastleParadox on your users' profile, you could see which OHR games that person has been playing and which achievements they have obtained. Perhaps a share/connect with facebook option would be neat as well.

If we don't use SDL_net for multiplayer ability, how about lets use it like most single player X360 games use it, for the sole purpose of storing achievements on an online server.

Of course, the player would have the choice to opt'd out. When GAME.EXE is run, it will check for a ONLINE.INI file, which would contain the default server/keyhex. The keyhex could simply be a hash of the users' castleparadox username and password along with some salt for security. The SQL database on castleparadox could simply be:

TABLE (key VARCHAR(33), user VARCHAR(40), etc...)

One would enable the feature in their castleparadox profile to use this feature, and when enabled, it will provide the user with an INI file to download to their OHR directory.

I am quiet sure FreeBasic has simple HTTP libraries to make queries to HTTP servers. For the most part making this work should not be that much of a task and in the end would enhance the engine and make it more socialable on these forums.

I am sure there are other ways, perhaps even more simpler than this to add such a feature.
_________________
Current project: Chronoboy Adventures

Website: http://www.chronoboy.com/
Back to top
View user's profile Send private message Visit poster's website
Sparoku
Pyrithea Amethyst.




Joined: 02 Feb 2004
Posts: 467
Location: Washington State

PostPosted: Sun Oct 03, 2010 2:17 am    Post subject: Reply with quote

Interesting concept. It could prove quite useful for side quest logs as well.
_________________
"There will always be people who will tell you they hate what you made, or like what you made, and will tell you that what you did was wrong or right."
My Discord ID: SparDanger#0305
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Newbie_Power




Joined: 04 Sep 2006
Posts: 1762

PostPosted: Sun Oct 03, 2010 1:30 pm    Post subject: Reply with quote

Quote:
For the most part, there is no point of adding achievements into a game unless you can show off to your friends what you did. Facebook is a great example of how social games work.
On the other hand, while I normally don't care for achievements myself, they're pretty harmless to add, and can be used to give the player an idea on what they could try to do in a game that they wouldn't normally do.

Of course, this is often screwed up and instead we have achievements for doing what they would do anyway like "Beat Level 1", "Kill 10 enemies using this type of gun".
_________________

TheGiz> Am I the only one who likes to imagine that Elijah Wood's character in Back to the Future 2, the kid at the Wild Gunman machine in the Cafe 80's, is some future descendant of the AVGN?
Back to top
View user's profile Send private message
chronoboy
Into the past with a splash




Joined: 04 Jun 2010
Posts: 162
Location: Canada

PostPosted: Mon Oct 04, 2010 12:48 pm    Post subject: Reply with quote

Newbie_Power wrote:
Of course, this is often screwed up and instead we have achievements for doing what they would do anyway like "Beat Level 1", "Kill 10 enemies using this type of gun".

Very true, there are too many Xbox/PS3 games that have achievements just like that.

Then you see some very creative ones too, ones that have descriptions which don't even make since until you finally get the achievement. imao
_________________
Current project: Chronoboy Adventures

Website: http://www.chronoboy.com/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group