Lost Password?   -   Register

Post Reply 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
You have to register before you can post on our site.



Social Pages
Like Us on Facebook
Follow Us on Google+
.Phoenix USC on Google+

Follow Us on Twitter


Top Poster
no avatar

no posts

Random Quotes
Other games
ElliottTarson's profile ElliottTarson
Few games that i'm currently playing, all free to play with cash shop if desired. I'm a master at killing time ^_^ *P2W comments in asterisks* - Also availab . . .

01-18-2013, 09:58 PM
Post: #3
RE: hello!
i dont know if you want this or not, but I added a 'shake' effect when the player is hit by incoming fire.

when a certain condition is met, I execute this code

camx = Rnd(-5,5)
camy = Rnd(-5,5)

this executes until the condition is complete which in my case is = to the length that the resulting explosion from the weapon takes to cycle, barely milliseconds the most.

the numbers can be further apart in count for bigger shake or less for smaller shake.

then I modify my setorigin which has always been before the players ship is drawn of course

setorigin(tx+ camx, ty + camy)
where tx = graphicswidth()/2 - playerx
and ty = graphicsheight()/2 - playery

so it keeps the focus on the player ship which is at the centre of the screen, just like subspace, and just like Phoenix.

provides a cool shake effect. I remember the bombs in subspace had a shake effect if they exploded on a wall near you.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
hello! - Cruis.In - 01-18-2013, 05:14 PM
RE: hello! - Vidiot_X - 01-18-2013, 05:25 PM
RE: hello! - Cruis.In - 01-18-2013 09:58 PM
RE: hello! - Vidiot_X - 01-18-2013, 10:59 PM
RE: hello! - Cruis.In - 01-19-2013, 12:33 PM
RE: hello! - Vidiot_X - 01-19-2013, 01:29 PM
RE: hello! - Cruis.In - 01-19-2013, 08:53 PM
RE: hello! - Vidiot_X - 01-21-2013, 07:22 AM

User(s) browsing this thread: 1 Guest(s)
This forum uses Krzysztof "Supryk" Supryczynski addon..: