🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Knowledge of instance positioning, memory of positioning, etc.?

Started by
2 comments, last by IADaveMark 12 years, 1 month ago
Since I can't tackle the mechanics of physics implementation in a pong game, I thought it would be pretty much basic to make, using SDL, a small game with both a player and AI.

The player:

A small 20x20 bitmap image with no animation that moves within a 2-D coordinate system integrated with possibly friction and speed variances.

The computer:

Another small 20x20 bitmap image(possibly a different color, shape, or something)that will independently move around and stop every now and then, and avoid the player, but ALSO be able to "remember" the character's last and current positions in both an implemented system of short and long term memory.

I feel that this project is much easier in terms of physics than ping pong, which I do NOT want to attempt again until I'm very comfortable with SDL and more simpler games(ones without collision variances and bouncing balls).

The problem is ... how do I implement?

I thought maybe using stacks and vectors, along with a short and long term memory system applied with basic maths and timers.

Any info though? Because I could use some tips! Thanks.

EXTRA: Maybe I could push and pop stacks with a self-made timing little system, call random waits, and have a function looped to constantly check the player's now and then positions in relation to more "sophisticated" choices of movements?
Advertisement
You haven't really described how this remembered information will be used, so it would be difficult and premature for us to give advice on implementation. It isn't entirely clear what you mean by "previous" position. Is this a turn based game? Tile base? Is it line-of-sight based, the last place the A.I. saw the player?

If you fully describe the behaviour of the A.I., then we can give more advise.
Yes, exactly what you said.

Line-of-sight would be good considering I know of no ways to implement any "useful" AI in games, nearly anything AI related, including examples with code, will help me get around AI basics.
We still need a better idea of what you are trying to do.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

This topic is closed to new replies.

Advertisement