Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Discussions / Miscellaneous Topics / CALENDAR/DATE trouble... I think you can help me on this one. on: 2005-06-29 04:16:01

My problem is given the date today... I want to subtract 2 days from it...
And also for example i get

Result when i print them:
Day: 3
Year: 105

this is the actual date:
Wed Jun 29 12:14:03 GMT+08:00 2005

i remember my prof said that just add example in the year its 105, to make it 2005 just add 1900. But the problem rises in the DAY... the actual DAY is 29 and i got 3 so i added 26 to 3 to make it 29 but when i changed the month day+26 is wrong...

Pls help me on this

Thanks so much!
2  Java Game APIs & Engines / J2ME / Re: code sample for using Sprite3D   on: 2005-05-26 23:06:57
hope this link help you
3  Java Game APIs & Engines / J2ME / Java3D game developer newbee!!! on: 2005-05-25 23:48:30
Konnichiha! Wink

I am familiar with the development of MIDP 1 & 2 games and I want to start/divert to Java3D... can you pls give me info on where to begin with? I know Nokia supports J3D but I believe sonyericsson has better support to them.

I need..
1. SDK's, IDE's (what & where to download)
2. Tutorial with some very simple program to begin with

Arigato gosaimasu,
moonknightskye  Grin
4  Java Game APIs & Engines / J2ME / Re: recordstore can not save on Samsung A700 on: 2005-05-25 22:55:45
what do you mean "cannot be saved" the recordstore itself? or the recordstore cannot save anything on it? Well, if it cannot save anything on it you should close the recordstore after you are finished using it... if the recordstore itself cannot be saved... err... i dunno y Grin
5  Java Game APIs & Engines / J2ME / Re: Licensing J2ME Apps on: 2005-05-09 05:37:47
or if you dont rely on GPRS connection try to have a code that generates the key based on the UNAME... make the code simple yet strict. OF course the ordering procedure is the same like

1.The user downloaded and installs the game
2. The program will check if the RMSLicense is set to true (reg) or false(unreg)
3. if it is 'true' it will run as FULL VERSION... at this point, since this is the first time the user will open the application the RMS is set to false or DEMO.
4. If the user liked your game he will go to the Menu of the game and click on register asking for UNAME and REGKEY
5. The user will go to ur website with phonebrowser or pc and tries to buy your game... assume the transaction is successful... you will then send the UNAME and REGKEY to the email he provided.
6. The user will key in the UNAME and REGKEY to the application and clicks on OK or somethin like it. Your program should call for a special function in your APP generating a REGKEY. it will then check if the REGKEY your app generated is equal to the REGKEY he inputed the RMSLIcense will update and set the flag to 'true' or licensed... and so forth!

Again... i hope my idea is not a crap
6  Java Game APIs & Engines / J2ME / Re: Licensing J2ME Apps on: 2005-05-09 05:24:12
i dont know if this is possible coz im not familiar in RMS that much... try this

create 2 RMS' one for the license and one for the gamesaves... iv read a thread (at the top) that RMS can be destroyed while the program accessing it and the power suddenly disappears. Well, the description of the RMS' are as follows

Initially the RMSlicense is set to 'FALSE' for unregistered.

The user will browse your site which offers the complete jar download and tries to beam it to his phone. When the user downloaded the game it initially run as DEMO and there is an option to LICENSE it in the menu. If the user liked your game he should choose "register" from the Menu and it will then ask for the UNAME and SERIAL. The user will go again to your website using his PC or phonebrowser to order the serial and you successfully sells it to him and you should send the SERIAL and UNAME to his email. After he got it he will try to copy the SERIAL and UNAME to his phone and the program will connect to the GPRS accessing the database to check if the codes are correct. After the program confirms that it is correct the RMSlicense will update ( I suggest a flag 'true' for registered and vce versa) the next time the user opened the application it will read the RMSlicense if it detects that it is 'TRUE' it will run as licensed version and vice versa.

