• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

141 Neutral

About Drathis

  • Rank
  1. After you understand OO, you should try functional programming too. Not all languages support it properly, but you can usually manage, even with Java. Learning functional programming will help make your code more maintainable and bug free, even if you use OO. The best part is that you can mix and match OO and FP(though some people think OO and FP are mortal enemies. IMO they are wrong)
  2. I feel paranoid about taking programming/CS classes

    That is the fear of failure and it is not just limited to school. You just have to get over it. Just look what was the result when you failed the last time. You learned that stuff anyway and you can just retake the course. You lost almost nothing.
  3. Can I avoid the hassle of these IDE's?

    [quote name='Krik' timestamp='1342632849' post='4960562'] If it is possible to use a text editor and a compiler to do C++, please I'll read a 10,000 page tutorial over keep on fighting these IDE's. It would seem to me it's possible, just most rely on the IDE to take care of certain things that could likely be done fairly simply in one's code or with an additional library file. [/quote] The reason you hate the C++ IDE's is that you haven't read that 10 000 page tutorial that explains how C++ compilation works. You don't yet know why you have to jump so many loops in an IDE, but you have to set up those same things on the command line and it's even harder. You just don't know what you are doing but learning to do it by hand could actually be a great learning experience. You would learn why you have to do the things you do in IDE. Last time I programmed C++(years ago) I had to pray I would get the right settings and libraries and it would still work on other computers too. C++ is complicated and I didn't have time to learn everything about compiling and linking with C++. I wasn't using an IDE either. It's not the IDE's, it's the language(or it's compilation model).
  4. One thing that irks me is that gamers demand longer and longer singleplayer campaigns. But I'd rather take an 8 hour long excellent campaign than 20 hour good campaign. I might not even finish the longer campaign because I get bored, but you can be sure that I will play the excellent campaign multiple times. There are so many excellent games nowadays that I don't have time to play long games that are just good. You just wasted millions in dollars in development if majority of players won't bother to finish the game, no matter how good it is. Quality over quantity any time*! * Obviously withing limits
  5. [quote name='sunandshadow' timestamp='1321140286' post='4883311'] In addition to any of that, that the article specifically mentions open-world games, which run contradictory to the cultural preference for well-defined goals that can be seen in jRPGs. Japanese entertainment in general tends to have stronger storytelling which expects more attention span and maturity from its intended audience than western entertainment aimed at the same age group; this is most clearly seen in the fact that Western TV and comics are often episodic, while Japanese TV and manga are rarely so. [/quote] But there is a reason for that. If your show is serialized, you can't just start watching it middle of the season and know what's going on. Though serialized provides more story line, it is more inconvenient. Just heard of the amazing TV show Game of thrones? But it is already on episode 6? Too bad, you can't watch it anymore.
  6. How to use SnakeYAML in Java

    You are right, the zip doesn't contain the jar archive for whatever reason(???). Fortunately you can download the jar from central maven repo: http://repo2.maven.org/maven2/org/yaml/snakeyaml/1.9/snakeyaml-1.9.jar
  7. saving arrays to a database

    You seem to be so new to SQL that I have to recommend that first you read up on how to use SQL databases. You can check out w3schools for example: [url="http://www.w3schools.com/sql/default.asp"]http://www.w3schools.com/sql/default.asp[/url] Once you have grasped how databases work you should have no problem solving your problem by yourself. The reason I'm not giving a complete example is because I don't think you understand how databases work and it is better that you learn it first.
  8. Looking for some "best practices" advice

    To simplify things, try to think OOP as something you do to reduce complexity and duplication. With complexity you can start simply by reducing the number of if and switch clauses. Many times the you reduce code duplication at the same time. Using weapons as example, you might have something like this: [code] // the code might look like Java, sorry void shootPlayersGun(){ if(reloadSeconds == 0 && (gun == PISTOL || gun == SHOTGUN || gun == SMG)){ if(gun == PISTOL){ reloadSeconds = 0.5; createBullet(); bullets--; } else if(gun == SMG) reloadSeconds = 0.1 createBullet(); bullets--; } else if(gun == SHOTGUN) reloadSeconds = 1; createBullet(); createBullet(); createBullet(); shells--; } } else if(heatPercent < 100 && (gun == BEAMWEAPON || gun == FLAMETHROWER)){ heatPercent++; if(gun == BEAMWEAPON){ createBeam(); } else if (gun == FLAMETHROWER){ createFlame(); fuel--; } } }[/code] Now if you have a 10 weapons you are going to have really long if and it would become more and more complicated. If you define a weapon interface you can reduce this to: [code] player.weapon.fire() [/code] Now you can put all your weapon code in different weapon classes that implement the weapon interface and you don't have to wonder what code is associated with you beam weapons and so on. You don't have as many if's so your code is less complicated. To create a new weapon you just create a new weapon class and put your code there. At this point you can also start using inheritance, composition and other OOP stuff to start reducing code duplication too. You might not have less lines of code but this less duplication means smaller chances of bugs and when you fix a bug in one place it gets fixed everywhere. In C++ I guess you could use completely abstract classes to define an interface.
  9. A planet made of diamonds!

    If it was a planet made of sex, it would take about 2 years to advance the technology enough to get there. Diamonds are not valuable enough.
  10. To goto or not to goto?

    [quote name='smasherprog' timestamp='1312692331' post='4845662'] [quote name='alvaro' timestamp='1312691317' post='4845658'] I guess I am a heretic, but I use goto in other situations that haven't been mentioned here. The most common is something like this: [code]for (int i=0; i<n; ++i) { switch (some_array[i]) { case 0: //... break; case 1: if (some_condition()) i=n;// DONE!!! break; //... } } //...[/code] [/quote] [/quote] Now you are just avoiding goto for the sake of avoiding goto. You didn't improve readability at all.
  11. [quote name='Antheus' timestamp='1312061078' post='4842638'] [quote name='Drathis' timestamp='1312056456' post='4842618'] It's a commercial entity retaliating with something totally different than democracy and freedom. This is happening in Norway after those words were said. The words have no meaning now. I don't care if it wasn't the government, it's still the Norwegian people doing this. [/quote] Towards the end of 90s I worked in aviation, mostly developing custom software for development of paragliders and ultralights and such. During that time, paragliding was in boom. Everyone was doing it. People without their own could rent on the spot. Accident rate was X%. But with very large number of people doing it, the absolute numbers rose exponentially (due to exponential number of people). So, EU steps in and slaps all kinds of regulation on *manufacture* of parachutes. It wasn't technical problems, inexperienced people multiplied by mass caused accidents. In under a year, hundreds of manufacturers had to close shop - the cost and effort needed to obtain the certification was simply too much for them. What was left was effectively one single manufacturer. Over the next two years paragliding stopped being a fad and numbers decreased, leading to low accident rates. So, big success. Meanwhile, the pros in the industry stuck with manufacturers they knew were good. Not because of regulation, but because they had to choose who they will risk their life for. So, the handful, instead of producing certified products, instead went into "for personal use" which avoided that problem. The serious market was already self-regulating and has remained such. It's important to understand the impact of policy vs. self-regulation, regardless of why the latter happens. Game sales fall under publishing and that is big business. Lobbysts will use anything since there is potentially a lot of money at stake, just like with music licensing or the movie ratings. In this given example, market will decide if it supports it. But what one definitely doesn't want is governments to get involved, because nothing good will come out of that. [/quote] This was totally not the point. I get what government regulation is and it doesn't always work, no need for analogies here. I'm disappointed because this is a knee jerk reaction by Norwegians, even though it wasn't the government.
  12. What Would YOU Like To See In Today's Games?

    Constant storytelling. Don't make me kill dudes for an hour in a random cool place and afterwards vaguely tie it to the story. In both starcraft and freespace 2 the story was told between the missions and [b]during[/b] the missions. I hate the feeling that level designers made the level first and afterwards it was made to fit into the story.
  13. [quote name='Antheus' timestamp='1312053185' post='4842604'] [quote name='Drathis' timestamp='1312035107' post='4842530'] They said they would retaliate with more democracy and freedom... Good job. [/quote] This is a retailer, a commercial entity., not a policy nor does it have any more to do with democracy than the banker's right to 25% bonus increase. And it is effectively a freedom of choice. In the same way Wal Mart doesn't carry sexual toys (or does it?), while they likely carry contraceptives and condoms. Society accepts what is acceptable and games, sooner or later, will become subject to availability, which will likely reduce the general offering, just like certain products are limited to certain types of retailers. A knee-jerk reaction here would be instant ban on sales of such games enforced by government. And a retailer pulling out is a good step into direction of self-regulation. It can serve as example in industry and weakens the need towards government policies. The moral ground here is much more important due to increased digital distribution. If stores stop selling boxed products it has no effect on availability. But if a policy is established, it will apply to everything and could trivially apply to digital downloads as well. [/quote] It's a commercial entity retaliating with something totally different than democracy and freedom. This is happening in Norway after those words were said. The words have no meaning now. I don't care if it wasn't the government, it's still the Norwegian people doing this.
  14. They said they would retaliate with more democracy and freedom... Good job.

    [quote name='Tiner' timestamp='1311704403' post='4840711'] OKAY!!!! I hate to say this but fps games suck. Every fps game I've played from CoD to the Crysis and ... [/quote] I'm really happy for you and I'mma let you finish, but rpg's are the worst games of all time. THE WORST GAMES OF ALL TIMES!
  • Advertisement