• What are you working on? V4 (HTML ISN'T PROGRAMMING)
    2,003 replies, posted
[QUOTE=The Inzuki;17973773]The only reason why I find it hard is that I can't find any decent tutorials on it. I just want to learn the basics of 2D games, but Google is as much help as YouTube. I might ask my dad if he'll take me out to Barnes and Nobles to buy a Java Game Programming book, but I don't know what would be the best.[/QUOTE] First learn Graphics2D. After you can extend JComponent and draw some simple unanimated stuff, you can start making a simple 2D game. I made a tiny 3 class library that makes it extremely easy to use hardware acceleration and make the game run at a fixed or dynamic frame rate, full-screen or not and so on.
[QUOTE=iPope;17973568]Stop contradicting yourself Going to my Dads this weekend so I can't get anything done programming wise :( But I am on school holiday next week, so all is good. Just going make some more stuff up for my hacking game.[/QUOTE] Sounds like someone needs some [url]http://www.portablepython.com/[/url]
[QUOTE=Diaklu;17974527]Umm. In Uplink you're supposed to have a good computer, right?[/QUOTE] You mean that old Introversion game? Given that your computer was able to run the game decently, I don't think your actual hardware had any effect on what the game experience. Nor should it. This is the programming forum. If you want to brag about computer specs, go to the H&S forums.
[QUOTE=Cathbadh;17975231]You mean that old Introversion game? Given that your computer was able to run the game decently, I don't think your actual hardware had any effect on what the game experience. Nor should it. This is the programming forum. If you want to brag about computer specs, go to the H&S forums.[/QUOTE] I think he tried to say that you have a good computer [B]in[/B] Uplink.
[QUOTE=Cathbadh;17975231]You mean that old Introversion game? Given that your computer was able to run the game decently, I don't think your actual hardware had any effect on what the game experience. Nor should it. This is the programming forum. If you want to brag about computer specs, go to the H&S forums.[/QUOTE] I think it was a joke for a part to be in the game..
[QUOTE=Ortzinator;17973590]I'm the same way, but I found the "Head First" series of books very readable and actually entertaining. You should check them out. [url]http://headfirstlabs.com/books.php[/url][/QUOTE] Ya but they don't have C++ yet. :( I like the C# one though. Anyone got a site that is good to learn C++?
[QUOTE=nerdygamer;17975370]Ya but they don't have C++ yet. :( I like the C# one though. Anyone got a site that is good to learn C++?[/QUOTE] [url]http://www.mindviewinc.com/downloads/TICPP-2nd-ed-Vol-one.zip[/url]
[img]http://i33.tinypic.com/o946s7.jpg[/img] That is with [code] <packet name="LoginPacket" id="0x43E" send> <Header/> <String Name="UserName" Length="0x80" nterm/> <ByteArray Name="PassHash" Length="0x80"/> <String Name="ServerName" Length="0x10" nterm/> </packet>[/code] Need to fixup the code though. I made a stupid mistake :X.
Just finished work on a C# class to help me split data into packets for transfer. It includes a header that provides useful information about the packet, the query(collection of packets) and the contents of it(What kind of query it is(Connect, Disconnect, DoWhatever)) Packet layout: [code] Name Type Value Bytes Description Start Byte þ 1 Shameless Valve ripoff. Make sure this query is actually for us. This also signifies the start of the packet SessionID Short 0-65536 2 Number between 1 and 65536. 0 if none has been issued. QueryType Byte 0-255 1 The type of query. Connect(0), Disconnect(1), etc. QueryID Short 0-65536 2 The ID of the group of packets. PacketID Byte 0-255 1 The PacketID PacketNum Byte 0-255 1 The number of packets in the query PacketSize Short 0-65536 2 Size of the contents(Not counting header) CONTENTS [/code] I'm very proud :3
[QUOTE=Pj The Dj;17975256]I think it was a joke for a part to be in the game..[/QUOTE] Yeah it was. At least some people understand it.
A protocol signature is not uncommon for datagram based protocols, you're not really ripping off Valve :v: (edit: "not uncommon" equals to "every worthwhile protocol does it")
[QUOTE=jA_cOp;17975546]A protocol signature is not uncommon for datagram based protocols, you're not really ripping off Valve :v: (edit: "not uncommon" equals to "every worthwhile protocol does it")[/QUOTE] I assumed as much, but I got the idea from working with the server queries just a few days ago, so i thought I'd better give some credit :P
Most network protocols use identifiers to identify the packets that they are receiving. If you think about it, all sockets send is bits, with no knowledge (or care) whatsoever as to what it means. Same goes when a socket receives. So, 90% of network designers say 'use a byte to identify the contents of the packet', that way the code can then take the stream of bytes and turn it into useful information.
[QUOTE=Cathbadh;17975231]You mean that old Introversion game? Given that your computer was able to run the game decently, I don't think your actual hardware had any effect on what the game experience. Nor should it. This is the programming forum. If you want to brag about computer specs, go to the H&S forums.[/QUOTE] In this post I completely lost all my respect for you.
[QUOTE=Anthony Kiedis;17976545]In this post I completely lost all my respect for you.[/QUOTE] Gotcha. Cynicism is a quality of me that people don't like. And when communication breaks down, everyone's opinion suffers.
[QUOTE=high6;17975426][img]http://i33.tinypic.com/o946s7.jpg[/img] That is with [code] <packet name="LoginPacket" id="0x43E" send> <Header/> <String Name="UserName" Length="0x80" nterm/> <ByteArray Name="PassHash" Length="0x80"/> <String Name="ServerName" Length="0x10" nterm/> </packet>[/code] Need to fixup the code though. I made a stupid mistake :X.[/QUOTE] looking good so far, are you planning to keep this private?
[QUOTE=Kylegar;17975964]Most network protocols use identifiers to identify the packets that they are receiving. If you think about it, all sockets send is bits, with no knowledge (or care) whatsoever as to what it means. Same goes when a socket receives. So, 90% of network designers say 'use a byte to identify the contents of the packet', that way the code can then take the stream of bytes and turn it into useful information.[/QUOTE] I think the correct word is "all", not "most". Unless they're operating purely on voodoo magic or something.
[QUOTE=Cathbadh;17976791]Gotcha. Cynicism is a quality of me that people don't like. And when communication breaks down, everyone's opinion suffers.[/QUOTE] I [B]think[/B] he meant how you didn't realize Shadiku was talking about an in-game item.
[QUOTE=efeX;17925901]yeah[/QUOTE] But it's in the right directory
Found an awesome site to learn C++ and it is working out great. Nothing special but I made a program that adds 2 numbers you have entered. Pretty much uses two functions one named ReadNumbers and the other WriteNumbers. [IMG_thumb]http://filesmelt.com/downloader/CCC.png[/IMG_thumb]
using namespace std in a function? o.O
[QUOTE=efeX;17981442]using namespace std in a function? o.O[/QUOTE] local scope~
lolololol [editline]06:30PM[/editline] still bad
[QUOTE=efeX;17981512] still bad[/QUOTE] It's actually very nice. boost uses it in a lot of its examples.
[QUOTE=efeX;17981442]using namespace std in a function? o.O[/QUOTE] Care to explain?
[QUOTE=jA_cOp;17981868]It's actually very nice. boost uses it in a lot of its examples.[/QUOTE] oh i forgot, if boost does it, it's good [editline]06:47PM[/editline] do you really need to use the whole namespace for just cin and cout?
[QUOTE=efeX;17982029]oh i forgot, if boost does it, it's good [editline]06:47PM[/editline] do you really need to use the whole namespace for just cin and cout?[/QUOTE] In this case no. However, there are some cases where it is necessary. i.e. whenever you're working with a whole fuckton of boost classes.
Can someone explain why it is bad to use or why it is not bad?
[QUOTE=nerdygamer;17982225]Can someone explain why it is bad to use or why it is not bad?[/QUOTE] It really depends on the situation. Placing using namespace std; in the global scope is generally looked down upon with great distaste. However, I have yet to hear an argument against using it in a more local scope (i.e. a class, or function), besides efex's argument. Mostly because people just don't use namespace std; at all, unless they are uninformed. Be aware however that if you had a function called cout, and you were using namespace std; in the same scope, it will cause problems. Most people advocate the use of using std::cin; using std::cout; for global scope.
[QUOTE=efeX;17982029]if boost does it, it's good[/QUOTE] Pretty much
Sorry, you need to Log In to post a reply to this thread.