Author |
Message |
tansey Novice
Joined: Nov 03 2004 Posts: 53 Offline
|
Posted: Mon Mar 14, 2005 7:51 pm Post subject: C++ Network Programming... |
 |
|
|
|
I'm interested in getting into writing bots for other client-server apps. I'm more than comfortable in C++ with regards to concepts and things, but I've never done any network programming at all.
Any information on where to start learning things like how to get the data packets and such? |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Mon Mar 14, 2005 10:01 pm Post subject: |
 |
|
|
|
You only need to deal with networking and packets if you intend to write your own bot system (core) from scratch. Writing modules for existing bots (MERV is C++) just requires responding to events and calling basic functions. _________________ 4,691 irradiated haggis! |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:41 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Mon Mar 14, 2005 10:38 pm Post subject: Re: C++ Network Programming... |
 |
|
|
|
tansey wrote: | other client-server apps |
It sounds like you are trying to do this for other programs, not Subspace. To then, I can only respond in that your first step would be to learn how to figure out protocols. I was able to figure out a lot of Subspace's procotol, thanks mostly to the fact that you can disable encryption (Eris told me how to do that part), and some assistance from kind people, like the one above me.
If its for something well known, like AIM, take a look at an open source program that uses that protocol. Beyond that, doing a bit of googling for topics related to networking will give you some good documentation and other simple source code examples of setting up a server/client connection. |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
|
Back to top |
|
 |
tansey Novice
Joined: Nov 03 2004 Posts: 53 Offline
|
Posted: Tue Mar 15, 2005 10:36 am Post subject: |
 |
|
|
|
Thanks for the info and link guys, but I'm thinking right now that I may do it all without actually getting packets. The game is a trivia-style game where you have a window:
-------------------------------------------------
some gfx here
--------------------
picture of object |
--------------------
----------- -------------- ------------
answer1 | | answer2 | | answer3 |
----------- ------------- -------------
-------------------------------------------------
Where There are only about 10 different objects, each available in a couple different colors.
So I'm thinking that instead of getting the packets to analyze the information sent in, couldn't I just get a handle to the window, then find the color of the pixels at the unique coords for each object ( where it's gaurunteed to be white if it's not part of the object), and determine the object by mapping if there is a non-white colored pixel there and if so, which color it is? Also then could I emulate mouse clicks on the answer1-3 buttons?
I've been googling a lot for info on this and right now I know I can get a hwnd from the title of the window, and I found a program w/source that should be able to teach me how to find the color of a pixel and things. Does this all sound feasible?
thanks again,
--tansey |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Tue Mar 15, 2005 6:50 pm Post subject: |
 |
|
|
|
Huh? What does that have to do with networking? _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him. |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Tue Mar 15, 2005 6:52 pm Post subject: |
 |
|
|
|
Um...What does asking about networking have to do with accessing display pixels? From the sounds of your questions, I think you are a long way from doing anything complex. You should probably start with something simple like: make a window with a blue box in it that repaints correctly. Going from writing a "hello world" app in C++ to writing a full GUI with interaction is not a single step. |
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Thu Mar 17, 2005 7:18 am Post subject: |
 |
|
|
|
I think he wants to cheat at a trivia game. His first idea was a standalone bot. The second idea is a program that examines the window the real game is played in and fake mouse clicks. |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Thu Mar 17, 2005 10:15 am Post subject: |
 |
|
|
|
Quote: | determine the object by mapping if there is a non-white colored pixel there |
that sounds like a bucket of fun... take in an image and spit out what it is |
|
Back to top |
|
 |
|