Share My Creation Scott Pilgrim vs The World

Hi everyone,

this is my second libgdx game, well, it's not just a game, only a free one level demo version of a ps3/xbox360 game. It´s a typical beat 'em up like Double Dragon, Final Fight or most recently Castle Crashers.

I' ve coded this demo to learn how it´s works libgdx library, building a collision detector, a little IA implementation and other needs like sprites animation. I've never done similar things so it has cost me a lot.

Software used:
  • Tiled to position hero, enemies, objects collision, screen limits...
  • Piskel to make hero and enemies sprites animations
  • TexturePacker to build sprite sheet files.
  • Photoshop to modify and adjust sprites
  • Libraries used: Phone, Libgdx and Steering Behaviors for moving enemies

Movements:
  • Tap twice left or right for running.
  • Right + down + right: Shoryuken fist
  • Down + right : Whirlpool kick


Obviously, I have no permission to use images, sprites, music and sounds. The material is used only for educational purposes, please do not distribute or make public the apk file. This is the only place where I share the demo and I don´t want to be in trouble ;)

Some screenshots...

rkptat.png


2rffvag.png


b97jw3.png


5bxn9w.png


Captura de pantalla 2016-03-02 a las 7.55.54.jpg





There are some little glitches but the goal is not to make a non-error game. Sorry for that.


I hope you enjoy the demo.


The APK file:
https://drive.google.com/open?id=0B2GQRnzfMGJTbUVCR1E3UHU2R3M
 
Last edited:

ivavilagu

Member
Licensed User
Longtime User
Nice work!
I'm noticed from games on Android that when you have blocky 8-bit style graphics, the controls should also look blocky, like in Minecraft.

Yes, I agree with you but as I said in main post the objective is to make a functionally demo only.
 

ivavilagu

Member
Licensed User
Longtime User
AWESOME!!! I loved this game so much when it came out!! Really nice job! Congratulations!!

Thanks! I've never played the game on console. I am a fanatic of Castle Crashers ;)
 

ilan

Expert
Licensed User
Longtime User
Great work :)

It would be nice to know how much life a character has left everytime he get hit.
I mean draw a lifebar above character only if get hit for 1 sec. Full life could be green half yellow and near to dead red.

What i noticed (from the video) is that everytime an enemy dies for 1-2 frames nothing is been drawn and all character disapear. Something is wrong when you remove a character from your list.

Nice game, wish you good luck with your project :)
 

ivavilagu

Member
Licensed User
Longtime User
Great work :)

It would be nice to know how much life a character has left everytime he get hit.
I mean draw a lifebar above character only if get hit for 1 sec. Full life could be green half yellow and near to dead red.

What i noticed (from the video) is that everytime an enemy dies for 1-2 frames nothing is been drawn and all character disapear. Something is wrong when you remove a character from your list.

Nice game, wish you good luck with your project :)

Thank you!!!

I also thought about life bar, like Final Fight, but the console version does not have it.

There is an array with the enemies of each area. When an enemy die, he is removed from the array. I know the screen glitches but I have reviewed the code and I have not found the reason of that error.
 

ivavilagu

Member
Licensed User
Longtime User
B4X:
Sub CheckEnemyDeadTime(Enemy As typEnemy) As Boolean                                      
    If (Enemy.TimeDead < 150) Then           'When enemy dies TimeDead is activate to control the time enemy lies on ground                                             
        Enemy.TimeDead = Enemy.TimeDead + 1                                                  
    Else
        Dim a(Enemys.Length - 1) As typEnemy      'TimeDead has reached to 150. To remove enemy from array I create a temporal array, copy all enemies to that array except the dead enemy                                          
        Dim b As Int                                                                        
        For i = 0 To Enemys.Length - 1                                                       
            If (i<> NumEnemy) Then                'NumEnemy is the position of the dead enemy inside the array                                              
                a(b) = Enemys(i)                                                        
                b = b + 1                                                                    
            End If                                                                           
        Next
        Dim Enemys(a.Length) As typEnemy
        Enemys = a
        Return True
    End If
End Sub
 

ilan

Expert
Licensed User
Longtime User
it would be better to handle the enemies in a list and just call

B4X:
Enemys.RemoveAt(NumEnemy)

when timedead has reached 150

B4X:
    Dim enemy As typEnemy 'dec enemy as enemytype
    Dim Enemys As List 'list of enemies
    Enemys.Add(enemy) 'add all enemies to list
'...
Sub CheckEnemyDeadTime(Enemy As typEnemy)                                     
    If (Enemy.TimeDead < 150) Then           'When enemy dies TimeDead is activate to control the time enemy lies on ground                                           
        Enemy.TimeDead = Enemy.TimeDead + 1                                                
    Else
        Enemys.RemoveAt(NumEnemy)
    End If
End Sub



why is the CheckEnemyDeadTime a Boolean ? you remove the enemy in that sub. are you using it to do something else?
 

ivavilagu

Member
Licensed User
Longtime User
I know lists is better to remove elements but the CheckEnemyDeadTime sub was written almost at the end of the demo so if I convert enemies array to list I need to change a lot of code. Fortunately, it is only important in this sub and does not penalize performance because it runs only when the enemy dies


CheckEnemyDeadTime sub returns a boolean because I check for every enemy:
  • If enemy is dead, with CheckEnemyDeadTime
  • Enemy decission
  • Enemy frame
  • Enemy direction
If CheckEnemyDeadTime is true then Enemy decision, frame, and direction subs are not called, obviously because the enemy has been remove from array.
 

ilan

Expert
Licensed User
Longtime User
it is only important in this sub and does not penalize performance because it runs only when the enemy dies

yes it may not effect the performance since your array length is very small (about 3-5 enemies)
you can keep it that way if it will be lot of work to change it and use a list instead.

If CheckEnemyDeadTime is true then Enemy decision, frame, and direction subs are not called, obviously because the enemy has been remove from array.

so that means you check in a loop for each enemy in enemys if enemy is dead and if true dont draw that sprite and all other stuff but are you also calling exit (in that loop) after you found the dead enemy? because if not then CheckEnemyDeadTime i still true and it will also cause to not draw the sprites to all other enemies.

(hard to say where is the error that cause the glitches without looking at the code)
 

ivavilagu

Member
Licensed User
Longtime User
Yeah, I need to exit the loop when the enemy is dead (removed from array) because if the next subs are called with the enemy dead parameter the app crashes... obviously :)

I don´t know why all the screen (enemies, hero, background) flicks when the enemy is removed, It should be some error with render event
 

ilan

Expert
Licensed User
Longtime User
I dont think something is wrong with the render event.

I wrote this game long time ago https://play.google.com/store/apps/details?id=www.sagitalnr.net

And you can see that when i remove enemies there are no glitches.

I believe something in your code causes it.

Anyway i think you did a great job and if i were you i would consider publishing this game after you change all sprites although it was meant only for learning. :)
 

ivavilagu

Member
Licensed User
Longtime User
I would like to make a full beat em up with the quality necessary for being published (I have two games at Play Store too) but I am not a graphic designer. Make sprite animations in pixel art is a hard work and nobody wants to spend many time working for free.
 
Top