Share My Creation Orchard Crush (LibGDX) Game

2nd September Update:
Okay, because I love you guys, have the source code!!!
https://www.dropbox.com/s/r7ycca71klqf645/OrchardCrush_public.zip?dl=0

You'll need the libGDX library to compile it.

Have fun and sorry for the messy code in places. It could probably be made more efficient.

UPDATE:

This has now been loaded onto the Google Play Store:

https://play.google.com/store/apps/details?id=uk.co.coffeeinducedgames.orchardcrush


I've updated the graphics and fixed a few bugs and also added a couple of other tweaks. I'm planning to add a Google play service high score board and acheivements in the future.
 

Attachments

  • Screenshot1.png
    Screenshot1.png
    173.8 KB · Views: 9,154
  • Screenshot3.png
    Screenshot3.png
    246.9 KB · Views: 610
Last edited:

ilan

Expert
Licensed User
Longtime User
looks very nice but i cannot install it, i get an error says i have an other app with the same signature ...
 

ilan

Expert
Licensed User
Longtime User
yes maybe i have used your cloneybird or invaders project and installed it to my phone with my key...
but why dont u use an other packagename for your new app.. did you use invaders project for this app and forgett to change the package name?
 

andymc

Well-Known Member
Licensed User
Longtime User

Himred

Member
Licensed User
Longtime User
Nice game !

Two suggestions:
1: When you get a phone call while playing, when you finish your call the timer is 0, you should stop the timer on pause and restart it on resume
2: A tiny tutorial would help, it took me 30 seconds to understand, thats few, but maybe some users will uninstall the game without a tutorial.

5 stars from me

Himred
 

Douglas Farias

Expert
Licensed User
Longtime User
@andymc how can i make to fix the lag on menu?
for example, the game start perfect i see the many fruits flying, but later 1 min 2min the menu is very very lag
the fruits is very very slow *-*
 
Last edited:

andymc

Well-Known Member
Licensed User
Longtime User
how can i make to fix the lag on menu?

Looks like a memory leak. The fruits aren't removed from the list on the title screen. you can fix it by adding the lines:
For x = 0 to fruitlist.Size-1
Dim fruit as typFruit
fruit.intitialize
fruit = fruitlist.Get(x)
if fruit.y < -100 then
fruitlist.RemoveAt(x)
exit
end if
next

to the region that draws the title screen, there's a region in there called background fruits.
 

ivan.tellez

Active Member
Licensed User
Longtime User
Hi, do you use a tutorial for this code?

Jus curious about the commented lines:

B4X:
'If mouse clicked on already selected area Then clear Fruits away AND increase score

Thanks for the great work
 
Last edited:

jchal

Active Member
Licensed User
Longtime User
hi i tryed to run it but i got the following message
error message:
Copying updated assets files (22)
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sensor listener setup
OGL renderer: Android Emulator OpenGL ES Translator (Intel(R) Iris(R) Plus Graphics)
OGL vendor: Google (Intel)
OGL version: OpenGL ES 2.0 (4.5.0 - Build 26.20.100.7926)
OGL extensions: GL_EXT_debug_marker GL_OES_EGL_sync GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth24 GL_OES_depth32 GL_OES_element_index_uint GL_OES_texture_float GL_OES_texture_float_linear GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_packed_depth_stencil GL_OES_texture_npot GL_OES_rgb8_rgba8 GL_EXT_color_buffer_half_float GL_EXT_texture_format_BGRA8888 ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2
framebuffer: (5, 6, 5, 0)
depthbuffer: (24)
stencilbuffer: (8)
samples: (0)
coverage sampling: (false)
Managed meshes/app: { }
Managed textures/app: { }
Managed shaders/app: { }
Managed buffers/app: { }
Error occurred on line: 181 (Main)
java.lang.IllegalArgumentException: Error compiling shader:
    at com.badlogic.gdx.graphics.g2d.SpriteBatch.createDefaultShader(SourceFile:162)
    at com.badlogic.gdx.graphics.g2d.SpriteBatch.<init>(SourceFile:125)
    at com.badlogic.gdx.graphics.g2d.SpriteBatch.<init>(SourceFile:76)
    at anywheresoftware.b4a.libgdx.graphics.lgSpriteBatch.Initialize(SourceFile:29)
    at com.easyandroidcoding.orchardcrushpublic.main._lg_create(main.java:1323)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.ShellBA$1.run(ShellBA.java:77)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
 

Roger Taylor

Member
Licensed User
Longtime User
Looks like a memory leak. The fruits aren't removed from the list on the title screen. you can fix it by adding the lines:
For x = 0 to fruitlist.Size-1
Dim fruit as typFruit
fruit.intitialize
fruit = fruitlist.Get(x)
if fruit.y < -100 then
fruitlist.RemoveAt(x)
exit
end if
next

to the region that draws the title screen, there's a region in there called background fruits.

I know this is an old thread, but I've found that the following modifications to the code work just the same:


For x = 0 To fruitList.Size-1
Dim fruit As typFruit
fruit.Initialize
fruit = fruitList.Get(x)
Batch.DrawRegion2(fruitframes(0,fruit.ftype-1),fruit.x,fruit.y,60,60)
fruit.my = fruit.my - C_GRAVITY/2
fruit.x = fruit.x + fruit.mx
fruit.y = fruit.y + fruit.my
Next

' For x = 0 To fruitList.Size-1
' Dim fruit As typFruit
' fruit.Initialize
' fruit = fruitList.Get(x)
' fruit.my = fruit.my - C_GRAVITY/2
' fruit.x = fruit.x + fruit.mx
' fruit.y = fruit.y + fruit.my
' Next

' Must be separate loop because of the .RemoveAt(x) method
For x = 0 To fruitList.Size-1
If fruit.y < -100 Then
fruitList.RemoveAt(x)
' Exit
End If
Next
 
Top