Skip to main content
GameDev.net gamedev.net
🔒 Locked

Network or Game Engine?

Started by LedL0af Apr 27, 2006 at 7:06 AM 3 replies 800+ views
Original Post
LedL0af
LedL0af
So I have a very quick question involving some issues. Do you develope your gaming engine first or network engine. I am currently working on an engine and plan to be able to take your guy and have an option to make it online and play with other created characters, roughly supporting 25-50 players. My problem is though is it going to be hard to implement my network into the engine. I have worked with network before but I am comming back from a long year 1/2 of no programming. But I am refreshing up on that and reading some basic socket tutorials. So far I got back to knowing C++ very well and still refreshing up on DirectX and learning DirectX9 at the same time. Right now my engine does the very basic things it should do (graphics,sound,controls, and a menu class) so should I just continue as it is and not even worry about network until the game is all finished or build the engine with the network and when making the game work with the network skeleton. My concerns are at the finish of the game it should be farely big and I think it would be very hard to take all the data and put it online form. This is also a problem because I plan to make the online mode the most appealing to people. Anyways any advice TOWARDS this question and this question only would be very appricated. I don't need people telling me not do such a big project, or not make a game online, or anything pretaining to stuff like that. Only the question, I know my capablities. I don't plan to be done anytime soon as its a refreshing learning process and its a great hobby. Okay thanks! PS: NO directPlay btw.
West Side...
ApochPiQ
ApochPiQ
Design your engine so that the "input" that controls stuff (players, enemies, whatever) can come from either the local game or from the network. Then build the local game first, and add the network code on later; the network code just supplies data to the engine the same way local game logic would.
Bob Janova
Bob Janova
Yes, that is the most sensible solution. Have players controlled by 'input' as far as the game engine is concerned, and information (game state stuff) passed to subscribers as 'output', and then your network becomes just another way of providing input and receiving output.

I can provide some code from a multiplayer/AI bridge game I wrote (Java or C#) if it would be helpful that illustrates this model. I realise it's a completely different sort of game but the philosophy should be the same.
TheTroll
TheTroll
You "design" your game first. I have been coding for a long long time but when I get cocky and deside to just sit down and start writing without do a good design bad things happen.

Take the time to sit down, figure out your data structures, your classes. Also remember when you are done doing that, sit back down and figure out all the things that are not right and could be done better. Yeah it is possible to do it the "right" way on the first try but not really bloody likely. Beat on your desing until you can not find anything else that can be imporved. Then find someone that you trust a lot and have them look at it. Have them try thier best to rip it apart. After that is done, then you can start your coding.

theTroll
JY
JY
Just don't fall into the trap of over-designing it and never actually getting anything written. You could spend years refining a design trying to think of every possibility but the drawing board is often different to the real world.

I have been coding for a very very long time and I often find that an iterative approach is best. Bang up a prototype and start using it asap - then you'll see the *real* pitfalls from actually using it. There is a real danger of overthinking things and never writing a line of code. I've known companies waste millions of pounds on firms of "consultants" that do exactly that!
"Absorb what is useful, reject what is useless, and add what is specifically your own." - Lee Jun Fan

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.