stecal849

Members
  • Content count

    19
  • Joined

  • Last visited

Community Reputation

144 Neutral

About stecal849

  • Rank
    Member
  1. Games Presentation Advice

    Ten minutes is not alot of time, i'd aim for a maxium of 8 slides this gives you just over a minute for each slide. I'd go with quality over quantity. You want your presentation to be interesting therefore pick 5 key areas youd like to talk about and do them well. Thats how I'd go about it. Good Luck Ste
  2. Java----C/C++

    It would seem that the "its pass by value only" guys are correcct. I think one of the major problems with this type of argument / discussion is that the powers that be use the wrong terms. A reference in java isnt actually a reference at all, its a copy of a pointer to an object - which is passing by value, not by passing by reference. Until today I too fell for - It says pass by reference so it must be it passes a reference to the actual object. Not so! Thanks for correcting me. You learn something new everyday. Ste
  3. Java----C/C++

    http://java.sun.com/docs/books/tutorial/java/javaOO/arguments.html Pass by Value Primitive arguments, such as an int or an array, are passed by value, the rest are passed by reference. When invoked, a method or a constructor receives the value of the variable passed in and the method cannot change its value. No pass by reference? According to java doc there is and its used on ints or an array. Simply google something if your not sure instead of posting half truths. Ste
  4. Java----C/C++

    Primitives (int, float, arrays etc ) are passed by value. Objects are passed by reference. Ste
  5. Java----C/C++

    Quote: Pointer and Reference arguments allow you to change more than one value with a function. I hate the fact that Java does not have this. It is too useful. Just being able to modify one value in a function via return is too limiting. Note that C++ still has return, and functions can work just like Java methods using it. As far as I know java does support pass by reference. Ste
  6. Question about Java Vs. C# Vs. C++

    Check out eclipse ( http://www.eclipse.org/ ) its a damn fine editor. Much faster than Netbeans but without the Graphical Dialog builder. Another fine editor is JCreator ( http://www.jcreator.com/ ) which you can download a free version. As with java vs c# vs C++ its they are all excellent languages. Im more familiar with Java as it is taught at my university. It has excellent documentation and anything can be found by simply googling. Ste
  7. New To Programming

    I'd like to re-iterate what spoonbender said. Definatly start off learning to program as once you know how and what you need to be doing the language of choice is exactly that... a choice, a tool. Pick the best tool for the job. Its like saying to your father (whos a carpenter, or joiner) you want to be a carpenter, now he isnt going to hand you the latest and greatest powersaw that not only cooks and cleans but does a damn good job of cutting around corners. No sir, hes going to hand you Mr Blunty so you dont cut off your fingers (HTML). But soon you realise that Mr Blunty(HTML) is not really good for much apart from cutting little things or producing little wooden dolls/soldiers. So you decide to use Mr Sharpy, its your fathers best non-power saw (Java, C#.. etc) and it makes a damn good job of most things. There is however a knack to using Mr Sharpy and you can do some neat stuff with it, infact, your really beginning to enjoy Mr Sharpy and its non-slip handle(Virtual Machine). But a few months go buy and your looking to develop that kick ass table and chair set that your mother would absolutly love. So you go to use Mr Sharpy but you realise that the corners of the table arnt going to be as round as your mother would like them to be and you really want to show off your skills that youve learned to your father and his carpentry mates. So you sneak into his toolshed and switch on the PowerMaster 9000. Damn this saw looks ugly with weird looking buttons (pointers?) and your not really sure how the settings work (yeah.. definatly pointers) but you decide to jump in anyway. Woo, you can feel the power at your fingertips as you cut the template for the table and those corners are alot smoother but its quite a bit more work (templates? function pointers?). So fast forward a whole two weeks (yes, its taken you slightly longer to manufacture this table using the powermaster 9000) and your table and chairs are done. You wrap them up nicely (Build Solution) and call your mother and father out to the workshop. All your friends are there too and everyones in awe that you manged to build this magnificant table and chairs set with the PowerMaster 9000. Your really happy and youve learned alot so you invite everyone to sit down at the table using these new great chairs. Then BANG. The tables in pieces and your mothers crying. From the looks of things you didnt read up and understand all those fancy buttons (pointers!, Dynamic Memory Allocation. etc) and as a result your table was full of holes and the chairs were very uncomfortable (memory leaks?). But you've learned your lesson. Morale of the story? Learn how to program first. Sure, play about with other languages thats how you learn. Go with what SpoonBender said. Good Luck me bucko Ste
  8. Ok dead was the wrong term. It wouldnt hurt to know AWT however I would start off with Swing. Its the most used and tbh if your familar with Swing your familiar with AWT.
  9. Java----C/C++

    Quote:Original post by gsmaster And,on average, there are a lot more readily available C/C++ engines out there than Java ones, right? I realize making your own engine can be the best way, of course. True, C++ built engines are in abundance and certainly at least attempting to write an engine of some sort in C++ will help your development. For my honours project I did just this and chose to implement a ray tracing application in C++ instead of Java. I learned alot through this and although its only a simple ray tracing application its made me a better C++ and Java programmer imo. So best thing to do would be to choose a subject that interests you and attempt to write the application in C++. It wont be the best application the world has seen but you learn through doing. Get cracking lad! Ste (http://www.flickr.com/photos/93606551@N00/ i can send you the source if your interested, just pm me or fire an email)
  10. Java----C/C++

    Quote:Original post by gsmaster I'm currently a fairly moderate Java programmer, and have been thinking of getting into C/C++ mainly because it seems to have the capability to make more complex games more easily, from what I have seen. What I'm wondering is, in terms of coding, and not the capabilities of language, how does Java differ from C/C++? Will having a backround in Java help you to more understand C/C++ at all? Hi, I was in a relatively similar position a couple of years back. Java was the language of choice for my comp sci degree so I decided that C++ would be great to use along side Java. The differences between coding for both languages are in Java you technically dont need to worry about memory when creating objects on the fly (although you should because it will make for better applications). With C++ you are the garbage collector. That is, you have to make sure that when you allocate memory you must deallocate it when your done otherwise everybodies loveable friend - the memory leak - comes round for dinner and has your program for the main course :) This is true with the ability to use pointers in C++ that need to be fully understood before you start using them in serious development applications. I learned through mistakes and triumphs and I thoroughly recommend that you play about with pointer aritmatic and generally just get to know the language and its differences. Coming from a similar style of language you should have an understanding of all the object orientated techniques and how to use them and this will be an advantage to you. Good Luck Ste
  11. [quote]Original post by fathom88 I've been testing my code and found doing comparisons adds a lot of stress to my system. I have array and simply check the value before and after it. int xx = 0; for(int ii = 1; ii < (MAX_ARRAY - 1); ++ii) { After = ii + 1; Before = ii - 1; if((MyArray[ii] > MyArray[After]) && (MyArray[ii] > MyArray[Before]) ) { //store value Result[xx] = MyArray[ii]; xx++; } } Is doing comparisons really that expensive. My prior step was to go through all the values and perform a calculation on each value and re-insert the updated value. This step used a lot less horse power. Thanks for any help.[/quote] The actual comparison code (MyArray[ii] > MyArray[After]) &&..etc) is very fast and not the problem. When an if statement (or for loop) is encountered the CPU cannot fetch the next instruction as it does not know what this next instruction will be. If the wrong instruction is fetched a delay will occur through the CPU having to flush the pipeline and on pentium 4's especially (very deep pipeline) this can have a huge performance hit. However if you have optimisations enabled the compiler can do a few tricks to ease the pain of the if statement such as loop unrolling, and re-arranging instructions which aid the cpu through utilising complex branch prediction techniques. Try googling for branch prediction and loop unrolling. Regards, Ste
  12. Java Games?

    Hi Languages are tools. You could make a MMORPG/RPG/Beat-em-up in javascript if you really wanted but like using your fists to hammer nails into walls - its not the best of ideas. Several games have been ported to Java from C++ and run quite efficiently. I see no reason - if you possess the abilities - to write whatever you want in Java. Check out http://www.bytonic.de/html/jake2.html as one example Regards, Ste
  13. AWT is practically dead so I wouldnt bother with it, you could spend your time bettering your skills at Swing or MFC than AWT. However i'd highly recommend writing Swing code manually i.e. Do not use Netbeans built in editor. I find this way your code stays clean and you can easily employ object orientated methodology through programming components instead of dragging and dropping them onto a Jpanel etc. However each to their own, and anyway, Swing is very simple to use. I would recommend Eclipse as an editor. It practically codes for you. Good Luck Ste
  14. sdk for last generation consoles

    I recently purchased a PS2-Linux kit that allows you to program the PS2 drectly through the use of an external hard drive pre-loaded with linux. I havnt had time to play with it yet but if your in education you can get it for 99 Euros. check out http://playstation2-linux.com/ Ste
  15. How does ray tracing works?

    Quote:Original post by The C modest god Can someone explain me the idea behind ray tracing and why is it so slow? Thanks in advance. Its slow because for each pixel your firing a ray into a scene & you then have to keep track of that ray as it propogates around the scene. Typically a basic raytracer will do the following: * Note - very abstract description! 1.Fire ray through pixel into the scene from the eye(x,y) position. 2.Test for intersection -> If it intersects with an object how should the ray behave? -> If object is reflective generate new ray (usually through recursion) and cast in the reflected direction from the point of the parent rays intersection. Now follow this ray and repeat 2 until recursive limit is reached. make note of each objects colour because this will be used to determine final colour of each pixel at the eye(x,y). 3. Calculate local illumination -> recursive ray tracing (backwards) can only model specular lighting therefore to "simulate" diffuse lighting you need to fake it through a local illumination model (e.g. Phong Lighting (not phong shading - thats different)). 4. Set eye(x,y) pixel colour to be the culmination of each ray spawned from the initial eye(x,y) So for a scene resolution of 1024 x 768 @ 1 pixel per ray (more if you use supersampling) you'll be firing at least 786, 000 + rays and thats not including the rays spawned from parents where a reflective surface has been encountered. You can speed it up using spatial subdivision techniques like octrees or process more than one ray at a time. Regards, Ste