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:

RandomCoder

Well-Known Member
Licensed User
Longtime User
I took a look at the LibGDX library the other day with a view to trying to make a game. Only big problem I've had is that I've been unable to think of a simple enough game that I could manage to make for my first attempt. This might be just the kind of thing I need to help inspire me :D

Even if I don't decide to participate, I think it's a nice idea!

Regards,
RandomCoder
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
LibGDX is powerfull, maybe too powerfull for most games and users.

But keep in mind that game logic is something that runs outside of GDX and need to written by you aswell :)

As it is an open competition, as not forcing to write a certain type of game, you can still create something simple as long as it fits the theme. Simple games can be done in hours (barebone code) but you get a month and a few days so you have time to experiment. :)
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
Half a week further, exactly one month left and already an enormous success. Not :(

It seems that the people here are either too serious, too busy (with moneytizing) or not into fun for once in a year.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Half a week further, exactly one month left and already an enormous success. Not :(

It seems that the people here are either too serious, too busy (with moneytizing) or not into fun for once in a year.

I want to be serious, but just can not :p
If you read my posts, they seem to be written by a teenager!

The point is that I have not played much and I never developed games.

Finally... I do not know what is "compo" :D

Anyway, I like the idea.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Finally... I do not know what is "compo" :D
I think that´s an acronym of "Competition". But i´m not sure as English is not my native language :)
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
right, Manfred.

it's a short term for competition and used since the 80s on computer (C64/Amiga/PC) parties since the 80s for coding, graphix & music competitions.

But don't take the term too serious, it's just for fun to break the usual rut of life. :)
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Well, I am in for the compo.
Game's ready but I'll wait for a few attendees' announcements prior to ask how to submit it.
If sorex's nice initiative will have no success, I'll publish it anyway in the "share your creation" area a few days before Xmas so to let everyone have some fun while I'll hurtle on some wonderful ski slope.

udg
 
Upvote 0

udg

Expert
Licensed User
Longtime User
B4A power!
..and, honestly, it was ready before you started the contest :)
I only needed to theme it appropriately.. eh eh
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
you can always try to co-op with someone here (or somewhere else) for the artwork.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
you cheater you :)

eh eh.. ok, next week I'll spend a few hours to work on a couple of new features, so my game will be brand new (more or less) for Xmas! :rolleyes:

udg
 
Upvote 0

RandomCoder

Well-Known Member
Licensed User
Longtime User
Well for what its worth I think that this thread should be made into a temporary sticky by @Erel just for the period of the competition. I don't care if there's a prize or not, for me its a perfect opportunity to have a go at something I've not used before in B4A and also to get chance to see how other programmers design they're games.
LibGDX looks mighty complex and sophisticated and I've not got the time to get heavily into that so I intend to create a very simple game with nothing more than a few panels, a canvas and a bitmap. I've thrown in a few sound effects too.

For those that read this and think that they can't possibly write a game, I encourage you to have a try! Below is the code that I wrote last night and the basis of my game. Maybe it will inspire you to have a go too?
B4X:
#Region  Project Attributes
    #ApplicationLabel: Elf Attack
    #VersionCode: 1
    #VersionName:
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

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

Public Sub Process_Globals
    Public phnWakeState As PhoneWakeState
    Public bmpElf As Bitmap
    Public tmrRefresh As Timer
    Public intGameBoardSize, intGameBoardColor As Int
    Public intElfSize, intRefreshMs As Int
    Public audSoundPool As SoundPool
    Public arrAudio(4) As Int
End Sub

Private Sub Globals
    Private pnlGameBoard As Panel
    Private cvsGameZone As Canvas
End Sub

Private Sub Activity_Create(FirstTime As Boolean)
    phnWakeState.KeepAlive(True)
    If FirstTime Then LoadDefaults
    Initialise
End Sub

Private Sub Activity_Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
    phnWakeState.ReleaseKeepAlive
End Sub

