Games [Project] Kingdom Crisis (KZ Engine)

wonder

Expert
Licensed User
Longtime User
My latest update showcasing:
- Enemy AI (prototype)
- Gameplay Mechanics (prototype)
- Object Creation / Destruction in DesignerMode

 

wonder

Expert
Licensed User
Longtime User
Last edited:

ilan

Expert
Licensed User
Longtime User
@wonder you must change the character size it is to small. same to the controls
i am using a 5.1" screen (galaxy s5) and everything is to tiny. and hard to play like this.
 
Last edited:

wonder

Expert
Licensed User
Longtime User
@ilan, The controls are now set to 4 centimeters wide, no matter the device or display. Let me know if it works. Sorry about the text, I'll figure it out later.

Version 0.0.8 is out! :)
- New: Background blocks
- New: Secret destructibles

 

melonZgz

Active Member
Licensed User
Longtime User
AWESOME!
I know it's a tech demo, but it's a little too fast for me.
Great work dude.
 

wonder

Expert
Licensed User
Longtime User
Thank you so much! :D

Indeed, with this level of zoom it is/seems too fast... I noticed as well.

I will decrease the speed a little bit next time... :)


EDIT:
Alright I've figured it out. It is an optical illusion (and yet, yes it's too fast).
I've been developing the engine with a zoom level of 14 (higher = distant), but this version has level 9 (closer). Everything seems to move faster.

To illustrate this effect, have a look at this video, the cars seem to move really slow, yet we know they move fast:
http://www.shutterstock.com/video/c...-exit-with-cars-moving-from-above-copter.html
 
Last edited:

ilan

Expert
Licensed User
Longtime User
I have just tested v8 and its greate. A little bit to fast but runs smooth.

What i have noticed and as i remember already mentioned is that when i exit the app
With home button app crashes.
 

wonder

Expert
Licensed User
Longtime User
I forgot to dispose the vectors... Plus I removed "ExitApplication".

B4X:
    Sub Activity_Pause (UserClosed As Boolean)
        If lGdx.IsInitialized Then lGdx.Pause
        If cMap <> 0 Then nc.cMapDispose(cMap)
        Activity.Finish    
        'ExitApplication
End Sub

B4X:
    Sub LG_Dispose
        AM.dispose    
        Batch.dispose
        Vector.dispose
        DisposeFonts
End Sub

I hope it works now... (uploading to GPlay)
 
Last edited:

ilan

Expert
Licensed User
Longtime User
@ilan, The controls are now set to 4 centimeters wide, no matter the device or display.

why r u doing it like this @wonder? there MUST be a relation between sprite size and device you cannot set the same size to a 3.5" screen and a 10" screen!

just use % of the screen.width (or height) it doesnot matter but like this you will get the same size on all devices.

btw. the controls are now to big :)

Screenshot_2016-06-28-14-40-23.jpg
 

ilan

Expert
Licensed User
Longtime User
btw homebutton click wont cause a crash but after homebutton click and then return you got a crash
 

wonder

Expert
Licensed User
Longtime User
why r u doing it like this @@wonder? there MUST be a relation between sprite size and device you cannot set the same size to a 3.5" screen and a 10" screen!

just use % of the screen.width (or height) it doesnot matter but like this you will get the same size on all devices.

btw. the controls are now to big
Thanks... I'll try to figure it out... :confused:
 
Last edited:

wonder

Expert
Licensed User
Longtime User
@ilan, I decreased the acceleration a little bit and changed the ground physics, you're now able to moonwalk on ice. :)
The controls are now set to 33%y or 3.8 centimeters, whichever is smaller...

281cc54acf.png


Since there is no exit button, I don't want to "resume" the app, for now Activity_Pause terminates everything.
I did some voodoo so that Activity_Resume won't crash anymore, but even if it works, it's just a cheap temporary workaround...

I'm going on holiday for 2 weeks, so this is probably the last update before I return.
 
Last edited:

melonZgz

Active Member
Licensed User
Longtime User
I love the particles!
I'd like to implement something similar in my game, but I have a question:
How do you draw them? I'm thinking about little rectangles with a shaperenderer, or little textureregions/sprites...
 

wonder

Expert
Licensed User
Longtime User
Thank you!! ;)

I'm thinking about little rectangles with a shaperenderer,
Yep, exactly like this!!

B4X:
Dim x, y As Double
gl.glEnable(Gl.GL10_BLEND)
Gl.glBlendFunc(Gl.GL10_SRC_ALPHA, Gl.GL10_ONE_MINUS_SRC_ALPHA)
Camera.Update
vector.ProjectionMatrix = Camera.Combined
vector.Begin(vector.SHAPETYPE_Filled)

'Each particle must belong to an actor
For Each character As GameCharacter In CharacterList
    For Each actor As Actor In character.actor
        If actor.isParticlesActive Then                      
            vector.Color = IfTrue(actor.particleColor1 <> actor.particleColor2 And frameCount mod 2 = 0, actor.particleColor1, actor.particleColor2)
            For Each p As GameParticle In actor.particles
                If p.active Then
                    x  = cam.offsetX + p.x - actor.particleHalfSize
                    y  = cam.offsetY + p.y - actor.particleHalfSize                              
                    vector.Rect(x, y, p.size, p.size)                                  
                End If
            Next
            'This function takes care of updating the velocity and position vectors, as well as deactivating any "outOfMap" particles
            actor.ParticlesUpdate(LGStep)
        End If
    Next
Next

vector.end
Gl.glDisable(Gl.GL10_BLEND)

http://b4xgamedev.proboards.com/thread/12/people-working-on?page=2

I can send you some code when I came back... :)
 

melonZgz

Active Member
Licensed User
Longtime User
Thank you!
I've been testing something...
But I've done it in a different way as I'm drawing little sprites. I still have to test a shaperenderer to compare performance.
Basically y generate a explosion of little box2D mini bodies every time there is an impact of the UFO with the level (I discard little impacts) Number of particles and force of the explosion depends on the strenght of the impact. Also playing with the alpha value.
Still testing and adjusting parameters, colors...
Enjoy your holydays:)
 
Top