This is the drawback... the user may share the JAR to other users and he may also share his SERIAL and UNAME to others but this security check is MUCH better than making the COMPLETE version be played on the SPOT...

IF my senses are correct the leech user (like me hehehehe...) may be lessen by half because I may not knew anyone who bought or wants to share his license to me... I MEAN THERE IS BUT IT IS HARD TO FIND...

i hope you got mah idea and I hope i didn't waste my time to type these lengthy reply thread! Grin
7  Discussions / Miscellaneous Topics / Re: URGENT!!!! FORMATTING DATE (HELP!!!! PLSSSS) on: 2005-05-08 22:50:04

I thank you for your advice
8  Discussions / Miscellaneous Topics / Re: URGENT!!!! FORMATTING DATE (HELP!!!! PLSSSS) on: 2005-05-06 02:57:02
Hi Malokhan

I tried it already but I don't know why it always produces this kind of type like these:

Tue May 5 00:00:00 2005 GMT+08+00 something like this

I mean It always produces this kind of output although i used this:

SimpleDateFormat s = new SimpleDateFormat("MMM dd, yyyy");
s.parse(datetoday.toString(), parse....);

I need an output like:
May 5, 2005 in Date dataype

9  Java Game APIs & Engines / J2ME / Re: series 60 questions (frustrations) on: 2005-05-06 00:26:00
errr.... i guess that didn't helped... ive written a code that is identical to the MIDP2's Sprite, LayerManager, and TiledBackground... and the target is MIDP1... in short i ported those 3 MIDP2 classes to MIDP1... if you wanted to have a copy of it i can give it to anyone because I love everyone in this Forum Grin

to give you some fact.... competeting mobile phones like nokia, siemens, panasonic, snyerricson produces phones which is not actually the same as their competing brands... like the API's, ScreenColor, resolution and they intend it so that developers focus on their product... i know that java is platform independent but as of now they are creating their own API which maximises their phone's performance and they target that developers should focus only on their product...

Me, I focus primarilly on Nokia phones of any type and as of now i dont have the confusion you have... so i suggest you to just focus on a single or two platform... just dont compare 2 phones of the same category of different type because they are still DIFFERENT!!!

I hope this may somehow help you... NYAHAHAHA Grin
10  Java Game APIs & Engines / J2ME / Re: series 60 questions (frustrations) on: 2005-05-06 00:11:38

if you really wanted to program series 60 of NOKIA type I suggest to download it from the NOKIA DEVELOPER site... just register and you can download Nokia's SDK's for their series 60,40 & 30 phones... I found Sun Studio Mobility as a useful IDE for it... as of now Im using the ff to develop nokia J2me

Sun Studio Mobility Q4 (sun)
J2ME wireless toolkit 2.2 (sun)
Nokia Series 60 SDK (u can have this in Nokia Developer site)

if you have some kinda trouble (like what i experienced the first time i used it... you should download the msxml parser (from microsoft))

Im so sorry if i cant help you on other s60 SDK's for siemens etc..... all i know is nokia
11  Discussions / Miscellaneous Topics / Re: URGENT!!!! FORMATTING DATE (HELP!!!! PLSSSS) on: 2005-05-06 00:03:13

i appreciated ur reply but i already tried that SimpleDateFormat but again the resulting datatype is not a type of Date but a type of String and I need something to format todays date into this form like
Jan 30, 1985 which in Date datatype instead of String...

Thanks for the one who can help me Wink
12  Discussions / Miscellaneous Topics / URGENT!!!! FORMATTING DATE (HELP!!!! PLSSSS) on: 2005-05-05 08:08:22
hi suppose I import the

