This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
elfin8er's profile picture

[WIP] CC Adventure Game

Started by elfin8er, 20 April 2013 - 06:04 AM
elfin8er #1
Posted 20 April 2013 - 08:04 AM
Not sure how many of these types of adventure games are out yet. Ones where you can move around in a large world, and interact with items. That's what I eventually want this game to be. Currently, I have basic login and register, as well as basic movement.

Originally I wanted to make this thing multiplayer. Players could interact with each other, and help each other in battles. Players could also buy, sell, and trade to and from other players. However, as I started coding it, I noticed it was very easily hackable. Someone could easily modify game's code, to easily modify anyone's game file. Players could then make themselves over powered, and make the game not fun for other users. At least in the Single Player version, if a player wants to cheat, they're not ruining for others. Eventually, I would love to make this game multiplayer, but just not yet.

I'm sort of learning lua as I go, so some things may not be done as well as they should be. This is a huge learning experience for me. I may run into many dips when programming it, but hopefully I can get some neat features in the game.

Features
  • Movement between rooms (N, S, E, W)
  • Login as a guest to play (anyone can login as you if they know your username)
  • Login to your minecraft account to play (requires your minecraft password, but should be secure. Pretty much done).
  • Player Creation
  • Look Command (Shows the name and description of the room you're in)
  • Player Stats (Currently only HP, MP and ATK)
  • /help command (Not finished)
  • Two Classes (Mage, and Warrior)
  • Some colors
Todo
  • Add More Features
  • Make a program that easily creates rooms for the game. (Possible in the future, allow anyone to submit rooms to be added the game).
  • Make installation automatic
  • Make Class Gui Look A Bit Better
  • Make Player Input not case sensitive
  • Add More Color
  • Make players age effect stat rolls
  • Fix Bugs
Installation:
Type "pastebin get Q7Yutxef startup" on any computer. The program will update itself (if any updates are available) and then run the program when it's finished.

I could use a lot of help with this if anyone is willing. If you've got any suggestions for improving the code, or if you want to send me some code that I could use, please do so. Also, post any questions you may have here as well.
superaxander #2
Posted 20 April 2013 - 08:08 AM
Pretty cool maybe make an installer?
elfin8er #3
Posted 20 April 2013 - 08:09 AM
Pretty cool maybe make an installer?
Yup, that's something I really want to work on next.
superaxander #4
Posted 20 April 2013 - 08:13 AM
Don't overwrite the error function just change it too err
elfin8er #5
Posted 20 April 2013 - 08:18 AM
Don't overwrite the error function just change it too err
Thanks! What is the error function anyway?
superaxander #6
Posted 20 April 2013 - 08:20 AM
You can raise an error with it documentation(http://www.lua.org/manual/5.1/manual.html#pdf-error)
elfin8er #7
Posted 20 April 2013 - 08:23 AM
You can raise an error with it documentation(http://www.lua.org/m....html#pdf-error)
Ahh. Thanks.
superaxander #8
Posted 20 April 2013 - 08:41 AM
No problem :)/>
elfin8er #9
Posted 20 April 2013 - 10:26 AM
Update:

Changelog:
  • New installation instructions:
    • Type "pastebin get Q7Yutxef startup" on any computer.
  • Updated Minecraft Login
    • The correct error is shown for Bad Login and Account Migrated
    • Non-premium accounts should work
    • Still have to play around with some code for it the minecraft servers are down. Any suggestions?
  • Fixed typo
elfin8er #10
Posted 20 April 2013 - 10:41 AM
Sorry about the errors in the update. Everything is fixed now. Just run the installer again, and it should fix itself.
Symmetryc #11
Posted 20 April 2013 - 12:50 PM
Woah, this is really cool! I haven't run the code yet, but looking through it, it looks pretty well-made! I also love the OP :)/>.

Edit: Quick suggestion, you might want to make it so that you can create CC Adventure Accounts that you can use to login as a player for those who don't want to be a guest but also don't feel comfortable using their Minecraft Account.
elfin8er #12
Posted 20 April 2013 - 11:11 PM
Woah, this is really cool! I haven't run the code yet, but looking through it, it looks pretty well-made! I also love the OP :)/>/>.

Edit: Quick suggestion, you might want to make it so that you can create CC Adventure Accounts that you can use to login as a player for those who don't want to be a guest but also don't feel comfortable using their Minecraft Account.
Thanks for the good feedback! I wanted to originally make accounts for the game, but I'm not up on my MySQL, and don't know how I'd encrypt the password. Maybe someday, but until then I figured this would work.
theoriginalbit #13
Posted 20 April 2013 - 11:20 PM
Looks very nice! Can't wait for it to be finished.

You can raise an error with it documentation(http://www.lua.org/m....html#pdf-error)
Naw was thinking that you were gunna link my tutorial :P/>
elfin8er #14
Posted 21 April 2013 - 12:00 AM
Looks very nice! Can't wait for it to be finished.

You can raise an error with it documentation(http://www.lua.org/m....html#pdf-error)
Naw was thinking that you were gunna link my tutorial :P/>
I could use a link to this tutorial if you don't mind!
theoriginalbit #15
Posted 21 April 2013 - 12:06 AM
I could use a link to this tutorial if you don't mind!
Its the 'My Tutorials' link in my signature, the first section "Handling Errors, Creating Controlled Errors, Creating a BSoD"
superaxander #16
Posted 21 April 2013 - 12:27 AM
Looks very nice! Can't wait for it to be finished.

You can raise an error with it documentation(http://www.lua.org/m....html#pdf-error)
Naw was thinking that you were gunna link my tutorial :P/>
Well it was just to explain what the error function itself did :P/>
theoriginalbit #17
Posted 21 April 2013 - 12:32 AM
Well it was just to explain what the error function itself did :P/>
True, I was joking tho. need to start putting /sarcasm again
superaxander #18
Posted 21 April 2013 - 12:35 AM
Or
Mr. Sarcasm said:
Well it was just to explain what the error function itself did :P/>
elfin8er #19
Posted 21 April 2013 - 01:52 PM
Currently attempting to write a simple items system. So far so good.
elfin8er #20
Posted 21 April 2013 - 03:17 PM
Update:
Note: The installer has been updated. It is an important update, so please reinstall the installer/updater.
Note: Player files are not compatible with the previous version.

Changelog:
  • Updated the installation/update file (pastebin get Q7Yutxef startup)
    • Before, the previous file wasn't being deleted before the update.
  • Added info to the /help command
    • ​I just added each command, and a quick overview of what they do.
    • After you're done viewing the help page, you can just type in other commands
  • Added /player command
    • Shows some quick information about that player that is not displayed on the stats bar
  • Added /inventory command
    • Shows the players current inventory
  • Added very simple item system
    • The player starts out with a couple of items (Will change when items are obtainable)
    • The items don't currently do anything. I'm not sure how exactly I'm going to make the items interactive. I may have to hold off on the items system until I can think of a way to do them.