DSLua Community

DSLua - Best scripting language for Nintendo DS => Home-brew/Hacks/Games/Projects => Topic started by: manu62300 on May 07, 2007, 12:28:45 PM



Title: Jetfighter 0.3b
Post by: manu62300 on May 07, 2007, 12:28:45 PM
Yep it's me Cid2Mizard ^,
I have a Bug whit my jet bottom when i compil whit DSLua 0.6 but not with dualis ..!!!!mystery
I need DSLua 0.7 or 0.6d ,who can send to me ???


Title: Re: Jetfighter 0.1b
Post by: jester on May 07, 2007, 02:37:11 PM
check Jeremysr's DSLua tutorial site for info on how to fix this issue.


Title: Re: Jetfighter 0.1b
Post by: manu62300 on May 07, 2007, 03:03:05 PM
dificult translate


ps:i'm french


Title: Re: Jetfighter 0.1b
Post by: Jeremysr on May 07, 2007, 05:00:44 PM
They've already been translated to french, go to the tutorial section of xtreamlua.com.

But anyways can you upload the code of your game? It's much more useful because then everyone can run the game and we can see if there is a problem with your code. Some people (like me) can't run GBFS versions of DSLua games with the equipment we have.


Title: Re: Jetfighter 0.1b
Post by: manu62300 on May 08, 2007, 12:03:59 AM
yep!!!

