Day
You are here: Home
Forum Replies Created
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
DayParticipantnvm fixed it
Framework brl.max2d
needs to be removed from ur demos and tutorial
thought i would give you a heads up
DayParticipantgonna check it over now thanx
DayParticipantok i have made some head way into this i can now position my effect to were i want it but how do i get it to update its position as the ship moves?
to mutch of the code is oop and makes it hard for newer people to read so maybe add some demos etc that dont require as mutch oop.
makes them easy to follow then as the only demo with sprites is vaders and thats way to harsh to figure out if your new.
Damian
Import rigz.timelinefx
Import rigz.tweener
SetGraphicsDriver GLMax2DDriver()
Graphics 1280,800,16,0,1
HideMouse
'
Effects Libarys
Local MyEffectsLib:tlEffectsLibrary = LoadEffects("efx/Effects.eff") ' change to shoot em up eff
Local MyEffect:tlEffect = MyEffectsLib.GetEffect("PlayerThruster") ' simple thruster
Local MyParticleManager:tlParticleManager = CreateParticleManager()
MyParticleManager.SetOrigin(GraphicsWidth()/2,GraphicsHeight()/2)
'
Player
PlayerShip:TPlayerShip = New TPlayerShip
PlayerShip.Image:TImage = LoadImage( "GFX/PlayerShip65.bmp" ) ' Error 001
'
Enemy Normal
'
PreLoop Setup
MyParticleManager.SetScreenSize(GraphicsWidth(), GraphicsHeight())
SetUpdateFrequency(30)
Local Tweener:tTweener = New tTweener.Create(30)
Local TempEffect:tlEffect=CopyEffect(MyEffect, MyParticleManager)
TempEffect.SetX(640)
TempEffect.SetY(759)
MyParticleManager.AddEffect(TempEffect)
'
Main Loop
While Not KeyDown(KEY_ESCAPE)
Cls
Tweener.Update()
For Local Ticks:Int = 1 To Tweener.FrameTicks
Tweener.UpdateExecutionTime()
MyParticleManager.Update()
Next
MyParticleManager.DrawParticles(Tweener.Tween)
PlayerShip.UpdateState()
PlayerShip.DrawSelf()
Flip
Wend
End
'
Types
Type TPlayerShip
Field X:Int = 600
Field Y:Int = 702
Field Speed:Int = 3
Field Lives:Int = 3
Field Weapon:Int = 1
Field ShieldState:Int = 0
Field ShieldEnergy:Int = 0
Field Image:TImage
Function Create:TPlayerShip(File:String, XStart:Int, YStart:Int )
Local Ship:TPlayerShip = New TPlayerShip
Ship.X = XStart
Ship.Y = YStart
Ship.Image = LoadImage( LoadBank(File) )
If Ship.Image = Null
Notify "Error: 001 Unable to load gfx"
End
EndIf
Return Ship
End Function
Method UpdateState()
If KeyDown( KEY_LEFT )
X:- Speed
EndIf
If KeyDown( KEY_RIGHT )
X:+ Speed
EndIf
If X < 0 Then X = 0
If X > 1195 Then X = 1195
End Method
Method DrawSelf()
DrawImage Image, X, Y
End Method
End Type
DayParticipantvery impresive and infact buying timeline was the best bit of money ive spent this year (well not includeing my decs)
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)