Sign in to follow this  

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

This topic is 2042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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? Edited by Willy The Vinyl Frog

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 2042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this