JetFighter 0.1bscript (http://www.megaupload.com/?d=YYFYWHGU)

no bug with dualis but one with DSLua 0.6 with jet
and 0.7 with background  :-[

for gbfs :
JetFighter 0.1.nds (http://www.megaupload.com/?d=FA4M6271)


Title: Re: Jetfighter 0.3a
Post by: manu62300 on May 15, 2007, 06:43:48 AM
Un petit screenshot de la 0.3a

(http://i14.servimg.com/u/f14/11/16/46/09/jet310.jpg)


Title: Re: Jetfighter 0.1b
Post by: manu62300 on May 15, 2007, 11:44:51 AM
help me for the shoot

You could put a complete script with a jet which draws a bullet which crosses the 2 screens because I does not understand please...

Code:
SCREEN_BOTTOM     = 0
SCREEN_TOP        = 1
PALETTE_JET1      = 0
PALETTE_JET2      = 1
PALETTE_LASER1    = 2
PALETTE_LASER2    = 3
PALETTE_LASER3    = 4
PALETTE_LASER4    = 5
PALETTE_LIFE      = 6
PALETTE_EXPLOSION = 7
----------------------------------------------------------------------------
local m_Buttons = {
    A = { Pressed = false, timer = 0 },
    B = { Pressed = false, timer = 0 },
    X = { Pressed = false, timer = 0 },
    Y = { Pressed = false, timer = 0 },
    L = { Pressed = false, timer = 0 },
    R = { Pressed = false, timer = 0 },
    Left = { Pressed = false, timer = 0 },
    Right = { Pressed = false, timer = 0 },
    Start = { Pressed = false, timer = 0 },
    Select = { Pressed = false, timer = 0 },
    Up = { Pressed = false, timer = 0 },
    Down = { Pressed = false, timer = 0 },
}
-------------------------------------------------------------------------------
function ButtonDown( name )
    if Pads[ name ]() then
        if not m_Buttons[ name ].Pressed then
            m_Buttons[ name ].Pressed = true
            m_Buttons[ name ].timer = 0
            return true
        else
            m_Buttons[ name ].timer = m_Buttons[ name ].timer + 1
        end
    else
        if m_Buttons[ name ].Pressed then
            m_Buttons[ name ].Pressed = false
            return false
        end
    end
    return false
end
-------------------------------------------------------------------------------
function ButtonLongPressed( name )
    if m_Buttons[ name ].Pressed and m_Buttons[ name ].timer >= 6 then
        return true
    end
    return false
end
-------------------------------------------------------------------------------
BGBotMap = Screen.LoadTileBG()
BGTopMap = Screen.LoadTileBG()
BGBotText = Screen.LoadTextBG()
BGTopText = Screen.LoadTextBG()

BGBotMap:LoadPalette( "decorbot.pal" )
BGBotMap:LoadTiles( "decorbot.raw", 256 )
BGBotMap:LoadMap( "decorbot.map", ( 256 / 8 ), ( 192 / 8 ))
Screen.Initialize ( 0, BGBotText, BGBotMap )

BGTopMap:LoadPalette( "decortop.pal" )
BGTopMap:LoadTiles( "decortop.raw", 256 )
BGTopMap:LoadMap( "decortop.map", ( 256 / 8 ), ( 192 / 8 ))
Screen.Initialize ( 1, BGTopText, BGTopMap )

BGTopText:SetColor( 5 )
BGTopText:PrintXY( 0, 0, "Jetfighter: Cid2Mizard for DSLua" )
BGTopText:SetColor( 6 )
BGTopText:PrintXY( 31, 5, "S" )
BGTopText:PrintXY( 31, 6, "C" )
BGTopText:PrintXY( 31, 7, "O" )
BGTopText:PrintXY( 31, 8, "R" )
BGTopText:PrintXY( 31, 9, "E" )
BGTopText:PrintXY( 31, 10, "-" )
BGTopText:PrintXY( 31, 11, "0" )

BGBotText:SetColor( 1 )
BGBotText:PrintXY( 10,23, "Start : Quit" )
BGBotText:SetColor( 6 )
BGBotText:PrintXY( 0, 5, "S" )
BGBotText:PrintXY( 0, 6, "C" )
BGBotText:PrintXY( 0, 7, "O" )
BGBotText:PrintXY( 0, 8, "R" )
BGBotText:PrintXY( 0, 9, "E" )
BGBotText:PrintXY( 0, 10, "-" )
BGBotText:PrintXY( 0, 11, "0" )

Sprite.LoadPalette( SCREEN_TOP, PALETTE_JET1, "jet1.pal" )
Sprite.LoadPalette( SCREEN_BOTTOM, PALETTE_JET2, "jet2.pal" )
Sprite.LoadPalette( SCREEN_TOP, PALETTE_LASER1, "laser1.pal" )
Sprite.LoadPalette( SCREEN_BOTTOM, PALETTE_LASER3, "laser1.pal" )
Sprite.LoadPalette( SCREEN_TOP, PALETTE_LASER4, "laser2.pal" )
Sprite.LoadPalette( SCREEN_BOTTOM, PALETTE_LASER2, "laser2.pal" )
Sprite.LoadPalette( SCREEN_TOP, PALETTE_LIFE, "life.pal" )
Sprite.LoadPalette( SCREEN_BOTTOM, PALETTE_LIFE, "life.pal" )
Sprite.LoadPalette( SCREEN_TOP, PALETTE_EXPLOSION, "explosion.pal" )
Sprite.LoadPalette( SCREEN_BOTTOM, PALETTE_EXPLOSION, "explosion.pal" )

Jet1Frames   = FrameStrip.Create( SCREEN_TOP, 32, 32, "256" )
Jet2Frames   = FrameStrip.Create( SCREEN_BOTTOM, 32, 32, "256" )
Laser1Frames = FrameStrip.Create( SCREEN_TOP, 16, 8, "256" )
Laser2Frames = FrameStrip.Create( SCREEN_BOTTOM, 16, 8, "256" )
Laser3Frames = FrameStrip.Create( SCREEN_BOTTOM, 16, 8, "256" )
Laser4Frames = FrameStrip.Create( SCREEN_TOP, 16, 8, "256" )
Life1Frames  = FrameStrip.Create( SCREEN_TOP, 64, 64, "256" )
Life2Frames  = FrameStrip.Create( SCREEN_BOTTOM, 64, 64, "256" )
Explosion1Frames  = FrameStrip.Create( SCREEN_TOP, 32, 32, "256" )
Explosion2Frames  = FrameStrip.Create( SCREEN_BOTTOM, 32, 32, "256" )

Jet1Frames:LoadBin( "jet1.raw", 1 )
Jet2Frames:LoadBin( "jet2.raw", 1 )
Laser1Frames:LoadBin( "laser1.raw", 1 )
Laser2Frames:LoadBin( "laser2.raw", 1 )
Laser3Frames:LoadBin( "laser1.raw", 1 )
Laser4Frames:LoadBin( "laser2.raw", 1 )
Life1Frames:LoadBin( "life.raw", 5 )
Life2Frames:LoadBin( "life.raw", 5 )
Explosion1Frames:LoadBin( "explosion.raw", 5 )
Explosion2Frames:LoadBin( "explosion.raw", 5 )

ModIntro = Music.LoadMod( "intro.mod" )

nX     = 104
nY     = 50
nA     = 104
nB     = 50
nvX    = 0
nvY    = 0
nvA    = 0
nvB    = 0

Jet1   = Sprite.Create( Jet1Frames, 0, PALETTE_JET1, nA, nB )
Jet2   = Sprite.Create( Jet2Frames, 0, PALETTE_JET2, nX, nY )
Life1  = Sprite.Create( Life1Frames, 4, PALETTE_LIFE, 1, 64 )
Life2  = Sprite.Create( Life2Frames, 4, PALETTE_LIFE, 247, 64 )
Laser1 = nil
Laser2 = nil
Laser3 = nil
Laser4 = nil
----------------------------------------------------------------------------------------------
function Laser1Check()
if nvB > 191 then
Laser1:Free()
    Laser1 = nil
if Laser1 == nil then
nvC = nvB - 191
Laser3   = Sprite.Create( Laser3Frames, 0, PALETTE_LASER3, nvA, nvC )
end
end
end
----------------------------------------------------------------------------------------------
function Laser2Check()
if nvY < 1 then
Laser2:Free()
    Laser2 = nil
if Laser2 == nil then
nvZ = nvY + 191
Laser4   = Sprite.Create( Laser4Frames, 0, PALETTE_LASER4, nvX, nvZ )
end
end
end
----------------------------------------------------------------------------------------------
function Laser3Check()
if nvC > 191 then
Laser3:Free()
    Laser3 = nil
end
end
----------------------------------------------------------------------------------------------
function Laser4Check()
if nvZ < 1 then
Laser4:Free()
    Laser4 = nil
end
end
----------------------------------------------------------------------------------------------
while true do
  ModIntro:Play()

  Jet1:MoveTo( nA, nB )
  Jet2:MoveTo( nX, nY )

  if Pads.Right() then
nX = nX + 3
  end

  if nX >= 224 then
nX = nX - 3
  end

  if Pads.Left() then
nX = nX - 3
  end

  if nX <= 0 then
nX = nX + 3
  end

  if Pads.Up() then
nY = nY - 3
  end

  if nY <= 0 then
nY = nY + 3
  end

  if Pads.Down() then
nY = nY + 3
  end

  if nY >= 160 then
nY = nY - 3
  end

  if Pads.A() then
nA = nA + 3
  end

  if nA >= 224 then
nA = nA - 3
  end

  if Pads.Y() then
nA = nA - 3
  end

  if nA <= 0 then
nA = nA + 3
  end

  if Pads.X() then
nB = nB - 3
  end

  if nB <= 0 then
nB = nB + 3
  end

  if Pads.B() then
nB = nB + 3
  end

  if nB >= 160 then
nB = nB - 3
  end

  if ButtonDown ( "R" ) then
    nvA     = nA + 8
    nvB     = nB
  Laser1   = Sprite.Create( Laser1Frames, 0, PALETTE_LASER1, nvA, nvB )
  end

  if ButtonDown ( "L" ) then
    nvX     = nX + 8
    nvY     = nY
  Laser2   = Sprite.Create( Laser2Frames, 0, PALETTE_LASER2, nvX, nvY )
  end

  if ( Laser1 ~= nil ) then
    nvB     = nvB + 3
    Laser1:MoveTo( nvA, nvB )
    Laser1Check()
  end

  if ( Laser2 ~= nil ) then
    nvY     = nvY - 3
    Laser2:MoveTo( nvX, nvY )
    Laser2Check()
  end

  if ( Laser3 ~= nil ) then
    nvC     = nvC + 3
    Laser3:MoveTo( nvA, nvC )
    Laser3Check()
  end

  if ( Laser4 ~= nil ) then
    nvZ     = nvZ - 3
    Laser4:MoveTo( nvX, nvZ )
    Laser4Check()
  end

  if Pads.Start() then
    break
  end

  Screen.WaitForVBL()
end

Jet1Frames:FreeAll()
Jet2Frames:FreeAll()
Laser1Frames:FreeAll()
Laser2Frames:FreeAll()
Laser3Frames:FreeAll()
Laser4Frames:FreeAll()
ModIntro:Free()

Help me for the Laser correctly and initialize life and score


Title: Re: Jetfighter 0.2b
Post by: manu62300 on May 16, 2007, 03:29:54 PM
Please help me !!


Jetfighter0.2b.zip (http://www.megaupload.com/?d=JWSJ6JH1)

Jetfighter0.2b.script.zip (http://www.megaupload.com/?d=E2U1L0RD)




Title: Re: Jetfighter 0.3b
Post by: manu62300 on May 19, 2007, 11:59:42 AM
Voici la version 0.3b:

Nouveautés:
- les shoots sont maintenant parfait d' un ecran à l'autre.
- le score et la jauge de vie apparaissent mais toujour pas gerées.
- changement de la music pas trés entrainante auparavant .
- la sprite explosion a été crée mais comme la vie et le score ne sont pas geré ,pas d'explosion visible.
le binaire GBFS :

Jetfighter0.3.b.zip (http://rapidshare.com/files/32225269/Jetfighter0.3.b.zip)

(http://i15.servimg.com/u/f15/11/16/46/09/dualis13.jpg)


Title: Re: Jetfighter 0.3b
Post by: daltonlaffs on May 19, 2007, 02:29:36 PM
The download link doesn't work.

You shouldn't use MegaUpload, try Rapidshare.com -- it doesn't delete your files until they haven't been downloaded for 45  days  ;D


Title: Re: Jetfighter 0.3b
Post by: manu62300 on May 19, 2007, 02:54:01 PM
ok thanks I have changed Link


Title: Re: Jetfighter 0.3b
Post by: Wolf Link10 on May 23, 2007, 08:32:19 PM
Hey anyone here remarkably good with PALib? If so PM me. Theres an awesome Zelda DS hombrew game that some people need help with.


Title: Re: Jetfighter 0.3b
Post by: Jeremysr on May 24, 2007, 12:34:40 AM
Uh, try palib.info forums. :P


Title: Re: Jetfighter 0.3b
Post by: manu62300 on July 12, 2007, 05:01:22 PM
Who have a good sound .raw for my laser Jet , but it play with the music ?