Jump to content
  • Advertisement

Gink

Member
  • Content Count

    295
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Gink

  • Rank
    Banned
  1. Gink

    Kazgoroth and Fruny are retards

    yeah keep using acronyms that you make up stupid fuck
  2. Gink

    My farewell

    I agree with the poster, there are many idiot moderators who are just hypocrits and dont enforce the rules for their buddies. They acn go fuck themselevs and their shitty elitist attitudes. (The elitist newbies Kazgoroth and Fruny who sit around and do nothing except be faggots)
  3. Gink

    consec. int. proof troubles

    if I got 5k at the end, would I just divide it by 5 and be done?
  4. Gink

    consec. int. proof troubles

    Quote:Original post by pinacolada All you have to do to prove that N is divisible by D is to prove that when you divide N by D, you get an integer. In other words, prove there exists an integer X such that N/D = X. Or better yet, prove there exists an integer X such that N = DX. I think I've already made it too easy. How so? It cant even be factored so that it can be divided. The only way I could think of is assuming one of them is a multiple of 5 then proving that but i doubt that's acceptable.
  5. Gink

    consec. int. proof troubles

    Quote:Original post by jjd Try writing the integers as: 5n, 5n+1, 5n+2, 5n+3, 5n+4, where n = 0,1,... -Josh Why would you write it as that?
  6. Gink

    Recursion in games

    Quote:Original post by TommySauder Just wondering if there's an actual use to recursion in games... seems kinda pointless and a complete waste of memory+cpu power. Recursion can simplify code, making hundred line algorithms into 20 line algorithms. Sometimes(not too often) it's the recursive algorithms that run faster than non-recursive due to less instruction generation
  7. Gink

    Prime Proofs

    Thanks for the link, but I already wrote my own program and solved it but I havent been able to really disprove it. Not sure how I would do this because the equation can contain a variable that can be any number really.. no clue how to approach it without using something like induction.
  8. Gink

    Help with snake clone

    you could just write a struct that maintains the current tiles coordinate then every x milliseconds you update all the other coordinates so that they're where the previous tile was then you can redraw the head of the snake. You can use most data structures for it imo, queues, deques, vectors,linked lists, whatever
  9. You're basically screwed unless you buy microsofts 2000 dollar ide. Too much of that stuff is automated my VS and it's really hard to find out how to go around their rip-off ide(since all their books etc rely on their IDE and so do many tutorials)
  10. Gink

    Pointless Pointers??

    Pointers aren't pointless at all. Pointers are just addresses that point to data. Dereferencing a pointer just says, go to this location in memory, return (or modify) the data at that address. Here is a quick example void modify(int var){ //modifies the value of a variable var = 10; } int main(){ int z = 5; modify(z); } This does not work correctly if you want z to be changed a temporary variable is created called var, with its own unique address. This causes some temporary variable to be modified, which was not the intention. To get around this, you need to pass in the address of a variable void modify(int *var){ *var = 10; //dereference var, modify the value stored at that location } int main(){ int z = 5; modify(&z); } Pass the address of the object to modify, a temporary copy is created (of the address) and the original variable is modified arrays and pointers are also closely related. When passing arrays by just their name, what really happens is the address of the 0th element is passed. So.. Pointers point to an address, always. For more understanding, I suggest you go play around in DEBUG and type D a few times, and look at how data is stored in memory. The hex addresses point to data in memory, but editing that memory location by storing a diff value will cause the value of the data at that address to be changed. Play around with E to know what I mean, but dont press G whatever you do(your cpu might get injured).
  11. Gink

    help on linked list example

    The one in main needs to be malloc'd too I think. Also make sure you dont have memory leaks by using free
  12. Gink

    Alpha value?

    Here is some java applet I did a while ago that uses it, so you can see it in action if you want to compile it etc. import javax.swing.*; import java.awt.*; public class BallApplet extends JApplet{ BallThread b[] = new BallThread[20]; Color array[] = new Color[20]; public BouncingBallApplet(){ for(int x=0; x < b.length; ++x){ array[x] = new Color((int)(Math.random()*250),(int)(Math.random()*255),(int)(Math.random()*255),(int)(Math.random()*255)); b[x] = new BallThread((int)(Math.random()*800),(int)(Math.random()*60)); b[x].start(); } this.setSize(800,600); } public void paint(Graphics g){ g.setColor(array[(int)(Math.random()*array.length)]); g.fillOval(b[(int)(Math.random()*20)].xLoc,b[(int)(Math.random()*20)].yLoc,40,40); this.repaint(40); } public static void main(String args[]){ new BallApplet(); } public class BallThread extends Thread{ private int xLoc; private int yLoc; public BallThread(int x, int y){ xLoc = x; yLoc = y; } public void run(){ for(;;){ xLoc = (int)(Math.random()*800); yLoc = (int)(Math.random()*600); try{ this.sleep((long)(Math.random()*200)); }catch(InterruptedException e){ System.out.println(e.toString()); } } } } }
  13. Gink

    help on linked list example

    Yeah, use malloc(sizeof(struct node))
  14. Gink

    somthing you dont hear to often

    Quote:Original post by atomic_west Thank-you for describing to me the same process that I use the only difrence is the results, I get an error, you get a .com file. My question is why and can you help me to make this work? Im not stupid and I have spent 3 hrs a day and 5 days trying to find a solution so I can learn assembler and am getting tired of landing at square one. Once you download nasmide, go to the directory and type nasmide and it should open up. All you do is go to options/assembler, and set it to COM executable binary file. Also use ALINK as the linker for when you decide to use real mode.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!