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.

2D All the way! / A Few Questions to All

Author
Message
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 12th Jul 2007 21:55
All
Please Download the attached File (.zip) and run the .dba.
Tell me a few things about the stick guy.
1. Is it possible to remove that white box? (It's the one around the picture in paint.)
2.Is there a better way to do animation?
3.Is there a better way to code animation?
4. If I can't remove the box, will DB check for collsion bettween the boxes or the stick guys?

-Dark Dragon
working on Stick Fighter Alpha.

Attachments

Login to view attachments
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Jul 2007 01:35
@ DD

Are you using DBC or DBP? Either way, yes to 1 - 3. On #4, I use math collision myself and it could be done with these images.

If you eliminate the white box, how will you see the character? Is your intent to make it a different color? Otherwise, you would have to change the background color so you could see it.

Normally, people like to get a view of what you are asking them to download. If you save your bitmaps as .jpg files you can post them with the file attacher. (I wouldn't necessarily post them all, but maybe one to show people what you're working on.) Also, the .dba code is put into a snippet box instead of being in the download itself. This way, everyone can look at it to see if they want to invest the time to help you.

LB
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2007 01:42 Edited at: 13th Jul 2007 01:43
okay, thanks. I'll put my code and other stuff on here tomorow.
I'm using DBclassic.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Jul 2007 02:46
@ DD

I see you posted very similar questions on two boards. That is frowned upon.

Do you want the character to be black, or do you intend to color-in the black area?

If you want the character to be black (I wouldn't recommend doing this), then you will have to color the background so that you can see it. Once you figure out the background color, just fill that color on the white part on all of the images in your paint program. and it should show up fine. If you plan on this charater passing over something of a different color, I would color the black rgb(5,5,5),0. Otherwise, you will see it right through the sprite image. Understand also that whatever background color you choose will mask whatever you are walking over. i.e. if you choose green as a background color and your black stick-man has a green background color around it, if you walk past a brown rock, the green on the background part of the sprite will hide the rock. It won't be pretty. To get around this, you could make a one pixel outline of your stick-man with the background color and then color the rest of the sprite's background in black. Seems like a lot of work to me, but it's your choice.

If you want the character to be another color, then simply fill in the black with that color on all of your images and fill what is now white with black.

I prefer to use arrays to track where a sprite is and it's status.

LB
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2007 05:15 Edited at: 13th Jul 2007 15:03
Thanks for the tips! My Stick Fighter Alpha game is gonna rock!
And now to tackle the AI.....
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2007 15:28 Edited at: 13th Jul 2007 15:29
Hmm... I need another suggestion. With my bot's AI, Should I ...
1.check the bot's distance between the player and itslef and go from there,
or
2.make the bot move left until it reaches the player?
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Jul 2007 15:48
It depends upon how "smart" you want to make the bots. You need to have a good balance. If you make the bots too smart, to where it immediately goes directly for the player, it will likely cream your player every time. This might be okay in the upper levels of a game, but definitely not on the early levels. You have to put in some randomness so that the player is challenged to avoid or destroy the bots. On the other end, if the bot is too stupid, the player will cream it every time and there is no challenge to the game. I would suggest having bots of differing intelligence, with them all getting smarter as you progress through the game.

To answer your question, you might have some bots that use #1 and some that use #2, though I wouldn't necessarily always move the bot left. You could, for example, have the bot move in any one of eight directions for x amount of steps without concern for the player. Then perhaps if the player comes within, say 150 pixels of the bot, then the bot goes into attack mode. You're only limited by your imagination as to what you do.

LB
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2007 16:13 Edited at: 13th Jul 2007 16:13
yeah.. I get what you are saying....I actually I have number 1 set up on a distance formula here:


(SPRITE 2 Being the bot)
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2007 19:22
here's the first attempt (Before and after AI). Left and Right to move and space to uppercut.

By the way, How do you do Jumping(I tried as you see in the code included.)?

Attachments

Login to view attachments
Animation
16
Years of Service
User Offline
Joined: 13th Jul 2007
Location: Cyber
Posted: 13th Jul 2007 19:58
Hey I belive I have a code for the jumping I could give to you.
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 14th Jul 2007 00:27 Edited at: 14th Jul 2007 02:34
Where is it, AJ?

Login to post a reply

Server time is: 2024-05-19 05:45:39
Your offset time is: 2024-05-19 05:45:39