Mirage Source

Free ORPG making software.
It is currently Wed Sep 23, 2020 12:36 am

All times are UTC




Post new topic Reply to topic  [ 80 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Wed Aug 13, 2008 6:58 am 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
I think this is more like a good way for people who wants to learn C++, to learn it. If they know the code in VB6, they'll surely understand it in this conversion. The only "complicated" things here are the inheritances, but they just make the code cleaner simpler. I think you have to agree with me at this point xD

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Sep 02, 2008 3:37 pm 
Offline
Knowledgeable
User avatar

Joined: Tue May 30, 2006 1:42 am
Posts: 346
Location: Florida
Hey Dragoon, when you get this more thoroughly working in full 2d I will send you my code, from a scraped engine I was writting in C++ I made 2 different versions, one with 2d characters on 3d backgrounds and the other one was like FF7 - 9 prerendered 2d backgrounds with 3d characters, but it is not MS based at all so there would be some major conversion needed.

_________________
shut your manpleaser
http://www.kazmostech.com


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Sun Feb 01, 2009 10:08 pm 
Offline
Newbie

Joined: Thu Jan 22, 2009 1:20 am
Posts: 8
i tested it and i get an error on the player id after i login.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Mon Feb 09, 2009 3:12 am 
Offline
Regular
User avatar

Joined: Tue Jun 17, 2008 12:39 pm
Posts: 55
Whenever I try logging in with my character I created, VB6 just gives me an error on the client. :shock: Anyone know why? I'd like to try to get the C++ version of this to work...


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Sun Feb 15, 2009 9:10 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
Quote:
WARNING: This is NOT a release yet, it is just a preview, since I have the code and it compiles, but does NOT work yet.

¬¬
I said this is not a working version.
I will re-make the hole networking when I have the time.

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Fri Feb 27, 2009 8:21 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
I'm re-developing the network :D
It's going great.
I'm on a little doubt about how I'll handle more than 64 connections xD but it's going great.
I think I'll have a releasable version soon ^^

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Fri Feb 27, 2009 8:47 pm 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
awesome

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Mon Mar 02, 2009 1:07 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
It's going great! I just need to make a better client side buffer to handle the almost 3kbs of the mapdata packet xD
Then I'll test a few things more and release beta 0.2, SEMI-WORKING version ^^

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Mon Mar 02, 2009 10:25 pm 
Offline
Pro
User avatar

Joined: Tue Apr 22, 2008 2:15 am
Posts: 597
sweet! im trying to learn C++ at the moment, i'm curious as to how this would work.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 12:41 am 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
It is almost working. I can send/receive data, but not when the packets are too large. MapData is fucking things up xD But I'll fix it soon.

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 5:56 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
What are you using for network communication?

_________________
Image


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 6:00 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
pull the maps over ftp/http

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 12:17 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
Tony wrote:
What are you using for network communication?

WinSocket2.2, tcp
Lea wrote:
pull the maps over ftp/http
Not a bad idea, but I'm trying to make it simple. If you don't have a web site then I'll be totally screwed. MS is supposed to be simple(no offense). All it's needed it a better buffering system xD.

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 2:13 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
FIXEEEEEED!!!!!!!
IT'S ALIVE!!!!!!!!!!!!!!!
DAMN YOU VERRIGAN xD
Pay attention when you code!!!(jk)
AddToBuffer function is the bitch!
It was:
Call CopyMemory(tBytes(aLen(Buffer)), Additional(0), aLen(Additional))
and should be:
Call CopyMemory(tBytes(aLen(Buffer)), Additional(0), ByteLen)

AAAAAAAAAAA, I'M YELLING OF HAPPINESS!
Image
Not a verry nice photo, but it passes the idea...

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 2:17 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Dragoons Master wrote:
FIXEEEEEED!!!!!!!
IT'S ALIVE!!!!!!!!!!!!!!!
DAMN YOU VERRIGAN xD
Pay attention when you code!!!(jk)
AddToBuffer function is the bitch!
It was:
Call CopyMemory(tBytes(aLen(Buffer)), Additional(0), aLen(Additional))
and should be:
Call CopyMemory(tBytes(aLen(Buffer)), Additional(0), ByteLen)

AAAAAAAAAAA, I'M YELLING OF HAPPINESS!
Image
Not a verry nice photo, but it passes the idea...


Fuuuuck. This explains why my code kept on fucking up at AddtoBuffer. Fuck. Ah, christ.

I'll just use Dugor's buffer class instead. Verrigan's system was far too confusing.

Glad you got it working though. I spent ages trying to found out why my aLen function kept erroring there.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 2:32 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
The real error is the CopyMemory. It tried to copy too much memory to tBytes, but tBytes is defined as tBytes(tLen - 1), so we don't have that much memory allocated, and then VB6 just bugs like hell.

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 2:46 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Dragoons Master wrote:
The real error is the CopyMemory. It tried to copy too much memory to tBytes, but tBytes is defined as tBytes(tLen - 1), so we don't have that much memory allocated, and then VB6 just bugs like hell.


xD

Ah well, Dugor's code is so much easier to understand.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 10:26 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
Doesn't Winsock handle one request at a time?

and UGH byte arrays.. looks so confusing.

_________________
Image


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 10:31 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Tony wrote:
Doesn't Winsock handle one request at a time?

and UGH byte arrays.. looks so confusing.


It's really not.

You use the functions to add bytes, integers, strings etc. to the array, then peel them off in the opposite order in the server.

Easy shit.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 10:44 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
Robin wrote:
Tony wrote:
Doesn't Winsock handle one request at a time?

and UGH byte arrays.. looks so confusing.


It's really not.

You use the functions to add bytes, integers, strings etc. to the array, then peel them off in the opposite order in the server.

Easy shit.


Yeah I understood a bit of that part by reading up on Verrigan's tutorial but took a peek at his code and his functions
I did not understand one bit of it.

Okay his code here

Code:
nLen = GetIntegerFromBuffer(Buffer, True)
    nBytes = GetFromBuffer(Buffer, nLen, True)
    Sex = GetByteFromBuffer(Buffer, True)
    Class = GetByteFromBuffer(Buffer, True)
    CharNum = GetByteFromBuffer(Buffer, True)


If there types of bytes in order, and it took that byte from the order, how does it know what's what?

_________________
Image


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 10:54 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Tony wrote:
Robin wrote:
Tony wrote:
Doesn't Winsock handle one request at a time?

and UGH byte arrays.. looks so confusing.


It's really not.

You use the functions to add bytes, integers, strings etc. to the array, then peel them off in the opposite order in the server.

Easy shit.


Yeah I understood a bit of that part by reading up on Verrigan's tutorial but took a peek at his code and his functions
I did not understand one bit of it.

Okay his code here

Code:
nLen = GetIntegerFromBuffer(Buffer, True)
    nBytes = GetFromBuffer(Buffer, nLen, True)
    Sex = GetByteFromBuffer(Buffer, True)
    Class = GetByteFromBuffer(Buffer, True)
    CharNum = GetByteFromBuffer(Buffer, True)


If there types of bytes in order, and it took that byte from the order, how does it know what's what?


The first line calculates the length of the buffer, then it gets the Sex by reading the first byte in the buffer, and removes it. Then, when it get's the class, it'll be the first byte in the buffer.

"It" doesn't know what's what, but the person who programs the packet knows what order the data is in.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 11:16 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
Robin wrote:
"It" doesn't know what's what, but the person who programs the packet knows what order the data is in.

Just like you where doing with Parse().

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 11:19 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
Oh shit. For some reason I was thinking the packets would look all crambed together..

Then I remembered they look like 2 3 45 32 or something.

[edit] Wait now I'm confused.. so basically doing byte arrays, we receive all the data as bytes
then we change them accordingly when we receive them?

_________________
Image


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Tue Mar 03, 2009 11:58 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Tony wrote:
Oh shit. For some reason I was thinking the packets would look all crambed together..

Then I remembered they look like 2 3 45 32 or something.

[edit] Wait now I'm confused.. so basically doing byte arrays, we receive all the data as bytes
then we change them accordingly when we receive them?


The data is stored in an array of bytes.

The packet sends the entire array. When the server recieves the array, it reads the start of the array to find out how long the packet is, then it takes the data you put into the array, out of the array, piece by piece. 'AddIntegerToBuffer' lets you place an 'Integer' variable into the byte array. 'GetIntegerFromBuffer' reads the integer you put in.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: MSCPP Beta 0.1
PostPosted: Wed Mar 04, 2009 1:58 am 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
There are two headers I'm using. The packet length and the packet id(playerhp, attacknpc, etc(enum)). So a valid packet would be(IN DEC):
5 2 3 'h' 'i' '!'
That can be interpreted as a packet with 5 bytes, with the id = 2(can be a msg of anything) and a string with 3 bytes(" 3 'h' 'i' '!' " can indicate a string of 3 characters). The number 3 means that the next 3 bytes are the string I want to read. So strings have variable sizes. 2+lenght(string) bytes.

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 80 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group