Other B4A Minigame competition 2014 Xmas edition

sorex

Expert
Licensed User
Longtime User
The year is reaching its end which means a lot of minigame compos will reach their deadline aswell.

What about a minigame compo for B4A with a Christmas based theme for the game(s)?

A month left to create a minigame which should be enough.

Rules could be...

- Christmas/Winter themed
- Made in B4A (source need to be provided as proof)
- Made by yourself (not taking a flappy bird or match3 game example from this forum and just replace some gfx)
- Game may not be released before by you on Google Play (as in no quick game recycling by using new gfx to fit the theme)
- Filesize limit not set yet (5Mb?)
- Deadline reached, the poll is online.
- Voting from Dec 28 - Jan 1st via forum poll?
- Attenders/Winners might know the result on Jan 1 2015

Erel knowing, he might throw in some B4i+B4A,B4i license(s) or something for the winner or top3.

Erel is so kind to donate 3 B4i + hosted Mac builder licenses for the top 3.


So it's always worth attending for that, the fun , the challenge or to explore the other side of app building (games).

See it as promoting your skills and the possibilities of B4A.


Current entry list:

game title - author (used libs, classes, modules)

Don`t tip the tree! - Mike H. (core, gesturedetector, animation, animationplus)

PicPuzzleXmas
- The Desolate Soul (core, javaobject, msstaggeredgridview, mediabrowser, filehelper, msanimator, reflection, msmaterialmenu, stdactionbarhelper, threading, phone, callsubextended, mscardview)

15 Tiles Xmas Edition
- UDG (Reflection, StringUtils, dgPickers, Classes: DraggableView, CustomListView, Module: StateManager)

Xmas Mahjong - cbc551 (core,audio,acceleratedsurface,scrollview2d,gesturedetector,animationplus)

Santa Chaos - Ilan (Admob, Animation, Core, Reflection)

Santa Got Stuck up the chimney - Dibb3386 - (Core, Gesture Detector)

Elf attack - RandomCoder (core,phone,reflection,audio)

CLAUStrophobia - Sorex (core)
 
Last edited:

susu

Well-Known Member
Licensed User
Longtime User
I found another bug. Open first picture -> OK. Open another picture -> Can not move parts.
 
Upvote 0
D

Deleted member 30048

Guest
cbc551's entry, Xmas Mahjong, has been added to the first post

Thanks sorex. :)

For those who want to play xmas mahjong and have small screen, can do zoom pinching the screen with two fingers
 
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
For those who want to play xmas mahjong and have small screen, can do zoom pinching the screen with two fingers

Nice app! However, when I won the game, there's an error like this screenshot.

screenshot.jpg
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Santa Chaos - (My mini compo game)

Santa Chaos is a funny and addictive game for the whole family, catch as much gifts as you can and save the holiday...

Link: https://play.google.com/store/apps/details?id=www.sagitalsc.net

Used lib: Admob, Animation, Core, Reflection | Game is working with a timer... (Intro is done with *.SetLayoutAnimated() - B4a 4.0)

PS: Tap the santa to let him hohoho.... (have just uploaded the app so the link may work in few minutes only...)
Good Luck to everyone... :)

EDIT: Please download v1.0.2 (bug fixed and unchecked unused libs, file size 3.15 MB)

1.png 2.png

 
Last edited:
Upvote 0

dibb3386

Member
Licensed User
Longtime User
Santa Got Stuck up the chimney - Dibb3386 - (Core, Gesture Detector) https://www.dropbox.com/sh/yd5dpomm0qk37vf/AAD7sDxSd4-oxYJEl0U2DUNfa?dl=0

B4X:
#Region  Project Attributes
    #ApplicationLabel: Santa got stuck up the chimney
    #VersionCode: 1
    #VersionName: B4a Compo
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: portrait
    #CanInstallToExternalStorage: True
#End Region

#Region  Activity Attributes
    #FullScreen: True
    #IncludeTitle: False
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
Dim TimerClock As Timer
    TimerClock.Initialize("TimerClock",1000)
Dim MediaPlayer1 As MediaPlayer

Dim MoveTimer As Timer
MoveTimer.Initialize("MoveTimer", 10000) 'Used to move SantaImg around a bit

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Private GD As GestureDetector 'Used to detect swipe up gesture for pulling up santas pants
    Private HowToPlayBtn As Button
    Private HowToPlayImg As ImageView
    Private menuimg As ImageView
    Private StartBtn As Button
    Private SantaCounter As Int : SantaCounter= 0
    Private SantaImg As ImageView
    Private ScoreLbl As Label
    Private CountUp As Int : CountUp = 0
    Private TimeLbl As Label
    Private RndNum As Int 'Used for selecting a random number for the required amount of clicks (santa pushes) to complete the game
   
    Private SantaLeftImg As ImageView
    Private SantaRightImg As ImageView

    Private EndGamePanel As Panel
    Private FinalScoreLbl As Label
    Private PlayAgainImg As ImageView
    Private WinorLoseLbl As Label
    Private UploadToFbImg As ImageView
   
    Private SantaDownImg As ImageView
    Private SantaFullDownImg As ImageView
    Private BgPanel As Panel
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)
MediaPlayer1.Stop
End Sub

Sub HowToPlayBtn_Click
HowToPlayImg.Visible = True
HowToPlayImg.BringToFront
End Sub
Sub HowToPlayImg_Click
HowToPlayImg.Visible = False
End Sub
Sub TimerClock_Tick
CountUp = CountUp +1
TimeLbl.Text = CountUp &" Seconds"
End Sub
Sub Wait(MilliSekunden As Int) 'Code found on the b4x forum to have a wait command.
   Dim Ti As Long    'Not ideal as it has caused lag on testing but lowering the wait time to 200 minimised the lag
   Ti = DateTime.Now + MilliSekunden
   Do While DateTime.Now < Ti
      DoEvents
   Loop
End Sub

Sub MoveTimer_Tick
SantaImg.Visible = False
SantaLeftImg.Visible = True
Wait(200) 'Waiting any longer on my samsung s2 caused lag and slowed the game down whie this was run for the first time. It works fine after the left,right image.
SantaLeftImg.Visible = False
SantaImg.Visible = True
Wait(200)
SantaImg.Visible = False
SantaRightImg.Visible = True
Wait(200)
SantaRightImg.Visible = False
SantaImg.Visible = True
End Sub
Sub StartBtn_Click
Activity.LoadLayout("game")
GD.SetOnGestureListener(Activity, "Gesture")
RndNum = Rnd(200, 500) 'A random number generated to select the range of clicks required to be able to click. e.g (1,5) within 5 clicks of SantaImg you will win. 
TimerClock.Enabled = True
MoveTimer.Enabled = True
MediaPlayer1.Initialize() 'Initialize mediaplayer here so it will always replay the tune on StartBtn_Click.
MediaPlayer1.Load(File.DirAssets, "SantaSong3.ogg")
MediaPlayer1.Play
MediaPlayer1.Looping = True
ScoreLbl.Text = 0 &" Score"
StartBtn.Enabled = False
HowToPlayBtn.Enabled = False
End Sub
Sub SantaImg_Click
'MediaPlayer1.Play
SantaCounter = SantaCounter +1 'Adds a point to the scorelbl for each click/press.
ScoreLbl.Text = SantaCounter &" Score"
If SantaCounter = RndNum -40 Then 'Had to use - instead of / as / wouldnt work, just ignored the code for unknown reasons but same code with - instead works fine :S
SantaImg.Visible = False
SantaDownImg.Visible = True
SantaDownImg.BringToFront
End If
If SantaCounter = RndNum -130 Then
SantaImg.Visible = False
SantaDownImg.Visible = True
End If
If SantaCounter = RndNum -220 Then
SantaImg.Visible = False
SantaDownImg.Visible = True
End If
If RndNum = SantaCounter Then 'If the Random number selected meets the required amount of SantaImg presses.
EndGamePanel.Visible = True ' Brings up the end game panel to play again or upload socre to facebook
WinorLoseLbl.Text = "Congratulations, you helped Santa down the chimney"
FinalScoreLbl.Text = TimeLbl.Text & " with a score of " &ScoreLbl.Text 'Used to display the time taken and the amount of clicks on a bigger label at the end of game
TimerClock.Enabled = False 'To stop the timer from continuing after games has ended.
SantaImg.Enabled = False ' To stop extra presses on SantaImg which will alter score after RndNum requirement is met.
MediaPlayer1.Stop ' Stops music from playing when completed the game.
End If
End Sub
Sub SantaDownImg_Click
SantaDownImg.Visible = False
SantaFullDownImg.Visible = True
ToastMessageShow("Arghh!!!! Santa's pants!!!", True)
End Sub
Sub SantaFullDownImg_Click
EndGamePanel.Visible = True ' Brings up the end game panel to play again or upload socre to facebook
WinorLoseLbl.Text = "Wow, this is not cool, keep that hidden. YOU LOSE"
FinalScoreLbl.Text = TimeLbl.Text & " with a score of " &ScoreLbl.Text 'Used to display the time taken and the amount of clicks on a bigger label at the end of game
TimerClock.Enabled = False 'To stop the timer from continuing after games has ended.
SantaImg.Enabled = False ' To stop extra presses on SantaImg which will alter score after RndNum requirement is met.
MediaPlayer1.Stop ' Stops music from playing when completed the game.
End Sub
Sub SantaRightImg_Click
SantaCounter = SantaCounter +1
ScoreLbl.Text = SantaCounter &" Score"
If RndNum = SantaCounter Then 'If the Random number selected meets the required amount of SantaImg presses.
EndGamePanel.Visible = True ' Brings up the end game panel to play again or upload socre to facebook
WinorLoseLbl.Text = "Congratulations, you helped Santa down the chimney"
FinalScoreLbl.Text = TimeLbl.Text & " with a score of " &ScoreLbl.Text 'Used to display the time taken and the amount of clicks on a bigger label at the end of game
TimerClock.Enabled = False 'To stop the timer from continuing after games has ended.
SantaImg.Enabled = False ' To stop extra presses on SantaImg which will alter score after RndNum requirement is met.
MediaPlayer1.Stop
End If
End Sub
Sub SantaLeft_Click
SantaCounter = SantaCounter +1
ScoreLbl.Text = SantaCounter &" Score"
If RndNum = SantaCounter Then 'If the Random number selected meets the required amount of SantaImg presses.
EndGamePanel.Visible = True ' Brings up the end game panel to play again or upload socre to facebook
WinorLoseLbl.Text = "Congratulations, you helped Santa down the chimney"
FinalScoreLbl.Text = TimeLbl.Text & " with a score of " &ScoreLbl.Text 'Used to display the time taken and the amount of clicks on a bigger label at the end of game
TimerClock.Enabled = False 'To stop the timer from continuing after games has ended.
SantaImg.Enabled = False ' To stop extra presses on SantaImg which will alter score after RndNum requirement is met.
MediaPlayer1.Stop
End If
End Sub
Sub PlayAgainImg_Click
Activity.RemoveAllViews
CountUp = 0
SantaCounter = 0
StartBtn.Enabled = True
HowToPlayBtn.Enabled = True
Activity.LoadLayout("main")
End Sub
Sub UploadToFbImg_Click
Dim TheUrl As String
TheUrl = "https://www.b4x.com/android/forum/threads/b4a-minigame-competition-2014-xmas-edition.47278/"
Dim i As Intent
     i.Initialize(i.ACTION_VIEW, "http://m.facebook.com/sharer.php?u= I played Santa got stuck in the chimney and got a time and score of  "&SantaCounter &CountUp  & TheUrl)
    i.SetType("text/plain")
    i.PutExtra("android.intent.extra.TEXT", TheUrl)
    i.WrapAsIntentChooser("Open browser")
    StartActivity(i)
End Sub
Sub Gesture_onFling(velocityX As Float, velocityY As Float, MotionEvent1 As Object, MotionEvent2 As Object)
    If Abs(velocityY) > Abs (velocityX) Then 'No idea, seen it on b4x forum and it works. (after hours of searching and trying to understand :D
    SantaDownImg.Visible = False
    SantaFullDownImg.Visible = False
    SantaImg.Visible = True
    End If
End Sub

Could have used some more graphics but my designer let me down and am out of time :(

On the off change this gets a place, I want to donate the prize to Bill, think he goes by the name of reviewnow on b4x forum but will get confirmation if I get placed. :) Happy Christmas everyone :D
 
Upvote 0

RandomCoder

Well-Known Member
Licensed User
Longtime User
It's not completely finished, I've run out of time :oops:
The game element is pretty much done although I did think that an occasional target that isn't supposed to be hit might have been a nice touch. The Menu button does nothing, the intention was to be able to adjust the difficulty by setting the elf image size and initial refresh interval. The score button is what I'm currently working on and is very basic at the moment, it was supposed to show the score, hit ratio and date. I think that after searching the forums maybe I should have used the KeyValueStore class.

I've not got a Google Play account or anything like that as I'm only a hobbyist programmer and so please find attached my project file. Hope you all have a lovely Christmas and all the best for the New year!

kind regards,
RandomCoder
 

Attachments

  • Elf_Attack.zip
    163.5 KB · Views: 268
  • Elf_Attack_APK.zip
    304 KB · Views: 440
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
It's not completely finished, I've run out of time :oops:
The game element is pretty much done although I did think that an occasional target that isn't supposed to be hit might have been a nice touch. The Menu button does nothing, the intention was to be able to adjust the difficulty by setting the elf image size and initial refresh interval. The score button is what I'm currently working on and is very basic at the moment, it was supposed to show the score, hit ratio and date. I think that after searching the forums maybe I should have used the KeyValueStore class.

I've not got a Google Play account or anything like that as I'm only a hobbyist programmer and so please find attached my project file. Hope you all have a lovely Christmas and all the best for the New year!

kind regards,
RandomCoder


that ugly Christmas... I can not even load your sources (B4A 3.0)

:mad:


:)
 
Upvote 0

RandomCoder

Well-Known Member
Licensed User
Longtime User
that ugly Christmas... I can not even load your sources (B4A 3.0)

:mad:


:)
@LucaMs very sorry about that! I purposely haven't upgraded to version 4 yet for that very reason. Anyway, here's the APK file (I believe it's been renamed result.apk presumably because I have used a space in the project name?).
 

Attachments

  • Elf_Attack_APK.zip
    304 KB · Views: 252
Upvote 0

udg

Expert
Licensed User
Longtime User
Keep cool, ilan

I bet sorex is very busy at enjoying all the games he received from Santa in the form of compo's entries that he simply missed the deadline..eh eh

More seriously, I suggest to postpone the deadline to New Years' Eve so to allow a few others to take part to the compo.
 
Upvote 0

Similar Threads

Replies
37
Views
4K
D
  • Article
Share My Creation Xmas Mahjong
Replies
0
Views
1K
Deleted member 30048
D
Replies
12
Views
2K
Replies
4
Views
3K
Top