Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / A.I and Animation problem

Author
Message
MiR
21
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 5th Apr 2004 17:44 Edited at: 5th Apr 2004 17:45
First off. I´m coding a 2d fighting game simular to Street Fighter but without the combos. The main engine/code/whatever is finsihed for two player but I´m having trouble coding A.I. So far the a.i player moves close to his oponent and attempts to hit them when he gets close enough. The trouble is that when he walks he doesn´t animate. Sometimes he blinks and sometimes his animation frame doesn´t change at all. Here´s the code for one level. I can´t give you the images as they´re bitmaps and therefor to big to bother with. I know the code´s a big mess but I´m still new to this(hence posting in the newbie section). If you have any questions feel free to ask.

Libera tu mente y te liberaras a ti.
MiR
21
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 5th Apr 2004 17:54
Smeg. I´ve just broken one of the forum rules. I´m using DarkBasic Classic btw.

Libera tu mente y te liberaras a ti.
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 5th Apr 2004 19:14
Gah!

load bitmap....
get image...
delete bitmap...

You can reduce that to one line.

load image "filename.bmp", imageID

load bitmap is usually used when you want to load and edit a bitmap and then perform a get image. When doing a simple loading operation, you can skip all the other stuff.
--
TAZ

MiR
21
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 5th Apr 2004 20:59 Edited at: 5th Apr 2004 21:02
I learn´t that half way through coding the game. As I couldn´t be bothered to change what I´d done up till then I carried on doing the same method.

Libera tu mente y te liberaras a ti.

Login to post a reply

Server time is: 2024-09-22 04:31:09
Your offset time is: 2024-09-22 04:31:09