Jump to content
  • Advertisement

Kakyo

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

278 Neutral

About Kakyo

  • Rank
    Newbie
  1. As others mentioned he "sealed" keyword is meant to *prevent* inheritance.   what you might wanna do is the "abstract" keyword, that do not let the base class be instantiated.   so, let's say you have this code: public abstract class BaseClass  { }  public class ChildClass : BaseClass {} the we have : public void SomeMethod() {      new BaseClass(); // compile error     new ChildClass(); // totally fine. } Also, you might be tring to hide the class from external sources.   you could mess around with *protected*, *internal* and *private*. But with classes in namespace level, you will have some restrictions (and I advise to research a little bit about those first =D ) And, by your code, classes inside another class is one thing I don't like very much
  2. Hello Joeb,   i guess now i got what you mean, haha.   you might be using the wrong function    JSON.stringify : converts a JS object into a text file. JSON.parse : converts a text file into a JS object.   Watch out for typos in the text file, one wrongly placed quote can be annoying to find out. BTW you can "test" you json in this site : jsoneditoronline.org it'll help you finding possible typos and show you the resulting Text/Object (depending which one you want)     The main reason for having the json is : "Separation of concerns". Yes, you can write the entire data into JS, but also Blizzard could code WoW into one file. However , this creates a hell of a code to maintain and this is a receipt to disaster.   so the goal of having the JSON is that the *actual data* is in one side and *how to use* this data is in another side.   Another good point is, you could "stream" you json *during* the gameplay, so the player loads only what is needed.  let's say, for example, you have 1000 locations, if you code all those into one file, this would have, let's say, 100mb. now you got a handful of problems to deal with :   - you are increasing the time your user has to wait to *start* playing your game, possibly by several minutes (maybe hours, who knows)  - the user will be downloading places that he might not even go yet.  - your server will crawl to provide data to everyone.   and finally , and usually the main reason why you should probably do it : Team Work this allow other people in your team to create toons of locations (maybe inside a separate tool) , while you go writing other parts of the code.   The list of advantages go on, but i'll stop here - text wall already.. lol Learning how to use it, might not be *as useful* right now for this small project, but the concepts certainly will be crucial later on.       EDIT : i didn't see your edit before i post this answer, so let me address that part : yes it's totally feasible. you only need to change the strings in the constructor to the parsed json variable. var parsedJSON = JSON.parse(<content of text file here>); for loop { location[i] = new Location(id, parsedJSON.Name, parsedJson.Desc, parsedJson.choices); }
  3. Hi Joeb,   as this looks like homework, i'll stay very simplistic in the explanation, to allow you some research.   well, for Json parsing you can use JSON.parse() & JSON.stringify(), so you don't need to worry about the "parsing" part of you assignment. Unless your teacher specifically asked to manually parse it, which can become a quite huge topic.   about the "search in json" part, you have 2 ways of doing it (there are more ways of doing it, but i guess those are simple enough for your task) 1). if you json is *not* yet parsed , you can use any text search mechanism, like indexOf(). 2). if you already parsed your json, you can loop through the object properties with Object.keys().   Now, for the "without store it in JS again", i didn't get what you mean. The Json, being it text or object, will be loaded into JS to be manipulated.   Hope that helps,  Good luck      EDIT :  just some notes about the methods i say - the JSON.parse/stringify are safe to use as all major/updated browser supports it. - however watch out for indexOf as some browsers do not support it very well - Object.keys is defined in ECMAScript5, which pretty much all major/updated browser already support 
  4. Kakyo

    RPG, Engines and Frustration

    Well, i'm pretty much on the same boat as you.. and one resource have made me move a LOT faster. And I also find it very VERY well explained https://handmadehero.org/ https://www.youtube.com/user/handmadeheroarchive   It's a guy streaming the programming of *every single thing* (using C/C++) to create a game, by he's definition, very inspired in Zelda. while you'll have to spend a freaking amount of time to catch up (by the time of this post, ep173 with *at least* 1h each), i guess it's a freaking good series.     EDIT : besides this go "against" you desire to use an engine , i guess you could watch it in parallel to other learning projects. This is what i'm doing now, "fast" projects in unity, to learn a few things, and a different project to go along with the series
  5. Hi LeoLoon ,   I create this account just the give you an answer, and I was very much in a similar position as you are now. Before I went to university I dreamed about become a GameDev, and I even make some fun things with RPG Maker, however today I am a "Software Developer" (yep, that's right, not game dev :P) I'm from Brazil and when i was choosing my course at the university, there was no specific game-related course and I had *no ideia* about the game market over here, but "games" are softwares and i took the closest course i could find .   I don't have the insight about the "global game market" the explain the minimal details of a lot of things, but i'll try to answer your questions.   *Can I work on other country where I can received good salary as a game programmer even If I will go to college in the Philippines? Don't make your choices based on "how much you will earn". If you do what you enjoy, what makes you happy, what gives you pleasure, you will become good at it and you will eventually find a way to earn money doing it (look the e-sports championship, people earn money *playing* games!) With that said, yes, you can work for companies that'll pay you a good salary. Or you can take a chance and try to open you own studio, on you own country, and show to the rest of the world the ideas that came from there. Look at Chroma Squad and Toren (games from Brazil \o/ ) and Never Alone (a game from Alaska), those games were made outside huge companies, by people like you and me, and today they are being played from all around the world and people are liking it!   I think Philippine Education is nothing if you compare it to other University on more developed countries. I feel like the fact that I came and studied in the Philippines will have an impact on the way companies will think of my skills. Maybe yes, maybe no. This will tell more about the company that you are trying to join than about yourself. Brazil also don't have a good education and even tho, today i work for a US company. It's not the college who creates a good/bad student. It's the person itself that do not let obstacles and excuses getting in the way of what you want to learn. And let me tell you one thing : Programming is NOT easy, you can be proud of yourself already!    *Why does games from our country doesn't go well? this is a pretty big topic and very well talked in the below article. It's from a guy in Turkey with similar problems to you!  http://www.gamasutra.com/blogs/BurakTezateser/20150413/240998/The_Problems_of_Weak_Game_Industry_Ecosystems.php   *Should I just give up and find something new? No, no, no..no..no.. I never see "giving up" as option. It'll certainly be hard and thank God it's hard, otherwise any dumb person could do it and we would not have any fun from "creating our own beast". You may take different paths than a lot of people, but if you keep trying, eventually you will get where you want to be.   Thomas Edison tried more than a thousand times to create the "Lamp" and when asked about "why so many tries?" he answered : "I learned more than one thousand times of how NOT to create it."   you can read this : https://www.reddit.com/r/getdisciplined/comments/1q96b5/i_just_dont_care_about_myself/cdah4af It's a motivational topic (about life in general) but i read this article almost every month. It's just amazing!    *What college course do I need to take? Just like me, you may not find a specific game-related course, but you can look for "close enough" courses. Any programming course can lead you to "game programming" and any design course can lead you to "game design". Seriously, in the future you may even find people from Law background programming games/softwares, it's a very rich and funny environment.    You may also not take a course at all , but it will be a harder path . The courses will never make you an expert in anything, they will only show you the "not so hard" path and, mainly, allow you to meet other people with the same goals as you.   What if I just try and learn from books and tutorials THIS. This is so HUGE that i let it to the end. It doesn't matter what course you do, what background you have, which country did you came from.  The desire to learn, to do, to understand it's what is really needed. No course in the world can teach you this. i'm in the 6-to-7 years of programming and I still learn from books and tutorials and they teach better then college. Putting what I learn in practice, trying it, is how I can evolve from where the book left me and how i can came up with better solutions for my specific challenges (ones that weren't in any books). You said that you know Html, Java, Flash and drawing. You, sir, already have the desire to learn! Keep feeding it and you will move mountains.     Best wishes on your journey.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!