Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Is it possible that I just simply lack the required intelligence?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
12 replies to this topic

#1 cooljava50544   Members   -  Reputation: 126

Like
1Likes
Like

Posted 12 August 2014 - 07:20 PM

I've been trying to use JMonkey Engine 3.0 to develop a simple tower defense game. I am only using cubes, and you select on a tower and press c to give it ammo. The bullets are just simple lines. There are so many problems in my code. I've been studying a java for about 8 months, and I am starting to feel discouraged. I'm actually following an exercise from my book, and I am confused as heck. The reason why I say that is because I can't seem to figure out how to debug my code. There's stupid stuff like when the cube-shaped enemy reaches the base, and it's z position is less than zero it will disappear, but it doesn't. I've been stuck on this for days.

 

Could I get any friendly and honest advice? Thanks biggrin.png



Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 6189

Like
12Likes
Like

Posted 12 August 2014 - 08:22 PM

I've been trying to use JMonkey Engine 3.0 to develop a simple tower defense game. I am only using cubes, and you select on a tower and press c to give it ammo. The bullets are just simple lines. There are so many problems in my code. I've been studying a java for about 8 months, and I am starting to feel discouraged. I'm actually following an exercise from my book, and I am confused as heck. The reason why I say that is because I can't seem to figure out how to debug my code. There's stupid stuff like when the cube-shaped enemy reaches the base, and it's z position is less than zero it will disappear, but it doesn't. I've been stuck on this for days.
 
Could I get any friendly and honest advice? Thanks biggrin.png


First of all, no you do not lack the required intelligence, 8 months is no time at all when it comes to programming and there really is no such thing as a "simple tower defense game" (Its not normally the type of game we would recommend for beginners due to the complexity involved).