Private Sub LoadDefaults()
    #Region Load sound files
    audSoundPool.Initialize(1)
    arrAudio(0) = audSoundPool.Load(File.DirAssets, "Grunt1.mp3")
    arrAudio(1) = audSoundPool.Load(File.DirAssets, "Grunt2.mp3")
    arrAudio(2) = audSoundPool.Load(File.DirAssets, "Grunt3.mp3")
    arrAudio(3) = audSoundPool.Load(File.DirAssets, "Grunt4.mp3")
    #End Region
  
    #Region Set canvas size based on screen orientation
    Dim Orientation As String
    Orientation = Functions.GetScreenOrientation
    ' Initial gameboard size set to 3/4 smallest side of activity
    If Orientation = "portrait" Then
        intGameBoardSize = Activity.Width*.75
    Else
        intGameBoardSize = Activity.Height*.75
    End If
    ' Default background colour set to white
    intGameBoardColor = Colors.White
    #End Region
  
    ' Scale elf image to 20% of canvas size
    intElfSize = intGameBoardSize*.2
    bmpElf = LoadBitmapSample(File.DirAssets, "Elf.png", intElfSize, intElfSize)
    ' Set initial refresh time to 2s
    intRefreshMs = 1500
End Sub

Private Sub Initialise()
    ' Load gameboard panel
    pnlGameBoard.Initialize("GameBoard")
    Activity.AddView(pnlGameBoard, (Activity.Width-intGameBoardSize)/2, (Activity.Height-intGameBoardSize)/2, intGameBoardSize, intGameBoardSize)
    cvsGameZone.Initialize(pnlGameBoard)
    ' Initialise and start game timer
    tmrRefresh.Initialize("tmrRefresh", intRefreshMs)
    tmrRefresh.Enabled = True
End Sub

Public Sub tmrRefresh_Tick()
    Elf_Show
End Sub

Private Sub Elf_Show()
    ' Randomise Elf position
    Dim rDest As Rect: Dim intLeft, intTop As Int
    intLeft = Rnd(0, intGameBoardSize-intElfSize)
    intTop = Rnd(0, intGameBoardSize-intElfSize)
    rDest.Initialize(intLeft, intTop, intLeft+intElfSize, intTop+intElfSize)
    ' Clear canvas and redraw elf at position defined by rDest
    cvsGameZone.DrawColor(intGameBoardColor)
    cvsGameZone.DrawBitmap(bmpElf, Null, rDest)
    Activity.Invalidate
End Sub

Private Sub Elf_Hide()
    ' Clear canvas
    cvsGameZone.DrawColor(intGameBoardColor)
    Activity.Invalidate
End Sub

Private Sub GameBoard_Touch(Action As Int, X As Float, Y As Float)
    ' Get pixel color on first touch only
    If Action = pnlGameBoard.ACTION_DOWN Then
        Dim intTouchColor As Int = cvsGameZone.Bitmap.GetPixel(X, Y)
        If intTouchColor <> intGameBoardColor Then
            ' Elf has been caught, hide and play random sound
            Elf_Hide
            audSoundPool.Play(arrAudio(Rnd(0,4)), 1, 1, 1, 0, 1)
        End If
    End If
End Sub

My overall objective is to create the game without using the designer and for it to support all screen sizes and orientations, so hopefully it might be of some use to others to see how this is achieved. The game objective is to catch the Elf which I intend to make progressively more difficult. Maybe I'll throw in a few bombs like other well known games? It's based on a game I wrote many years ago whilst trying to learn Basic4PPC on the Windows mobile devices.

Anyway, good luck to all those that plan to try, I look forward to playing your games and seeing how your code is written. :D

Regards,
RandomCoder
 

Attachments

  • Elf_Attack.zip
    126.8 KB · Views: 492
Upvote 0

sorex

Expert
Licensed User
Longtime User
RandomCoder: You are right. libGDX is complex and pure overkill for simple games. The benefit is that it is hardware based (openGL or whatever Android uses) but that's only an advantage for games if you go do complex things with a lot of sprites, moving background and the likes.

And like I said the logic is still in your hands. you can't tell it to do a pacman game for you, you still need to write that logic ('engine') and tell gdx what it has to do with the background & sprites. It might have collision stuff that you can use tho, not sure about that (but that's just math).
 
Upvote 0
Top