Jump to content

Nallown

Member
  • Posts

    626
  • Joined

  • Last visited

Everything posted by Nallown

  1. I was just about to post a link to this book, it's very good and gets into the very details or code. I've actually bought it myself around a month back and I'm reading it again to pickup some of the things that I might of missed while reading it for the first time. It's very detailed and very organized, definitely worth reading if you're interested in the way computers function and what actually powers them. I believe that everyone would be able to read it without a hassle simply because it's pretty much a zero to hero book.
  2. fun fact around a week ago I found that article aswell but haven't got to reading it and today I was planning on reading it and then suddenly I see it here!
  3. x += y essentially means x = x+y
  4. so let me first explain what the Graphics RAM is used for. So whenever you load a certain object such as a new player it holds the 3D model and the model texture. The model texture is essentially the looks and colour scheme of the player so things such as the maybe the camouflage jackets of the COD player or the skin colour or maybe even the shade, all of this may be stored as a image file and loaded up onto the player. When loading these textures it would need to be stored somewhere to display it whenever the player exists so for example lets say you'd be playing as a COD player and you're in the middle of a match ofcourse all the enemy players would exists on the map so it would store their textures somewhere. When you have a dedicated graphics card more then likely its Graphics RAM would be used to store these textures on, so stuff such as the information of the image and the image itself. Whenever you have a bigger image, ofcourse the size of the image would be bigger. So for example an image which would be 100x100 might be 100kb (for example) then if you would have a bigger version of the same image then it might be 400x400 so the size would be around 4x bigger which would essentially make it around 400kb. Many times these textures aren't HUGE and depending on what resolution you may be playing on. so for example you may be playing at 1080p then each individual texture size may be around 700kb, but if you were to play at maybe 4k then it would be 4x bigger and same goes for the texture file size. The vram isn't used for processing, so it doesn't calculate a certain event or process a certain task so it would never slow down a task. But the vram is used however for storing information so for example if you were to store a 100k texture 20 times then your graphics may not have enough space. In this case either your graphics card would clear up some of the textures (which could take a while and cause your graphics card to slow down cause of the amount of processing it would be doing) or it would keep on trying and cause the loading process to crash (essentially crash the game).
  5. There are different ways of doing this 1 way would be to have the textbox always there and set it hidden by default and visible on button click like so: // on initsomeTextbox.setVisible(false);// on button action peforomedsomeTextbox.setVisible(true); another way would be to add() the textbox not on init but instead on button action performed which I believe you should know how to do I'd use add()only once, so lets say if you were to make the textbox appear only on button click and you won't be making it disappear ever again. If you were to make the textbox disappear after you make it appear then I'd recommend using someComponent.setVisible() instead. So preferably you'd only use add() once otherwise if you were to make the component appear/disappear multiple times so like[onclick, appear. again? disappear. again? appear. again? disappear...] then you would change the visibility instead. Just in case for the action performed part you'd do as following someButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {// set textbox visible }});
  6. Instead of using settimeout you could use setInterval which would set the refresh interval of a certain command execution. so it would look like something like this. window.setInterval(function() {// retrieve and update messages}, 1200);// 1200 is the refresh rate in milliseconds, so this would make the panel refresh every 1.2 seconds I wouldn't recommend refreshing the content though or calling on a certain event every x seconds since this would refresh without an unnecessary reason so even when something hasn't updated it would refresh the pane to update the content. Even if you were to have keep-alive enabled this would still be an inefficient solution. Instead I'd recommend using something such as HTML5 socket which would allow you to setup a server and have a open connection which data gets send from such as messages. So you would directly receive a messages when there is one instead of refresh to check for new messages and then show if it is new.
  7. Firstly I'd like to let you know that this isn't the right place to post this, this post is neither programming or software design related. The reason to why you're getting this issue is probably because the view port resolution is greater then the actual render resolution. Have a look under "Project Properties" and make sure that under video the "Width" and "Height" is the same size as the rendered resolution.
  8. if you still don't get it then i could quickly build you a sample app
  9. Could you share the website you designed so I could explain to you how to port it to an official site?
  10. Just like in Java you are able to create instances of classes and allow them to interact with each other. What defines OOP is the fact that you're able to create instances of classes and use them to interact with each other. This is an article which I read a while ago when I got into JS and should explain how it is OO.
  11. "JavaScript can be run without compiling in before hand" By this I mean you don't need to worry about about compiling the source by yourself to be able to use it. In JavaScript you're as much capable of creating object as in java, you don't have to specify the type of objects but this does not mean that it's not object oriented. I do agree I phrased that incorrectly by stating that JavaScript can only be run within browsers, by this I actually meant that it mainly is used within browsers and unlike java it has less access to the system.
  12. Java is far more superior then JavaScript. Java gives you direct access to the system itself where as JavaScript is used to handle browser elements and not the system. JavaScript was originally build by Netscape and completely separate from Java. JavaScript is specifically build to manage html elements where as java is build to build a platform out of itself like it's own app. Java is an OOP (Object Oriented Programming) LANGUAGE where as JavaScript is an OOP SCRIPTING Language (Hence the Script in JavaSCRIPT) JavaScript can only be run from within browsers where as Java is run within a Virtual Machine. For Java to be understood by the computer it requires it to be compiled before running it where as JavaScript can be run without compiling in before hand (in fact you can run JavaScript commands pretty much in realtime [try it by hitting F12 on your keyboard and go to the console, type this in alert("this is javascript")
  13. So the idea is to add a paint component to the object. so for example lets say you have a label and you'd want to add a image on top of it then you'd create a new JLabel holding a paint component like so. int imageXwithinLabel = 0;int imageYwithinLabel = 0;ImageIcon someImage = new ImageIcon(ImageIO.read(getClass().getResourceAsStream("image/location/from/resource.folder")));;JLabel someLabel = new JLabel("Text in label"){ public void paintComponent(Graphics g) { g.drawImage(someImage , imageXwithinLabel), imageYwithinLabel, null); super.paintComponent(g); }}; So you'd basically have a label called someLabel and inside of it you have a paintComponent which would be the graphics handler. There you manage the graphics such as drawing shapes, images, strings etc.... and then you assign the graphics by calling super.paintComponent(g); If you want to read more about the graphics handler then have a look at the oracle tutorials
  14. It depends on what kind of programming you'll be doing, Have a look at the package explenations and look for whatever suits you're needs. Some may have addons which could be useful in a certain occasion where as in other they could be in the way.
  15. would this post be considered a continuation of the one posted a several months ago?
  16. FFS NO WONDER WHY IMGUR IS SO SLOW FOR ME AT HOME!!!!!
  17. well I've gotta say, that wrist wrest doesn't seem very comfortable. main reason I like mine is because of the angle it slowly lowers my wrist down where as that one looks like it'll keep your wrist at the same height of your keyboard so your arm will land down at a weird angle since it doesn't slowly move down in an angle. quick mspaint drawing explaining what I mean
  18. Not sure whether you're talking about that wrist wrest specifically but mine is actually very nice and good. The quality is pretty decent and also the texture makes it easy for me to move my hand around with no hassle
  19. I never use to use a wrist rest until I ordered my KB-460 which came with one. In my opinion it really does help out since instead of your wrist dropping from such a high bump you have it slowly angle down when typing. For example lets say you're typing right now, your wrist may be resting on the table depending on the keyboard and also it would then be at such a bad angle where as a wrist wrest would slowly land it down from an angle.
  20. The first one I got on pc was on disc, not sure why I was extremely young but it didn't work on xp. It might of worked but I just didn't understand how to install it on xp. I really can't remember I was like 6 years old back then
  21. I remember buying the first original rollercoaster tycoon. I loved it. I think that it was my 2nd pc game I ever played and funny fact, it didn't work on my windows xp desktop pc so I had to go to a friends house who had a win 95 pc I believe to play it. I still have rollercoaster tycoon 3 on my current pc but don't play it very often anymore simply because I don't have much time.
  22. Have you guys seen this? 0.0
  23. No I mean give the hyperlink a try, I linked it to a shortened Google link which redirect to the Amazon page
×