Archived

This topic is now archived and is closed to further replies.

Lews

DPlay VB<->C++

Recommended Posts

Over the past couple of days, I''ve been reading through the DPlay docs and have started liking the API more and more. So instead of writing my own netlib, I''m going to use DPlay for my network game. I''m considering writing the client code in Visual Basic, because it''s a lot easier to design and manage a complicated GUI with VB''s tools. The client is basically going to be a dumb terminal - very little logic processing will be done by it. All it''s going to do is draw a sparse 2D world with the help of OpenGL, so performance won''t be a problem. The server I am going to write in C++. It''ll process the bulk of the game logic, be object oriented, and efficient. My question is what are the issues involved in having a VB DPlay client attached to a C++ DPlay server? Is it even possible? I''m assuming it is because DPlay is language-independant, but I''ve never heard of anyone attempting this. I know I have to be careful of the data types I use in the packets because VB and VC++ interpret somethings differently. Any thoughts? Anyone get this to work before? Or seen it done somewhere online?

Share this post


Link to post
Share on other sites
Hi,

quick answer.. yeh thats fine :-)

Basically your server and client dont care what language they are written in. and the only real time you have problems with data types are when you are doing cross platform server/client.

One note - why do you need a nice GUI interface tool for the client if your using OpenGL ? personally i would always write games in C++ (although i would write apps in something like Delphi).... and i would never touch VB :-p ops sorry that just poped out

hope that helps

~tim

Share this post


Link to post
Share on other sites
The reason for using VB for the GUI instead of OpenGL is because it''s a lot easier to rearrange controls on the fly through VB''s WYSIWYG UI design tool. The basic layout of the game is going to have a square OpenGL viewport into the game world and, and a sidebar on the right with a tab control that is going to have many (maybe 7 or 8) tabs for different ship "systems". There''ll be one with all the navigation information on it and the associated buttons/listboxes/and whathave you, another for tactical control, another for trading, another for ship to ship communication, ect... With VB I can draw a tab control onto the screen, and load it up with other controls. It is very easy to add or remove controls, and move them around until the layout is nice (niether MFC or WIN32 can beat this ease of GUI design - maybe .NET can, but I don''t have it). The end result won''t look as good, as say, a semi-transparent custom dialog system written in OpenGL, but I won''t have to spend weeks working on the GUI of my game either. I''d much rather work on the gameplay and AI. So it''s a bit of a compromise.

How do you other guys do your GUI''s for your games? I''ve noticed that most hobbyist programmers kind of avoid the issue and design games that don''t need anything more complicated that a button or two. Has anyone tried using GLGooey? Or something like it? I''d like to use C for the client, but MFC is 10 years old and needlessly convoluted, and in WIN32 you have to revert to procedural GUI programming - like: PutButton(20,20,100,100, "Here''s a button that''s going to be a pain in the ass to put 100 of in a program", WS_CHILD | WS_CRAP);

Share this post


Link to post
Share on other sites