4 ms·
I can't see myself really needing to apply any Linear Algebra concepts writing a Wolfenstein clone in Unity3D. It does everything for you like that (shader grap
by jimmaswell 12y ago
I can't see myself really needing to apply any Linear Algebra concepts writing a Wolfenstein clone in Unity3D. It does everything for you like that (shader graphics, collision detection, vector math, etc). All you'd have to do is code some simple AI for the enemy gameobjects and make the player gameobject in the standard FPS shooting format, which there are pre-built defaults for in the example projects. The majority of this project would be copy and paste with minor modifications.
- ajuc 12y agoEven "just" ai can teach you a lot. For example trying to calculate if enemy can see you, or which path he should take is interesting. Of course you can go far with "turn towards player and shoot" ai, but where's the fun in that. Actually it would be fun to give student's assigment like: here's the AI interface, make a game using it, and write your bot. Then we will run all the bots in free for all mode on all the games (except your bot on your game), and we will grade by sum of the points.
- jimmaswell 12y ago>trying to calculate if enemy can see you Send a raytrace from the bot to the player and see if it hits something other than the player, which is just one line Pathtaking beyond simply moving towards the player is a lot harder, yeah.
- ajuc 12y agoIf you just send 1 ray from eye towards the center of the enemy (or head, or whatever) - and this particular part of the body is occluded by a wall or a chair, but the rest isn't - the result will be wrong. You can accept that, use many rays, or do proper view frustum/body model(simplified probably) intersection, after cutting the view frustum with the terrain. You can also consider lighting (so enemy can't see you hiding in a dark corner), or even dynamic lighting (and give enemies light sources). Everything becomes hard after you think about it enough :) But I agree simple solutions + some tinkering with parameters works most of the time (and gamers probably won't notice).