Share My Creation Last Ninja - LibGDX Game

hi guys

this is my first libGDX game, this is the first version i am planing some bonus levels and other improvements including a tutorial, so it should be soon updated again

first i want to thank a lot to andymc for his great clony bird example and of course lots of thanks to informatix for the libGDX library.

***********************

the game is very simple, you need to get as much point as you can. you earn points by killing the bird aliens or collecting the flying diamonts.

you can jump (x2 for salto), shoot, slip (not to long because of the friction, unless you want to burn the ninja)
and also you can fly (flappy bird mode) so when you see a rocket just tap the screen :)

have fun and tell me what you think about it ...

tip: tap on the head of the ninja in the menu screen and change the color of the Headband...

LINK: https://play.google.com/store/apps/details?id=www.sagitalnr.net


1.png 2.png 3.png 4.png 5.png
 
Last edited:

thedesolatesoul

Expert
Licensed User
Longtime User
In my opinion it is very impressive
I like it, the game play is smooth, a little bit hard sometimes when i have to jump on the platform and a bomb comes
maybe add a small tutorial level, but it is a good game :)
(Personally i would like to fire 8 shurukens when doing a double jump like in Shinobi ;) )
 

ilan

Expert
Licensed User
Longtime User
thank you "thedesolatesoul"

i am planing some bonus levels and also a tutorial, note that to slip you press once the down key and the ninja slips until it get red and stand up automaticly or u can stand up if you press again the down button or jump button

in the beginning its a little hard but after some games you will see that its much easier...

may i ask you what phone are u using? and android ver. please

thanx
 

ilan

Expert
Licensed User
Longtime User
thanx andymc,

in activiy_create i am adding the views:

B4X:
Sub Activity_Create(FirstTime As Boolean)
'...
    '**
    jumpb.Initialize("jumpb")
    downb.Initialize("downb")
    fireb.Initialize("fireb")
'    buttonpanel.Initialize("")
'    buttonpanel2.Initialize("")
  
  
    pausebt.Initialize ("pausebt")
    backbt.Initialize ("backbt")
    contbt.Initialize ("contbt")
    pausepanel.Initialize("")

'    Activity.AddView(buttonpanel,100%x - 30%x,100%y - 23%y,28%x,20%y)
    Activity.AddView (jumpb,100%x - 14%x, 100%y - 24%y,11%x,22%y)
    Activity.AddView (downb,100%x - 29%x, 100%y - 24%y,11%x,22%y)
'    Activity.AddView(buttonpanel2,3%x,100%y - 18%y,8%x,13%y)
 
'    buttonpanel2.RemoveAllViews
    Activity.AddView (fireb,3%x, 100%y - 24%y,11%x,22%y)
'    buttonpanel.BringToFront
'    buttonpanel2.BringToFront
    jumpb.BringToFront
    downb.BringToFront
    fireb.BringToFront
 
    'pause panel + buttons
    Activity.AddView(pausebt,5%x, 5%y, 40dip, 40dip)
    Activity.AddView(pausepanel,30%x, 20%y, 40%x, 60%y)
 
    Dim bd As BitmapDrawable
    bd.Initialize(LoadBitmap(File.DirAssets , "nss.png"))
    bd.Gravity = Gravity.FILL
    pausepanel.Background = bd
 
    backbt.Text = "Menu"
    backbt.Gravity = Gravity.CENTER
    backbt.TextSize = 12
    backbt.Color = Colors.Black
    backbt.TextColor = Colors.White
    SetAlpha(backbt, 150)
 
    contbt.Text = "Continue"
    contbt.Gravity = Gravity.CENTER
    contbt.TextSize = 12
    contbt.Color = Colors.Black
    contbt.TextColor = Colors.White
    SetAlpha(contbt, 150)

    pausepanel.AddView(backbt, 5%x,17.5%y, 30%x, 12%y)
    pausepanel.AddView(contbt, 5%x,36%y, 30%x, 12%y)
    pausepanel.Visible = False
 
    anim2.InitializeScaleCenter("anim2",0,0,1,1,pausepanel)
    anim3.InitializeScaleCenter("anim3",1,1,0,0,pausepanel)
 
    'loading image
    Activity.AddView(loadingimg,0,0,100%x,100%y)
    loadingimg.SetBackgroundImage(LoadBitmap(File.DirAssets,"loading.png"))
    loadingimg.Gravity = Gravity.FILL
    loadingimg.BringToFront
 
    #If Free
    Try
    mwAdInterstitial2.Initialize("mwadi2","pub-8081096xxxxxxxxxxxxxxxxxxx") 'new admob fullscree
    mwAdInterstitial2.LoadAd'  'admob
    Catch
    Log("")
    End Try
    #End If

 
    change_font
 
End Sub

after that when i press the pause panel i pause the lGdx and bring to front the pausepanel..

B4X:
Sub pausebt_click
If pausepanel.Visible = False Then
    mp4.Pause
    If lGdx.IsInitialized Then lGdx.pause
    pausepanel.Visible = True
    anim2.Duration = 400
    anim2.Start(pausepanel)
End If
End Sub

now if i press the backbutton i show the ad and finish the activity


B4X:
Sub backbt_click
If lGdx.IsInitialized Then lGdx.pause
backbt.TextColor = Colors.Red
pausepanel.Visible = False


'clear saved status
menu.gamesavestate = False
menu.savedscores = 0
meexit = True


'start admob
#If Free
Try
    If menu.shabbat = False Then
        If mwAdInterstitial2.Status = mwAdInterstitial2.Status_AdReadyToShow  Then
        mwAdInterstitial2.show 'admob
        Else
        StartActivity(menu)
        End If
    Else
    StartActivity(menu)
    End If
Catch
    Log("ad failed log")
    StartActivity(menu)
End Try
#End If
     

End Sub


thats it, if you need something else just tell me...
 
Last edited:

Brian Robinson

Active Member
Licensed User
Longtime User
Great... I just installed it and played it. My son was sitting on the lounge and he wanted to try it, so I think you have a winner.
Nexus 4.
 

strat

Active Member
Licensed User
Longtime User
Nice game. Congratulations. Playability and graphics are good.
There is no banner ads in the main screen. Will you add later ? It is possible to add banner ads to LibGDX.
 

ilan

Expert
Licensed User
Longtime User
thanx, i dont really like banner ads and i dont think they really make some money but maybe if i will reach 1.000.000 i will put some more ads :)
 

asales

Expert
Licensed User
Longtime User
Congratulations. Very nice game. Works fine in Galaxy Player with Android 2.3.6.

It's possible to you explain how to make the code to share the information of game in Facebook (button "Choose")? Thanks.
 
Top