I would recommend getting familiar with whatever debugger your IDE includes (here is a guide for eclipse: http://www.vogella.com/tutorials/EclipseDebugging/article.html ).

If you still struggle you could post the relevant code here and ask for more specific advice.
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#3 cooljava50544   Members   -  Reputation: 126

Like
0Likes
Like

Posted 12 August 2014 - 08:26 PM

 

I've been trying to use JMonkey Engine 3.0 to develop a simple tower defense game. I am only using cubes, and you select on a tower and press c to give it ammo. The bullets are just simple lines. There are so many problems in my code. I've been studying a java for about 8 months, and I am starting to feel discouraged. I'm actually following an exercise from my book, and I am confused as heck. The reason why I say that is because I can't seem to figure out how to debug my code. There's stupid stuff like when the cube-shaped enemy reaches the base, and it's z position is less than zero it will disappear, but it doesn't. I've been stuck on this for days.
 
Could I get any friendly and honest advice? Thanks biggrin.png


First of all, no you do not lack the required intelligence, 8 months is no time at all when it comes to programming and there really is no such thing as a "simple tower defense game" (Its not normally the type of game we would recommend for beginners due to the complexity involved).

I would recommend getting familiar with whatever debugger your IDE includes (here is a guide for eclipse: http://www.vogella.com/tutorials/EclipseDebugging/article.html ).

If you still struggle you could post the relevant code here and ask for more specific advice.

 

I believe pretty much everything is screwed up. Should I just post all of my written code? And thanks for making me feel better :D



#4 SimonForsman   Crossbones+   -  Reputation: 6189

Like
10Likes
Like

Posted 12 August 2014 - 08:39 PM

I've been trying to use JMonkey Engine 3.0 to develop a simple tower defense game. I am only using cubes, and you select on a tower and press c to give it ammo. The bullets are just simple lines. There are so many problems in my code. I've been studying a java for about 8 months, and I am starting to feel discouraged. I'm actually following an exercise from my book, and I am confused as heck. The reason why I say that is because I can't seem to figure out how to debug my code. There's stupid stuff like when the cube-shaped enemy reaches the base, and it's z position is less than zero it will disappear, but it doesn't. I've been stuck on this for days.
 
Could I get any friendly and honest advice? Thanks biggrin.png


First of all, no you do not lack the required intelligence, 8 months is no time at all when it comes to programming and there really is no such thing as a "simple tower defense game" (Its not normally the type of game we would recommend for beginners due to the complexity involved).

I would recommend getting familiar with whatever debugger your IDE includes (here is a guide for eclipse: http://www.vogella.com/tutorials/EclipseDebugging/article.html ).

If you still struggle you could post the relevant code here and ask for more specific advice.

I believe pretty much everything is screwed up. Should I just post all of my written code? And thanks for making me feel better biggrin.png


Its probably best if you only post the classes / methods that you are having trouble with as more people will be able/willing to help if they don't have to read through massive amounts of code first, (You could put a zip with your full code on some online filehost and link to it aswell though if you want people to be able to help you debug things)
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#5 Gian-Reto   Members   -  Reputation: 1428

Like
6Likes
Like

Posted 13 August 2014 - 01:36 AM

With programming, its not about intelligence but more about patience and expierience, and finding help / solutions.

 

Of course problem solving will be easier for mister brainiac, but even his genious brain will not achieve much on his own. Even he will have to ask fellow programmers or big brother google from time to time when he certainly will get stuck on a problem. He could brood over it for years and maybe find a solution thanks to his incredible intelligence... or he asks other people that might have come across it and solve it in days.

 

 

Point is: if you get stuck, and really tried everything you could, google it, ask on forums, sleep over it, do something else for some time... in no particular order other than googling before asking on forums.

 

 

Now, debugging. Best thing is to use a debugger (as already pointed out), given you develop in IDE (Eclipse, Netbeans, whatever), you will have one built in. You can also find Java Debuggers on the net standalone AFAIK.

Next best thing, though uglier, is to build in debug log statements. Frameworks like log4j or similar will make it easy for you to print out strings to console, but define a log level. This way you can print out something with the DEBUG log level, which will be activated by default during development, but switched off for your final build.



#6 georger.araujo   Members   -  Reputation: 821

Like
4Likes
Like

Posted 13 August 2014 - 05:21 AM

I believe pretty much everything is screwed up. Should I just post all of my written code? And thanks for making me feel better biggrin.png

 

Saying that "pretty much everything is screwed up" is too vague and unspecific. As the others have pointed out, carefully debug your code, figure out exactly where things behave different than what you had in mind, and fix the bugs. If you don't know how to debug, learn it ASAP - more than a useful skill to have, you absolutely *need* it in order to improve.

 

Posting code is fine *after* you've done all you can to fix it on your own, otherwise it's just trying to outsource the debugging to somebody else.

 

And don't give up.



#7 Zot   Members   -  Reputation: 134

Like
2Likes
Like

Posted 13 August 2014 - 06:31 AM

Like the above, you need to be able to debug the code, and use break points.
You simply put a break point on the code that checks the position, and when the square is near the correct position you can single step through the code and see what's happening with your variables.
If you have no debugger, then you'll have find out how to use one, because it is the tool you need.
Making you code neat and readable, with decent variable names helps a lot as well.

#8 Waterlimon   Crossbones+   -  Reputation: 2602

Like
1Likes
Like

Posted 13 August 2014 - 07:07 AM

Also, when you find mistakes in your code, think if theres anything you can change in the way you code stuff to avoid similar mistakes in the future.
The whole point of many language features and coding practises is to prevention bugs and keep everything simple, so focus on that.

o3o


#9 burtybob   Members   -  Reputation: 316

Like
0Likes
Like

Posted 13 August 2014 - 08:19 AM

Everything that everyone has said is so true.

Every good IDE has a debugger built in and as a programmer that debugger is your best friend, so many times I've been struggling with bugs at work in code that *looks* or "feels" right until you are stepping through and seeing that blasted int of 3 should actually be a float of 3.12 and that's throwing this calculation off.  Once you have learnt how to use a debugger you will hate every moment that you have to test or replicate an issue/problem without one. (E.G. deploying to customers' sites where a debugger isn't available)

Practice - another huge thing. I've been coding/programming (PHP to start, Java, C#, C++ (a little)) for 11 years and even now I look back at code I wrote as little as 6months ago and think what the hell was I thinking but at the time that the was the best way *I* knew how but in the time since I've learnt better practices, styles and even better ways to use the language I'm developing in but it takes TIME and PATIENCE to learn.



#10 SeanMiddleditch   Members   -  Reputation: 6466

Like
2Likes
Like

Posted 13 August 2014 - 09:06 AM

I've been studying a java for about 8 months, and I am starting to feel discouraged.


It takes many students 4 years of dedicated study in a university to barely be able to qualify for a decent internship or entry-level job in the games industry.

If learning to program where all that easy, everyone would do it and we'd all be making minimum wage. Learning any skill requires the same process: persevere, practice constantly, and don't be afraid to ask for help when you're stuck. smile.png

#11 Gian-Reto   Members   -  Reputation: 1428

Like
0Likes
Like

Posted 13 August 2014 - 11:26 PM

It takes many students 4 years of dedicated study in a university to barely be able to qualify for a decent internship or entry-level job in the games industry.

If learning to program where all that easy, everyone would do it and we'd all be making minimum wage. Learning any skill requires the same process: persevere, practice constantly, and don't be afraid to ask for help when you're stuck. smile.png

 

Yes, that is important too.

 

Speaking from my own expierience, I did an apprenticeship as Programmer before going to study CS. My last year of apprenticeship I spent in a Programming Team, we learned Java in School for a year during the apprenticeship.

 

I literally had no idea about this weird OO thing and Java, until the Boss of the team I did the last year of my apprenticeship in decided to pick a java project for the practical part of my final exams.

I had to understand Java in a week to get a good grade and not fail the exams. Still, the year before I literally sat about 4 hours per week trying to learn Java and couldn't even grasp the concepts of OO smile.png

 

 

So don't underestimate Java. Even though people say its easier than other programming languages... if its your first language (or first OO language), it will take you some time to understand it.


Edited by Gian-Reto, 13 August 2014 - 11:27 PM.


#12 dsm1891   Crossbones+   -  Reputation: 1440

Like
1Likes
Like

Posted 14 August 2014 - 08:25 AM

My personal opinion that it doesn't matter how smart you are to learn something, only that it will affect how long it will take you to learn. If you ask any programmer, they will tell you about a 'click' when they understood how the code was interacting with it self. For some it takes a week, some a month... I have just finished a computing degree, and at the end of the 3rd years some people still didn't understand basic coding principles.

 

There are different ways of learning too, some find books easy to learn from, others prefer to do it them selves (trial and error) and others need a 1 on 1 teaching. maybe try switching your learning methodology if reading books isn't for you. There is a plethora of videos on the internet, The New Boston being a fantastic one for beginners such as yourself (although he is hated by some on the internet, as he tends to teach bad habbits).

 

Good luck!



#13 cooljava50544   Members   -  Reputation: 126

Like
0Likes
Like

Posted 14 August 2014 - 09:32 AM

 

It takes many students 4 years of dedicated study in a university to barely be able to qualify for a decent internship or entry-level job in the games industry.

If learning to program where all that easy, everyone would do it and we'd all be making minimum wage. Learning any skill requires the same process: persevere, practice constantly, and don't be afraid to ask for help when you're stuck. smile.png

 

Yes, that is important too.

 

Speaking from my own expierience, I did an apprenticeship as Programmer before going to study CS. My last year of apprenticeship I spent in a Programming Team, we learned Java in School for a year during the apprenticeship.

 

I literally had no idea about this weird OO thing and Java, until the Boss of the team I did the last year of my apprenticeship in decided to pick a java project for the practical part of my final exams.

I had to understand Java in a week to get a good grade and not fail the exams. Still, the year before I literally sat about 4 hours per week trying to learn Java and couldn't even grasp the concepts of OO smile.png

 

 

So don't underestimate Java. Even though people say its easier than other programming languages... if its your first language (or first OO language), it will take you some time to understand it.

 

I feel lucky now lol






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS