BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 02-01-2007, 04:00 PM   #1
dthunt
Knows Where the Search Button Is
 
Join Date: Jan 2007
Model: 8100
Carrier: Rogers
Posts: 22
Default Sample Game Code for BB

Please Login to Remove!

Hi,

I am interested in doing a highly customized screen appearance as opposed to the screens which the BB provides. So I was wondering if anyone has sample code for a game on the BB - as games almost always do interesting things with graphics and UI.

Thanks,
Dallan
Offline  
Old 02-01-2007, 06:04 PM   #2
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

try this for starters: meshsystem >> Parallax Scrolling for Blackberry - but move the graphics constructer out of the main loop - god knows why that's done like that.
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 02-01-2007, 06:41 PM   #3
dthunt
Knows Where the Search Button Is
 
Join Date: Jan 2007
Model: 8100
Carrier: Rogers
Posts: 22
Default

Thanks for that. I tried it out.

Do you have any sample code where the game uses a transparent screen with a weird shape. Say I want to do an analog clock which is a circle, and I want it drawn on top of the applications so you can see them. Something like that would be really useful.

Dallan
Offline  
Old 02-02-2007, 06:00 AM   #4
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

nope, never attempted it, are you thinking of having a screen that floats over the homescreen? - not sure that's possible...
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 02-02-2007, 12:58 PM   #5
dthunt
Knows Where the Search Button Is
 
Join Date: Jan 2007
Model: 8100
Carrier: Rogers
Posts: 22
Default

Yes, I was wanting a screen which floated on top of all other screens at all times in fact. On which the user could interact with and send events to applications in the background.

Dallan
Offline  
Old 02-02-2007, 02:40 PM   #6
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

i could be wrong but i dont think that's going to be possible.
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 02-02-2007, 02:40 PM   #7
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

i could be wrong but i dont think that's going to be possible.
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 02-08-2007, 03:19 PM   #8
Californium
Knows Where the Search Button Is
 
Join Date: Aug 2006
Model: 8300
Carrier: Cingular
Posts: 35
Default

While I don't believe you can have a transparent Screen object on top of a background one, you can try creating a function that simply draws transparent icons on top of the current screen. The blackberry JDE has a CustomButtons example for making circular or specialized buttons. For transparency, include

Code:
graphics.setGlobalAlpha(90); // lower number => more transparent
before performing any draw operation.

Last edited by Californium; 02-08-2007 at 03:24 PM..
Offline  
Old 02-08-2007, 03:32 PM   #9
dthunt
Knows Where the Search Button Is
 
Join Date: Jan 2007
Model: 8100
Carrier: Rogers
Posts: 22
Default

This will make drawn pic files as transparent yes, but what is in the background will be a plain color like white or something - instead of the background images running.

Dallan
Offline  
Old 02-08-2007, 03:33 PM   #10
dthunt
Knows Where the Search Button Is
 
Join Date: Jan 2007
Model: 8100
Carrier: Rogers
Posts: 22
Default

'images' should be 'applications' in the last post
Offline  
Old 02-13-2007, 12:49 PM   #11
Californium
Knows Where the Search Button Is
 
Join Date: Aug 2006
Model: 8300
Carrier: Cingular
Posts: 35
Default

You can draw the background image for the application first and then draw the transparent pictures on top.

I've attached a simple program that demonstrates this method. A circle moves back and forth across the screen. Three transparent buttons are in the upperleft corner. Press 'ESC' to quit the program.

With this method, you need to redraw the transparent objects for each screen but it should hopefully provide the desired effect.
Attached Files
File Type: zip TransparentCustomButtons.zip (23.7 KB, 45 views)

Last edited by Californium; 02-15-2007 at 02:18 PM..
Offline  
Old 02-18-2007, 12:55 PM   #12
adwiv
Thumbs Must Hurt
 
Join Date: Oct 2006
Model: 8707g
Carrier: Hutch
Posts: 73
Default

Wow Californium, wonderful app
Offline  
Old 02-18-2007, 02:47 PM   #13
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

i think you're completely missing the point of what the original poster was after, i was under the impression he wanted to have a floating application that sat on top of the homescreen icons.
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 02-19-2007, 12:26 PM   #14
dthunt
Knows Where the Search Button Is
 
Join Date: Jan 2007
Model: 8100
Carrier: Rogers
Posts: 22
Default

Yea, something to that effect.
Offline  
Old 02-19-2007, 01:02 PM   #15
Californium
Knows Where the Search Button Is
 
Join Date: Aug 2006
Model: 8300
Carrier: Cingular
Posts: 35
Default

Ah, my mistake. I thought you simply wanted transparencies within an application with multiple screens.

For something that hovers over the homescreen and every application, I do not believe that's possible.

Last edited by Californium; 02-19-2007 at 01:09 PM..
Offline  
Old 02-23-2007, 04:50 PM   #16
loos
New Member
 
Join Date: Feb 2007
Model: 8100
Posts: 1
Default

What about a program that just shows the background (not to hover over all apps). I was thinking about writing a new lock program that doesn't have that silly "Call Emergency Button" on it and wanted it to look like the normal lock app.

Thanks,

Brad

Edit: Nevermind, I found out the mute button does what I want. Thanks anyway though.

Last edited by loos; 02-23-2007 at 04:56 PM..
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


HealthKit 4802 Computer Oscilloscope Heath Computer Systems picture

HealthKit 4802 Computer Oscilloscope Heath Computer Systems

$120.00



Measurement Computing 197728B USB 1608HS-2A0 16-Channel Digital DAQ +2 Analog picture

Measurement Computing 197728B USB 1608HS-2A0 16-Channel Digital DAQ +2 Analog

$650.00



New PCI-MIO-16E-4 Data Acquisition Card With 16 Analog Input Channels for NI picture

New PCI-MIO-16E-4 Data Acquisition Card With 16 Analog Input Channels for NI

$311.00



HealthKit 4802 Computer Oscilloscope Heath Computer Systems picture

HealthKit 4802 Computer Oscilloscope Heath Computer Systems

$149.99



NEW NO BOX- Analog Devices AIM03 Computer Module || Fast Shipped🇺🇸Warranty picture

NEW NO BOX- Analog Devices AIM03 Computer Module || Fast Shipped🇺🇸Warranty

$150.00



Onset Computer Mx1104 Analog/Temp/Rh/Light Data Logger picture

Onset Computer Mx1104 Analog/Temp/Rh/Light Data Logger

$202.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.