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.

The 20 Line Challenge / Simple Pulsing Object

Author
Message
Papa Stiffy
15
Years of Service
User Offline
Joined: 22nd Sep 2007
Location:
Posted: 13th May 2008 02:49
Someone may have made this before, its quite simple but i really wanted to put something on the 20 line challenge. Here it is =]


http://cobaltgames.moonfruit.com
-------Biatchin' Games-------
sinisterstuf
15
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 15th May 2008 21:58
Hmm... I don't really get the point of this program but as kind of a beginner I learned some stuff which I found very helpful, so thanks

Happy, always happy!
Papa Stiffy
15
Years of Service
User Offline
Joined: 22nd Sep 2007
Location:
Posted: 16th May 2008 04:31
Well thank you, I'm glad it helped

http://cobaltgames.moonfruit.com
-------Biatchin' Games-------
sinisterstuf
15
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 16th May 2008 21:47
I feel kind of stupid saying this but would you mind explaining the rotating camera part to me?

Happy, always happy!
Papa Stiffy
15
Years of Service
User Offline
Joined: 22nd Sep 2007
Location:
Posted: 16th May 2008 22:58
Do you mean this piece of code?

Well it works by first rotating the camera at a 90 degree angle(looking to the side) moves the camera forward in that direction, and then rotates the camera back to its normal position in one line of code. I usually use it for my first person shooters as sidestepping, but used it with the point camera to create the side sweeping effect. Hope that helps

http://cobaltgames.moonfruit.com
-------Biatchin' Games-------
sinisterstuf
15
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 17th May 2008 01:43
Ok, i get it. But does that mean that the camera has to be lying horizontal?

Happy, always happy!
Papa Stiffy
15
Years of Service
User Offline
Joined: 22nd Sep 2007
Location:
Posted: 17th May 2008 04:37
I don't believe so, I've never personally tried it, but if the camera was on an angle, the camera would just look to its left or right, move in that direction, and turn back to it's normal facing position. I've never come across a situation where the camera had to be on an angle, but i think it would work the same.

http://cobaltgames.moonfruit.com
-------Biatchin' Games-------
sinisterstuf
15
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 17th May 2008 14:02
Ok, this is what I think. If the camera is at an angle then when it turns 90' it will be facing to the right but because it was at an angle it will now also be facing down (same as when it was forward facing) then when it moves forward it also moves down. Then it looks at the object again. This means that as the camera rotates around the object it will go down. I think all you would need to is to straighten the camera before you rotate it and then point it at the object again at the end.

Do you mind if I use this in a program that I am making?

Happy, always happy!
Papa Stiffy
15
Years of Service
User Offline
Joined: 22nd Sep 2007
Location:
Posted: 17th May 2008 16:55
I'm not quite sure what the angle in the explanation was so I can't really understand it. But sure, I don't mind if you use it in a program. Just if it's a large part of the program(ex. your making a flying camera around an object and that's the whole program) I would like some recognition Otherwise, go right ahead and use.

http://cobaltgames.moonfruit.com
-------Biatchin' Games-------
sinisterstuf
15
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 17th May 2008 17:36
Ok, well that's it, I will show you the program when it's done and I will definetely mention you, thanks.
The angle I'm talking about is that if the camera is higher than the object it rotates about then the camera is tilted down along it's x angle so as to keep the object in the centre of the view, does that make sense?

Happy, always happy!
Papa Stiffy
15
Years of Service
User Offline
Joined: 22nd Sep 2007
Location:
Posted: 17th May 2008 18:16
Ohhh, yes it does, and I'm pretty sure that'll work. You would just need to change the Y-position of the camera to a set number instead of ground height. And thanks a lot, I'll be looking forward to seeing the program!

http://cobaltgames.moonfruit.com
-------Biatchin' Games-------
sinisterstuf
15
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 19th May 2008 13:40
Ok, so I used an adaptation of your code in this program that makes exploding boxes which I entered for the DBpro coding challanges. So if you like you can go and see it there... I thanked you in my post of version 2, the main improvement of which was a moving camera, incase you were wondering. But I also credit you in the start of my code and at the appropriate point in the code.

Thanks once again, you not only showed me a new technique but had me think about different methods of doing other stuff which has improved my coding.

Happy, always happy!
Must Program
15
Years of Service
User Offline
Joined: 22nd Nov 2007
Location:
Posted: 20th May 2008 20:28
And its god if sinisterstuf learns stuf because hes my coding partner lol
Papa Stiffy
15
Years of Service
User Offline
Joined: 22nd Sep 2007
Location:
Posted: 22nd May 2008 18:45
Yes I saw the program, very neat! Congratulations on the runner-up, and thanks for the recognition.

http://cobaltgames.moonfruit.com
-------Biatchin' Games-------
sinisterstuf
15
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 22nd May 2008 22:14
Thanks! No problem.

Happy, always happy!

Login to post a reply

Server time is: 2022-12-01 19:34:53
Your offset time is: 2022-12-01 19:34:53