how can i format the date into this kind like...
Jan 30, 1985
without converting it to string???
so that when you excute this code
System.out.println(sqldate.toString()); the resulting is
(the date today in the format like the above???

13  Java Game APIs & Engines / J2ME / determining the length of multi-array on: 2005-03-30 12:42:50
Hi... I would like to know if how can i find a way to count the length of the arrays in array or array (multidimentional array) I mean if i have

map = new int[][]{

if i call map.length, it'll return 2 for the original map array... how about the length of the arrays inside the array? how can I get 14?
14  Java Game APIs & Engines / J2ME / MIDP1 sprite and backgound on: 2005-03-19 02:59:36
hi.. i am having a trouble in programming using MIDP1. I know how to program/make a sprite and tiledLayer in MIDP2 but my boss wants me to code it in MIDP1 because most of our client uses an old nokia phone. can you pls post the simplest code on how can i make a sprite(with 5 frames in it) and teach me how to animate it and also how to make a tiledBackbround. my deepest and sincerest appreciation to anyone who can help me
15  Java Game APIs & Engines / J2ME / removing SPRITE (problem) on: 2004-11-24 00:45:36

a-10-tion to david! please help or anyone who knows how to do this.

this is the problem. in my gun, i have a gun (it's bullet is made up from SPRITE) when the bullet touches/hits the enemy the enemy and the bullet SPRITES should be removed from the layer manager. so this is my code:

       //moveBullet is just a boolean value which if it is true, the bullet sprite will move and vice versa
       moveBullet = false;

this code really DOES remove the sprites on the layer manager but on my observation, the layerManager only makes the "bullet" and "enemy" SPRITES invisible because for example at pixel (117,150) the "bullet" and "enemy" SPRITE collided, the code above will remove them both but notice that i have other enemis too with this code for collision detection:

       //moveBullet is just a boolean value which if it is true, the bullet sprite will move and vice versa
       moveBullet = false;

on the upper code, when the "bullet" hits "enemy" at  xy (117,150), the bullet will stope moveing and the layerManager will remove them both... but i noticed that when "enemy2" touches the xy(117,150) (although the "bulllet" sprite is not in ther, the "enemy2" sprite dissappears, i dunno, i think the method "remove" in layer manager just makes the sprite invisible...

please if you know how to COMPLETELY remove the sprites in the layerManager please let me know. thanks alot!
16  Java Game APIs & Engines / J2ME / question about screen resolution on tiledLayer on: 2004-11-19 04:50:46
I am using a tiledLayer, my first design in the scrolling background is that the character is fixed at the center of the screen and when the user presses (hold) down, the screen moves down but the character stays at the center of the screen.

i want my character roam around the screen (meaning he will no longer be at the center of the screen) and when he reaches some point (he is near the edge of the screen) the tiledLayer will move.

| -border- | ---------- character can roam here ----------  |-border- |
| -border- | ---------- character can roam here ----------  |-border- |
| -border- | ---------- character can roam here ----------  |-border- |
| -border- | ---------- character can roam here ----------  |-border- |
| -border- | ---------- character can roam here ----------  |-border- |
| -border- | ---------- character can roam here ----------  |-border- |
| -border- | ---------- character can roam here ----------  |-border- |
| -border- | ---------- character can roam here ----------  |-border- |
| -border- | ---------- character can roam here ----------  |-border- |
| -border- | ---------- character can roam here ----------  |-border- |

this represents the screen of the mobile phone.
a part of the tiledLayer is shown here, and when the character reaches the "border" the tiledLayer will move.  The character cannot cross that border (actually i think that border should be invincible or imaginary)

I hope I didn't make myself look stupid here. I hope you can help me. THANKS IN ADVANCE FOR THOSE WHO WILL! Grin
17  Java Game APIs & Engines / J2ME / Re: How to remove Sprite From LayerManager? on: 2004-11-10 07:42:00
david... i tried that method

this is in the javadoc:
layerManager.remove(Layer 1);

Layer 1 means the index of the layer I want to remove..

i tried this one a few weeks ago but it failed..

if my sprite is at layer 2

i dunno. pls check it again... I'LL just reply if i have time
18  Java Game APIs & Engines / J2ME / Re: How to remove Sprite From LayerManager? on: 2004-11-10 02:17:42
hi. iv read a book (MIDP game programming) that there is a method called "deleteSprite" now i dont have that book to look at it again on how to do it...  i tried it on the layerManager but it is not a method of it... but  i havent tried yet if it is a method of Sprite class... you should try it though... if am not busy ill reply to you later to help you... HEY GUYS! HELP THIS GUY OUT! Grin
19  Java Game APIs & Engines / J2ME / Re: Better sprite painting methodology? on: 2004-11-10 02:04:48
wait... what kind of painting you want to do? and this is just an image not a sprite.

if you think painting using sprite is asier pls study this tutorial because evrything that you should know about sprites are here

search for "IBM introduction to sprites" (you must register first though) but it is the simplest tutorial i know.

if you still want to stick with your painting method this is the pseudocode:

1. paint the background
2. clip the image
3. draw the image
4. unset the clipping

if you want to draw another (part of) image
5. clip gain
4. paint image
5. unset the clipping
and so forth....

so... clipping cosumes much hard coding but compared to sprites, clipping saves much memory heap... but i think sprites are sleaner to use. Grin
20  Java Game APIs & Engines / J2ME / Re: Mobile card game design problem on: 2004-11-06 11:39:19
NOPE! j2me is just taken from J2SE and they chopped some librararies to make it run on mini devices such as cellphones and AWT's have been eliminated.

about setting diffetent props on clips... i dun think so because clips is just a method of GRAPHICS and it is not a Class... but still not sure abt this staement coz i just started 3 weeks ago from programming J2ME. you should ask DAVE... Grin
21  Java Game APIs & Engines / J2ME / Re: Mobile card game design problem on: 2004-11-06 01:54:56
;DYeah! why did i forgot about clipping! heheh! Cheesy
22  Java Game APIs & Engines / J2ME / Re: Mobile card game design problem on: 2004-11-05 21:51:09
;Duh... the randoming of your cards is at poor design coz its possible to draw identical cards more than twice... instead make a condition that the

card will random
compare the cards from previous random numbers
if it is identical random new number then compare again...actually place it to do..while statement that while there are identical cards random again... ihope im makin sense here.

about the sprite problem... i presume this is your class
c2 = createCard("/LONGMinicardfull2.png");
the canvas displays your 13 cards but the thing is in your code they are overlapping that's why you cannot see the other cards

i suggest you to use
c2.setRefPixelPosition(Xaxis+ increment, Yaxis);
if you want to place yor cards horizontally and place them on your designated position.
then layer.append(c2); to place it on layermnger...

and another this is... your image in the sprite contains 51 concatenated images right?

i think you should use this code...
modify your initialisation to this

c2 = createCard("/LONGMinicardfull2.png",i);

you will pass the "i" value to your createCard class. to your createCard class... modify your constructor like this...

but add this b4 your constructor

private int[] FRAME_SEQUENCE; //this must be array because framesequence class accepts only arrays

private createCard(Image img, int SEQUENCE){
         super(img, 15, 20); //if the res of the single card  is 15x20

because if your PNG image consists of 51 images the class will automatically cut it to 51 pieces based on the parameters of super(img, frameWidth, frameHeight). frameWidth and frameHeight is the basis on how many pieces the PNG will be cut into . be sure to put the exact pixel width and height or your card(not the whole PNG but the small card in it)

to wrap this up. this must be the pseudocode of your program

1. initialise/make the 51 cards ( see the for loop with i<51)
2.create 13 random numbers which makes sure that every number is unique (see the first part of this message) the cards on the layer and make sure to set each card to its referencePixelPosition
4. PAINT! ::)
23  Java Game APIs & Engines / J2ME / Re: Mobile 3D (M3G) Chapters Online on: 2004-11-04 02:50:03
:DWOW! that's very nice! keep us updated! Grin
24  Java Game APIs & Engines / J2ME / Re: J2ME Ranom on: 2004-11-04 02:47:24

first create Random object like this...

private Random random = new Random( System.currentTimeMillis() );

next call this method:
int bound = 100;
int randomNumber;
randomNumber = Math.abs( random.nextInt()% bound );

i am not sure if the output will be from 0 to 100 OR 0 to 99 only... just try it though

Roll Eyes
25  Java Game APIs & Engines / J2ME / Re: How can I call a specific "Sprite" f on: 2004-11-03 00:49:12
Grin hi! that's pretty easy! just call on the function


all frame starts at 0. so if you have a total of 5 frames (5 concatenated images) the index of the first frame is 0 up to 4. i suggest for you to use an IDE with autocomplete so that you can study the methods possible for an object (or whatever)... like the Sun Java Mobility.
26  Java Game APIs & Engines / J2ME / Re: Detecting a particular tile in a tile map HELP on: 2004-11-02 11:58:47
tileIndexX = sprite.getX() / 25;
 tileIndexY = sprite.getY() / 25;

y did you dvided it  into 25? the program is supposed to get the value of i in the for loop to reference it to the current x&y position of a cell in tiledLayer...


anyway... thanks again DAVID for your help. I'm gonna check that article you told me and see for myself how it can help me. again thanks and regards! and yeah... nice observation david on the size of the sprite (1x1) pixel.. you are right but i just tweaked my code to make it bigger to the actual size of my sprite... and now... im gonna check the article and compare which is better. THANKS!
27  Java Game APIs & Engines / J2ME / Re: Detecting a particular tile in a tile map HELP on: 2004-11-02 06:50:12
HI GUYS! thanks for the ones who read and replied... I finally got how to detect a particular tile in the tiledLayer. you must hard code it.


you initialise the tiledLayer; assuming the tiles is 25x25
. it means that tile[0][0] is from 0 to 24 pixels in X and Y axis.
tileX = new int {0,25,50,75,10};
tileY= new int {0,25,50,75,10};
map = new int[][] ={

the method to determine a particular tile is...
for(i =0,i<4,i++){
if((sprite.getX() >= tileX)&&(sprite.getX() <  tileX[i+1])
         tileIndexX = i;
if((sprite.getY() >= tileY)&&(sprite.getY() <  tileY[i+1])
         tileIndexY= i;

try to move your sprite and  make a code to print what kind of tile is underneath your sprite. try it to your application... it may help too. but if you have a better code for detecting a particular tile... pls POET IT HERE! thanks a lot! and i hope this code may help others.
28  Java Game APIs & Engines / J2ME / Detecting a particular tile in a tile map HELP!!! on: 2004-10-29 01:49:46
Wink hi. im currently developing a bomberman type of game  . The character is fixed at the center of the screen... the floor does the movement.

I have a boulder in the game (which is obviously , the player can't pass though). My question is how can i detect that my player is on a tile that is a boulder so that i can have a condition that the player can't advance more? i am talking about tiledLayer here... im planning to use sprites instead but my game is already flooded by sprites and i want to retain the tiledLayer.

I have already read a topic here which has the same problem but i didnt got it coz im a newbee here... i just started 2 weeks ago for my OJT. please, if you can give me the simplest and detailed code that a newbee can understand... PLEASE I BEG YOU... HELP me. thanks in advance! Cheesy

this is the code i used

                System.out.println("you collided to the tiled image");

but i want to detect only the collision between a particular tile in the tiledLayer(eg. wall,boulder) Wink
Pages: [1]

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (36 views)
2014-12-15 09:26:44

Mr.CodeIt (29 views)
2014-12-14 19:50:38

BurntPizza (61 views)
2014-12-09 22:41:13

BurntPizza (98 views)
2014-12-08 04:46:31

JscottyBieshaar (58 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (76 views)
2014-11-29 21:32:03

toopeicgaming1999 (137 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (37 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!