Printable Version of Topic: AI in multiplayer

Click here to view this topic in its original format

IronOak studios forums > General Discussion > AI in multiplayer


Posted by: N0rt0n January 28, 2008 12:00 am
Hey there,

as i'm new to this forum, a short introduction from my side:
I'm 21 years old, studying physics in germany and i'm interested in programming in my free time. So are two other friends of mine and we're making a mod for the source engine.

The mod is easy to describe:
- Waves of Monsters
- Players with different classes (rogues, casters, etc.)
- Keep the monsters from getting to whatever target
- Slay them! wink.gif

So i'm currently programming our custom monsterSpawn entity. I've tried to use npc_maker first but as we need multiple waves of monsters it didn't seem suited enough.
After some trying out i came accross a crash issue. When i spawn npc_antlion, the game works fine. But when i spawn any(not sure?) other entity like npc_zombie, the game simply crashes when i press the button that controls the entity.

As you are making a mod with AI+multiplayer i wondered if you came across the same problems? And i wanted to ask for help concerning that issue.

Regards!
N0rt0n

Posted by: Lundquist January 28, 2008 03:19 pm
Hello Norton

Im Project Leader and Lead Coder for BBS, i've encountered problems like this trying to get BBS to work.

First let me ask how experienced are you at C++ programming? I don't want to belittle you but what you are trying to do is not exactly the easiest job in the world and there are a few issues you will need to work out.

I can't say off the top of my head what would be wrong with your code, especially if you're using a custom npc_spawner (i use the npc_maker entity for BBS as it has alot of good functionality inside it) but if you can give me an email or a PM about the problem (check my profile)i might be able to help you out.

Also check here for some information on this problem (you might already have read this)
http://developer.valvesoftware.com/wiki/Fixing_AI_in_multiplayer
This is valves Wiki and alot of programming problems or sample code can be found here to help us poor programmers sort out a number of popular issues.

Anyway good luck with your mod, you're going to need it wink.gif

Posted by: SDWBOSS January 28, 2008 09:34 pm
Nice one Lund. Nice to see co-operation between the mods smile.gif

Posted by: N0rt0n January 29, 2008 12:08 am
Heya!

Thanks for the fast reply smile.gif

About my programming experience... I think i know the basics but sometimes i lack the knowledge a computer science student would have. So i understand normal C++ and java code. So maybe adept would describe it wink.gif

As i have no fixed time frame in solving this problem it doesn't matter for me how complex things are and if they are not too easy to solve. We're doing this just for fun and for the learning. Of course i'm willing to share any improvements we are making concerning that or other problems.

About the problem itsself:
Yes i've read the wiki article, though i thought that it wouldn't have any relevance concerning that problem.
What i'm really wondering about is:
why should the npc_antlion spawn correctly and the npc_zombie not? So i reckon that there's a difference between those and if one could figure out the difference both could be made functionable, couldn't they?
And about my entity, it's more like i copied the basic functionality of the npc_maker into my entity, which is, spawning one monster.
In the future its purpose would be to spawn waves of monsters until one wave is depleted and then change to the next monster type.

Regards!
N0rt0n

Posted by: N0rt0n January 29, 2008 07:40 pm
Looks like i got lucky today:
http://www.halflife2.net/forums/archive/index.php/t-124952.html

This seems to be the problem i described, i will try this out and try to figure out whether it's the same thing for the other NPCs.

Regards!
N0rt0n

edit: It worked! The zombie spawned. Though when i tried to hit it with the electro stick, the game crashed again. It looks like this is a sound issue.

Posted by: Lundquist January 30, 2008 12:44 pm
Wow okay that is interesting, we didn't have that problem (we encountered others) when the zombies were being fiddled to work in multiplayer.

Interesting, i suspect the real problem is somewhere deeper in the code, waiting to be triggered and the moan sounds are simply triggering it.

Interesting...

Posted by: N0rt0n February 05, 2008 01:00 pm
yup agree that the problem lies somewhere within.

I've found this tutorial: http://developer.valvesoftware.com/wiki/AIHowTo_MakeANewNPC
and followed it. Now i have my own NPC and now even the npc_zombie models work.
Up next will be the movement of this new NPC, would be kinda boring to have a shooting range wink.gif Still trying to find out how to get this thing to move and attack me biggrin.gif

Posted by: N0rt0n February 26, 2008 09:41 pm
Just wanted to give you a small update. My NPCs are spawning, moving to my waypoints and are attacking the player when they see them. In other words: weeeeeeeeeeeeeeeeeeeeeee biggrin.gif If i can help you with any of the knowledge i've gathered, i'm happy to help smile.gif

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)
LiteBar skin by InvisionSkins.com - copyright 2003 Goof Muilwijk [Roadkill71]