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 / Help wrapping an object. (DBC)

Author
Message
boymonkey 130
19
Years of Service
User Offline
Joined: 16th Oct 2005
Location:
Posted: 23rd May 2006 05:07
I stopped programming a bit after I got DBC because I had to use mroe time on my homework. I've Just recently gotten back into programming, and I'm having a small problem. I'm making a minigame for now, and I want the circle I've made to wrap from one side of the screen to another. I know I used to know how to do this, but with my stop in working on it I've forgotten how.
I searched a little bit, but I coudldn't find what I wanted to know. A little help?
Here's what I have so far(I know it's small, but I'm working on it XD)

Zeddex
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 23rd May 2006 19:07
what you mean but wrap from 1 side to anothere ?

If Zeddex can, you can. If you have an idea, make it.
boymonkey 130
19
Years of Service
User Offline
Joined: 16th Oct 2005
Location:
Posted: 23rd May 2006 22:45
the camera stays still (for now).
I want it so that when the object you control reaches the top of the camera's view, the object wraps down to the bottom of the camera's view. I know my friend did this once, and I know he told me how, but I forget now. XD
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 23rd May 2006 23:44
not great but it works


life's one big game
spec= 2.6ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
boymonkey 130
19
Years of Service
User Offline
Joined: 16th Oct 2005
Location:
Posted: 24th May 2006 04:00
Thanks. You helped alot.
boymonkey 130
19
Years of Service
User Offline
Joined: 16th Oct 2005
Location:
Posted: 24th May 2006 06:04
new problem.

Ok, I got the wrapping to work, and I got a bit done, but I'm stuck in making the background wrap right. I have it so that there's a line of bricks spinning in the back, and when the sphere goes up, they're supposed to go a little bit up, not to match, but to give the illusion that the sphere is moving high above the cubes (which it is... sorta)
But the cubes don't go to the bottom right, and they don't even move right. They don't always wrap, and once I start going up, they don't stop. They go up, and sometimes change to down when I'm heading down. Here's the code I'm having trouble with, and the rest of the program attached if you need that, too.

Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 24th May 2006 10:21
Well you don't have anything to say which direction you are heading. Just code to say whether you are above or below the bricks.

To say which direction you are heading you need two positions. Your current position, and your last position. If your current position Y is greater than your last position Y then you are going down the screen, and vice-versa. Then you would change this....

if objx<object position x(1) then move object f, 2
if objx>object position x(1) then move object f, -2

With the new check.

boymonkey 130
19
Years of Service
User Offline
Joined: 16th Oct 2005
Location:
Posted: 25th May 2006 00:30
Even after I got it to work a little bit, I dropped the other background idea because it was way too far ahead of me, and any progress I made in it would have come from someone here giving me the code directly, and then I wouldn't have learned anything. So, thanks for the help, but I'm just gonna go with something else.

and this something else has confused me, even when I wasn't rusty.
I may not be very good at figuring this out, but I'm stuck with making the squares sway. I read a tutorial on how to make a set of variables to make jumping, and I've been trying to make it work for this, too.
Here's the code.

but when I execute, it goes up, up... up... and doesn't stop. I want it to swing back and forth, increase in speed to a point, then decrease in speed untill it's goin backwards, then loop, but it won't slow down.

again, full code attached, in case you need it.
boymonkey 130
19
Years of Service
User Offline
Joined: 16th Oct 2005
Location:
Posted: 25th May 2006 01:20
Nevermind, a friend helped me out.

Login to post a reply

Server time is: 2024-11-26 20:03:16
Your offset time is: 2024-11-26 20:03:16