|
-
Jan 29th, 2003, 11:24 PM
#1
Thread Starter
Junior Member
Need ideas for how to do something.
I am making an online role playing game, like everquest or whatever.
I have come across a problem in that I am not sure how to make the npc's (non player characters.
My problem is I need to have it so the npc's are similar to other players in that move and opperate on all players' computer's the same. So lets on player 1's computer, an npc is walking around at a some coordinate in a level, on player2's computer, that npc is shown walking around on his computer the same as on all other computers. So basically what I need to do is make it seem as though the npc's are real players themselves, acting the same for all players, and not unique to each player.
One idea I had was to make it so all the npc's run on game host's computer, and then their information(coordinates or whatever) is sent to everyother player, however I figured this could really lag bad if I had like thousand's of npc's information being sent repetitively.
Any Ideas?
-
Jan 30th, 2003, 09:06 AM
#2
Why are there thousands of NPCs? Do you mean enemies?
In current online-RPGs everything the NPCs do is calculated on the server(s). Doing otherwise would be insecure.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 30th, 2003, 10:05 AM
#3
You shouldn't send information about all NPC's anyway - you only need to send relevant information to each computer. You should know what each player can see, so only let them know what is visible in that area.
-
Jan 30th, 2003, 11:43 AM
#4
Thread Starter
Junior Member
Originally posted by CornedBee
Why are there thousands of NPCs? Do you mean enemies?
In current online-RPGs everything the NPCs do is calculated on the server(s). Doing otherwise would be insecure.
My game is more like diablo though where you would just host a game, and people would join, not a mmorp.
But i just reliezed that i could just make it so it only sends the npc information if that npc is in your screen.
But the problem remains with on whose computer are the Npc's actions decided on?
And what if the computer whose deciding their actions leaves the game?
I am in over my head with this.
I have another question too, if anyone here uses dx7 do they know a way of doing alpha blending effects, using dx7?
-
Jan 30th, 2003, 01:20 PM
#5
Look at Diablo 1: it constantly was hacked.
Diablo2 on the other hand was purely server based.
Anyway, in case the host leaves some other computer must take over. This should be determined beforehand so there is only little delay.
When the host leaves the vice host should get all relevant data from him. Or something like that, this particular thing would mean that if the host crashes the game goes boom.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 30th, 2003, 03:23 PM
#6
Addicted Member
Originally posted by Kadven
But the problem remains with on whose computer are the Npc's actions decided on?
Whoever is acting as the host or server
Originally posted by Kadven
And what if the computer whose deciding their actions leaves the game?
You send a message to another player informing him he is now the server. If you use DirectPlay you can set it up so this happens automatically.
Originally posted by Kadven
I am in over my head with this.
I figured that. 
Originally posted by Kadven
I have another question too, if anyone here uses dx7 do they know a way of doing alpha blending effects, using dx7?
Check Lucky's site - www.rookscape.com/vbgaming/ or here - www.directx4vb.com
-
Jan 31st, 2003, 04:44 PM
#7
Ex-Super Mod'rater
As far as the Alpha blending goes look into using Direct3D Sprites, even if its 2D you can have Sprites that use 4 vertices to appear on the scren as normal sprites but have features of Direct3D. Theres something about it on the Lucky's site that Machaira mentioned. Look for the hybrid engine.
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
Jan 31st, 2003, 07:26 PM
#8
Fanatic Member
Technicly, if there is no random function involved, and all the players have the same data, and movement code for NPCs they should always be in the same spot anyways. At leas that's how I understand they did the StarCraft unit pathing...
Although if someone had a very slow computer.. you would have to adjust.
Don't pay attention to this signature, it's contradictory.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|