1st person 360 turning demo


#1

https://c.gethopscotch.com/p/y3q05owp2
This is the updated version
Check the code to learn


#2

I can't view it because I haven't updated my game yet


#3

Feedback: The left and right buttons turn your character a bit slow. Maybe fix that?


#4

It's just a code demo, not a game.
It's for educational purposes only.
I mentioned I would've coded differently and use cos/sine if was making an actual game.


#5

Oh, that makes sense.


#6

https://c.gethopscotch.com/p/y3q05owp2

This uses Cos/Sine

The 1 is just shown to show the trees position on the map/radar

The number 1 doesn't need to be visible

The 1 Y position is shown at the top

The 1 turns in a large circle bigger than the screen.

The code is easy.

Forever
Set a sprites x position to 1 x position
Forever, when 1 y position is less than ?
Hide sprite
Else show sprite

@Rawrbear
@GoatLord
@AHappyCoder
@MR.GAM3R


#7

That looks great :D
I wonder if one could use size for walking forwards and backwards.


#8

@AHappyCoder
Can you make a tutorial in a new subject.

Just use cos/sine to make a sprite curve from one side tithe other, about a quarter circle.
Forever set a tress X pos to the sprites X pos
Forever if the sprites Y pos is less than ?(its lowest point when it touches the screen edge)
Hide the tree
Else show the tree

You can make a more professional version of this
This is easy to do


#9

That would be hard
Sprites behind would have to get smaller as the sprites in front get bigger.


#10

You mean for my tutorial topic?


#11

Yes for your tutorial topic.
Make it sound easier than I typed here


#12

Would you be able to explain the code a little better, I don't really know what it does XD


#13

You know how to use cos-sine to make a sprite rotate around in a large circle?


#14

Yep.
But not semi circles though I could probably figure it out


#15

This isn't a semi circle.
The circles just bigger than the screen

Just press the left/right arrows to increase/decrease the turn value

Forever set a Trees X position to the 1 x position
Forever if the 1 Y position is less than?(whatever it's Y position is when reaches the screen edge)
Hide the tree
Else,
Show the tree
@AHappyCoder
@TheRealBlah


#16

can you give me the name of your project? it sends me to the following tab.


#17

Do you guys mind if I help? @stradyvarious @AHappyCoder and @Rawrbear are kinda...

FORGIVE ME