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.

DarkBASIC Professional Discussion / I really need some help guys for my mob. Please. .

Author
Message
Hello Everyone !
14
Years of Service
User Offline
Joined: 1st Sep 2011
Location:
Posted: 4th Oct 2011 18:38
Hi guys. I have this 2d side scrolling game. It is Almost done. I know the technique in 2d side scrolling games. That the character is just on the center of the screen and only moving is the Background and platforms. I make a mob for my game. I have attached the codes and media. Dont mind the error of the animation of Mario and the mob. When Mario reaches the center of the screen the background starts to move. But Mario cannot reach the mob because it is moving along with the screen.

Now, try the Code 2 in the notepad. I put some DEC and INC code for the mob's X-axis so that Mario can reach the mob. But when Mario starts to move the mob is getting start to have a problem.

I dont know what to do now. I try all the techniques. Please , if have any idea how will the problem will end, please share it with me.

i have a problem in darkbasic codes. pls help me
Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 5th Oct 2011 00:48
You have the mob on the same coordinate system as the world (you're background). If they're supposed to go backwards at 1 pixel per second, and you're screen's scrolling forward at 2 pixels per second, they're going to be going forward.

What you do is subtract (world_move_rate + enemy_move_rate) from your enemy's current position.
Hello Everyone !
14
Years of Service
User Offline
Joined: 1st Sep 2011
Location:
Posted: 5th Oct 2011 14:02
How can I do that? Im sorry Sir Da_Rhyno but I dont get your point.

I already use the DEC and INC so that the mob can travel to and not staying with the screen. But, what I have just said, when I do it the mob's animation starting to have a problem.

I really Appreciate your help.

i have a problem in darkbasic codes. pls help me

Login to post a reply

Server time is: 2026-07-11 14:37:08
Your offset time is: 2026-07-11 14:37:08