3 Replies - 2489 Views - Last Post: 27 February 2011 - 04:41 PM Rate Topic: -----

#1 tpgames  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 24-February 11

Inventory system for RPG in JS

Posted 24 February 2011 - 04:07 PM

I'm asking this because I did do a google search and a search of this forum and did not find what I was looking for. Either my search terms were all wrong (wouldn't be the first!), or an inventory system for RPG games in JS doesn't exist, and why I couldn't find a sample code to look at, or tutorial.

What I'd really like to find is anything that could help me begin to understand how to write an inventory system for a RPG in JS. Names of JS topics I should read, links to things I should read or search terms I should use are all useful. I'm not asking for someone to write this for me. I'll post code help after I get something up. I did find a JS shopping cart that sends data to your email (using Perl). I'd just like more resources that uses more current language rules.

Thanks! :bigsmile: :scooter:

ps. The RPG is being made in such a way that small parts of it will work by itself, independently from the other parts, but that down the road all the parts can be brought together seamlessly to make one big RPG. This is NOT a mmorpg at this point (see me in 7 yrs, then we'll discuss mmorpg's). ;) Yes, I'm writing this online, and do have an image map working with JS. And no, down the road I would not use JS to make a MMORPG. I'd learn C++ first, and learn it well.

edit: changed 'right' to 'write'. :P

This post has been edited by tpgames: 24 February 2011 - 04:09 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Inventory system for RPG in JS

#2 Fib  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 161
  • View blog
  • Posts: 554
  • Joined: 12-March 09

Re: Inventory system for RPG in JS

Posted 25 February 2011 - 09:19 AM

It really depends on what kind of inventory system you want. Is it just going to be a list of item names(like an old final fantasy game), a grid where item images can be placed and moved around (like diablo 2)?

What part(s) are you having trouble with?
Was This Post Helpful? 0
  • +
  • -

#3 tpgames  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 24-February 11

Re: Inventory system for RPG in JS

Posted 25 February 2011 - 12:22 PM

View PostFib, on 25 February 2011 - 09:19 AM, said:

It really depends on what kind of inventory system you want. Is it just going to be a list of item names(like an old final fantasy game), a grid where item images can be placed and moved around (like diablo 2)?

What part(s) are you having trouble with?



Its more like Diablo 2. I'd have each item automatically post to the correct inventory page, but then allow the player to put those items in any order they wish.

So, what topics should I be reading? My search terms have been "RPG"+"inventory"+"source code"+"gaming" (or "games"). And, I was adding in "JS" but took that out when I wasn't finding anything. :lol: I realize that 'drag and drop' will be necessary for part of the code to allow the player to rearrange things. Its the other part of the code I'm confused on. Thanks!
Was This Post Helpful? 0
  • +
  • -

#4 tpgames  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 24-February 11

Re: Inventory system for RPG in JS

Posted 27 February 2011 - 04:41 PM

Here's the answer:
If you want it like diablo2, then you obviously need to read up on "drag and drop" support.

Functions are key, as it turns out. Also, it helps to familiarize yourself with JS libraries. All this I found today when I changed my search terms to "JS Application cookbook" and remembered prototype.js existed. This, in turn, led me to Ajax apps. LOL

Lastly, for the "payment options", cookies are key as we don't want a real payment made and are trying to avoid server-side perl scripts for now.

Can we say Nobody writes RPG's in JS? ROFL Yea, well... this JS RPG is only a mockup of the real McCoy thats waiting for me to learn C++. It'll be functional, but won't have all the nifty features that C++ would give me. Its sole purpose is to teach me the basics of functions, object oriented programming, cookies, etc.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1