Jump to content

jediknightbob

Lurker
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Serf

About jediknightbob

  • Rank
    Serf
  1. jediknightbob

    Diablo III

    Because semi-automatic crossbows make total sense...
  2. jediknightbob

    Crysis 2 Minimun specs revealed

    Crytek won't be doing themselves any favours by making it "less good" than it could be just so more people can play it. When Crysis came out it blew us away because of how far above and beyond the rest of the field it was. I don't think I'm alone in expecting #2 to do the same. I did giggle at "3GB for Vista" though. Vista barely runs itself on 3GB... lawl.
  3. jediknightbob

    Games with the coolest worlds

    Any D&D game is deep and intriguing. If you want a world that you can truly entrench yourself in, you're on a winner with any of them. And I don't mean NWN, because that was an abortion of a D&D adaptation. DAO is incredible too. The back stories of each character are full and diverse. Even the NPCs are worth talking to; they all have stories to tell and conversation options worth exploring. If you get really in to it, the in-game "Codex" system gives you information about special items, religions, places, animals, people... it's truly immense. Bioware really have outdone themselves with it (still doesn't make up for W-ever-TF they were thinking when they made NWN though).
  4. jediknightbob

    Rivatune for nVidia cards

    Ok, first off, I don't know a whole bunch about OCing and cooling. If something overheats I'll install another fan, or point my pedstal fan at the case. Yeah, I know. Anyway, my last card (Asus 7900GTX) cooked itself inside my Antec P180. I found a program called Rivatune, which seems to change the built-in settings for the card, and upped the fan speed from factory-spec (somewhere around 40%) up to 100%. Yeah, it was noisy, but my speakers are way noisier, so... meh. It helped a bit, but the card was already pooched, so I've replaced it with an XFX GTX260. We're just heading into this cards first summer now, so I'm wondering if I should do the same thing to this one. Or will that kill the bearings before their time? I assume there's a reason nVidia don't run their fans at maximum speed, but I'm thinking that might just be a noise-management deal, which as mentioned, IDC about. Thanks to you, Atomixperts!
  5. jediknightbob

    Problem with constructors

    Well I've written a call for every method, and it's all working sweetly :) I'm not super happy with my coding of last(), as it's creating an array then pointing data at the newData[] array. I think that would be better if the data[] was recreated at the proper length with the right values. But we've not been taught how to "delete" arrays, if that makes sense. At any rate, it works. If only I'd gotten that working a few weeks ago haha. Oh well, it's midnight, and I have a programming lecture in the morning lol. At least I can go to bed knowing I understand Java as well as I'm supposed to by this point :)
  6. jediknightbob

    Problem with constructors

    Ah, that makes more sense! The static example, I mean. I've removed "static" from everything except main() now. I also fixed the error in toString, and it seems to work! Oh yes, I bow before you. I was using toString() to test that the arrays exist and have proper values in them because it won't let me run something like System.out.println(test2[0]); because it says it's expecting type array but has type lab9. But because the toString() method was, in itself, flawed, my test wasn't working either. You know when you spend hours working on something, then it finally works? And you feel super ecstatic? Yeah, that. As to your question, I'm using JCreator Pro 4.50.010. It's what we have at uni, so I'm familiar with it. Is there a better program I should be using at home? Now to write calls for all my methods =D Thanks heaps mate. B.
  7. jediknightbob

    Problem with constructors

    I think you're thinking of instance variables. Although, yes, a statically defined variable within a class is shared between all instances of that class (you know 'instances' as 'objects'). Should you be doing that? No, not if you can avoid it (constants are an exception). I'll try and explain static. Everytime you create an instance of a class, you're dynamically allocating an area in memory for that instance. (This instance is commonly referred to as an 'object'.) That is, until you create an object from a class, said class is nothing but a 'blueprint' of sorts - it doesn't really do anything. So, say you have a class called Calc, which has a non-static method add(). You couldn't just call Calc.add(), since the class hasn't been instantiated. This is why you use the 'new' keyword - to produce an object of a class. After producing the object, the non-static methods and variables within the Calc class are accessible. For example, private static int[] data;//constructor 1public Lab9(int len, int val){int[] data=new int[len];... I should have had this (note the last line's difference): private static int[] data;//constructor 1public Lab9(int len, int val){data=new int[len];... I've made that change, but alas, I continue to receive java's mystical error :( Thanks again to all who have posted so far! I've read Atomic for a long time but this is my first real use of the forums, mostly. What a helpful bunch you all are ;)
  8. jediknightbob

    Problem with constructors

    Can't do that in Java I'm afraid. It makes both references point to the same array, rather than actually copying the contents of one array into the other. I'm not sure what that bit does, but we've been told to put it in all our programs and all my other weeks works have it as well. At any rate, commenting it out doesn't make any difference :( I'm a long way off 100% on "static". But doesn't "static" just mean that a variable is passed through the whole program, basically? That is to say, in this instance, all my methods will use the same int array, "data"? I've played with removing "static" from different places, but it doesn't seem to make a difference at this point... Indeed it should. That was a leftover from something else I was trying and forgot to remove. Thanks for picking it up :) I know for loops are tidier, and I know how to use them, but I prefer to use while loops. Makes more logical sense in my head when I read through. It's a bad habit I'm in, but I can't see it stopping my program... and considering the few bytes of memory these little programs are using, I don't think resource management is something I really have to worry about yet haha.
  9. jediknightbob

    Problem with constructors

    Oops, I left that out when I cut it up to post it here. Fixed now, my mistake! Thanks for replying though :)
  10. jediknightbob

    Problem with constructors

    Hai guys. I'm a uni student currently studying Java in a Bachelor of Multimedia. We had an assessed lab a fortnight ago and I failed hard. We had a list of methods to write to acheive certain things, and a main method to invoke each method, however the structure of main was up to us. Here's my constructors etc. - public class Lab9 { private static int[] data; //constructor 1 public Lab9(int len, int val){ int[] data=new int[len]; int count=0; while(count<data.length){ data[count]=Math.random()*val; count++; } } //constructor 2 public Lab9(int[] inArray){ int[] data=new int[inArray.length]; int count=0; while(count<data.length){ data[count]=inArray[count]; count++; } } public static void setVal(int pos, int val){ data[pos]=val; } public String toString(){ String complete; int count=0; while(count<data.length){ complete=complete+data[count]; count++; } return complete; } public static int betweenCount(int x, int y){ int numFound=0; int count=0; while(count<data.length){ if(data[count]>x && data[count]<y){ numFound++; } count++; } return numFound; } public static void last(int n){ int[] newData=new int[n]; int count=0; while(count<newData.length){ newData[count]=data[data.length-(n+(count+1))]; count++; } data=newData; } } When I use the 2nd constructor I'm getting an error I can't make sense of. I run this code: public class lab9main { public lab9main() { } public static void main(String[] args) { int[] inputTest = new {5,32,6}; Lab9 test2 = new Lab9(inputTest); } } And I get the following error in my "General output" (running JCreator 4.5 Pro): Exception in thread "main" java.lang.NoSuchMethodError: Lab9.<init>([i)V at lab9main.main(lab9main.java:24) Process completed. Normally, I find Java errors fairly concise and useful, but this one has me stumped. Line 24 in Lab9Main is the "Lab9 test2 = new Lab9(inputTest);". What have I done wrong? WTH does "Lab9.<init>([i)V" mean? I assume there's a flaw in my constructor, but I'm passing it an int array. which is what the constructor should be taking as input. I'm rather baffled, so any and all help/suggestions will be appreciated. Thanks to all, in advance. B.
  11. jediknightbob

    StarCraft II: Wings of Liberty

    TBH I would've like to see the story decisions I made have more of an effect on the game story, rather than just what units I have. I suppose they made a linear story so that the Zerg and Protoss campaigns carry on smoothly without having to tell you what happened in the Terran campaign, when it gets messy and unrealistic. Try to avoid a KOTOR2 style recapping and avoid the work necessary to have an ME2 style smoothness. Still, a little bit of non-linearity might have been manageable and nice. IMO of course.
×