ahonkhai
JGO n00b  Posts: 6
|
 |
«
on:
2006-01-05 07:06:31 » |
|
hi, i am totally new on java games programming,i will like to get assistance on where to start from creating java games for mobile phones,i will like to get source codes for creating a simple game for mobile phone .pls a reply is highly required.thanks.
|
|
|
|
|
appel
JGO Wizard     Posts: 1477 Medals: 23
I always win!
|
 |
«
Reply #1 on:
2006-01-05 07:36:18 » |
|
I'd think creating a game for either mobile phones or PC's should be no different. So learning basic computer game programming is a prerequisite. If you know how to make games, then check out J2ME, it's a micro version of java....used in mobile phones and handheld devices. Also check out space invaders 101: http://www.cokeandcode.com/info/tut2d.html
|
|
|
|
Serethos
Sr. Member   Posts: 302
Java games rock!
|
 |
«
Reply #2 on:
2006-01-05 17:32:06 » |
|
a good start is always to visit the developer sites (mostly free registration required) of the big handy manufactures (nokia, motorola etc.). they have masses of (game) tutorials and its always a good idea to get a specialized developer kit for _your_ handy and to learn very fast the pitfalls..
|
|
|
|
|
Games published by our own members! Go get 'em!
|
|
f.l.x
Sr. Member   Posts: 305
there is no place like 127.0.0.1
|
 |
«
Reply #3 on:
2006-01-05 20:26:04 » |
|
keep in mind that if you want your game to run on many phones, you'll face huge limitations, like taht there is no automatic garbage collection (you have to call System.gc()) and the lack of floating point math unit on most phones, wich forces you to stick to integer math or to use floating point emulation, wich is rather slow for most games. But once you get used to midp/cldc limitations, the results are very rewarding, many games that would be unnoticed on desktops, shine on phones.
|
|
|
|
jbanes
JGO Neuromancer     Posts: 1178
"Java Games? Incredible! Mr. Incredible, that is!"
|
 |
«
Reply #4 on:
2006-01-05 21:41:51 » |
|
you'll face huge limitations, like taht there is no automatic garbage collection (you have to call System.gc()) Who told you that? The garbage collector runs automatically on all phones I've seen. The reason for the System.gc() call is to prevent the collector from running at an inopportune moment. Programmers used to do this sort of thing back in the Java 1.1 days, but it ended up being the exact *wrong* thing to do once Java added more sophisticated garbage collectors. and the lack of floating point math unit on most phones Rule of thumb: Never use floating point computations for games on a CPU without a floating point unit. Since that covers a large number of cell phones, the lack of floating point math is a good thing. Even when you do have an FPU, you have to be careful not to slow your program down with too many FLOPs. If you read just about any book from the 386/486 gaming days, one of the first things you'll notice is that they teach you to do fixed point math. 
|
|
|
|
danielmd3000
JGO n00b  Posts: 38
|
 |
«
Reply #5 on:
2006-01-06 12:37:32 » |
|
Java for mobile phones (J2ME) is very different from java on desktops (J2SE). OK let me give you a few pointers... Stuff you will need: You will need to have a java environment (JVM) on your PC and download the Wireless Toolkit.(java.sun.com). You will want to use NetBeans for your wireless development, NetBeans 5.0 Beta2 and Mobility Pack5.0 Beta2 ( www.netbeans.org). With these tools you are now able to write games for a mobile platform, but most manufactures have extensions so you might want to download the SDKs from there sites. http://www.forum.nokia.com/main.htmlhttp://developer.sonyericsson.com/The NetBeans Mobility pack has some simple examples and games that can help to get started, you might also want to grab some source code from many sites (just use a search engine and you will find a game that you like to dissect). Also there are many books about the subject, like ( http://www.amazon.com/gp/product/1592001181/103-3650030-3671862?v=glance&n=283155). Also SUN has several articles that help to understand the platform, just go to: http://developers.sun.com/techtopics/mobility/allarticles/There are also tools that help with the device fragmentation problem, like J2ME Polish. Good luck and if you need further help just post away, All the Best, -Dan
|
|
|
|
|
Jeff
|
 |
«
Reply #6 on:
2006-01-06 14:15:26 » |
|
Also be aware that performance of the emulator in the WTK sucks rocks.
Unless your game is turn based with little to no animation you will probably need a real phone to do development of graphics on.
|
|
|
|
jbanes
JGO Neuromancer     Posts: 1178
"Java Games? Incredible! Mr. Incredible, that is!"
|
 |
«
Reply #7 on:
2006-01-06 14:50:23 » |
|
Also be aware that performance of the emulator in the WTK sucks rocks.
Unless your game is turn based with little to no animation you will probably need a real phone to do development of graphics on. Last time I was mucking around with MIDP, I used the MPowerPlayer tool. It used to be just for developers, but it looks like it's been made into a product of sorts. Should still work for development. Note that MPowerPlayer won't do anything to help you make sure that a particular phone is compatible. (e.g. You picked the right resolution, there are no bugs undocumented features on the phone, etc.) So you still need to use the WTK (or a real phone!) to verify that the game will operate. Since you probably don't want to test for every possible phone on the market, you can find yourself some free beta-testers here.
|
|
|
|
Anon666
Sr. Member   Posts: 256
aka Abuse/AbU5e/TehJumpingJawa
|
 |
«
Reply #8 on:
2006-01-06 20:58:30 » |
|
Also be aware that performance of the emulator in the WTK sucks rocks.
Unless your game is turn based with little to no animation you will probably need a real phone to do development of graphics on.
Emulator performance far surpasses any device currently on the market - unless ofcourse you have a *realy* crappy development pc 
|
|
|
|
|
jbanes
JGO Neuromancer     Posts: 1178
"Java Games? Incredible! Mr. Incredible, that is!"
|
 |
«
Reply #9 on:
2006-01-06 21:39:47 » |
|
Emulator performance far surpasses any device currently on the market - unless ofcourse you have a *realy* crappy development pc  You've obvioudly never used the Nokia emulators. These things are about as slow as you can possibly get. Two minutes to run a single test was not uncommon the last time I tried.  To add insult to injury, the Nokia kit adds a highly annoying auto-update feature that downloads all kinds of software you don't want when you least want it.
|
|
|
|
Games published by our own members! Go get 'em!
|
|
Anon666
Sr. Member   Posts: 256
aka Abuse/AbU5e/TehJumpingJawa
|
 |
«
Reply #10 on:
2006-01-06 21:51:27 » |
|
Emulator performance far surpasses any device currently on the market - unless ofcourse you have a *realy* crappy development pc  You've obvioudly never used the Nokia emulators. These things are about as slow as you can possibly get. Two minutes to run a single test was not uncommon the last time I tried.  To add insult to injury, the Nokia kit adds a highly annoying auto-update feature that downloads all kinds of software you don't want when you least want it. I was refering to the Sun WTK. Though I agree, the Nokia sdk is incredibly invasive, and contain all manor of annoying flaws. I guess we shouldn't complain though - there are manufacturers who are far far worse in their lack of Java developer support. Sharp, NEC, Sagem & LG to name just a few. Infact - the only handsets I ever enjoy developing for are SonyEricssons and Motorolas.
|
|
|
|
|
ahonkhai
JGO n00b  Posts: 6
|
 |
«
Reply #11 on:
2006-01-07 13:53:10 » |
|
i am new to java games mobile programming.i have downloaded the softwares you recomended to me. now pls could you send me source codes for creating a simple game for mobile phone like nokia .so i could get started in my mobile game world
|
|
|
|
|
Jeff
|
 |
«
Reply #12 on:
2006-01-07 22:53:04 » |
|
Also be aware that performance of the emulator in the WTK sucks rocks.
Unless your game is turn based with little to no animation you will probably need a real phone to do development of graphics on.
Emulator performance far surpasses any device currently on the market - unless ofcourse you have a *realy* crappy development pc  Then it has totally changed its architecture from last time I worked with it. The WTK phone emualtor at that time was doing all its graphics in software and was rediculously and unbearbly slow for any serious graphcis wo0rk.
|
|
|
|
f.l.x
Sr. Member   Posts: 305
there is no place like 127.0.0.1
|
 |
«
Reply #13 on:
2006-01-08 13:04:24 » |
|
if i never call the garbage collector, even if i only create one or two new objects each cicle, the midlet crashes on my nokia 6600 (on wtk emulator the memory graph grows to the heap limit and then pauses everything while the gc is collecting all the junk) Memory management is a problem to have in mind when designing a midp game
|
|
|
|
Mr_Light
JGO Strike Force    Posts: 893
shiny.
|
 |
«
Reply #14 on:
2006-01-08 14:37:58 » |
|
can you explain me why you'd want that many objects? flyweights man.
|
It's harder to read code than to write it. - it's even harder to write readable code.
The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
|
|
|
Anon666
Sr. Member   Posts: 256
aka Abuse/AbU5e/TehJumpingJawa
|
 |
«
Reply #15 on:
2006-01-08 19:26:19 » |
|
if i never call the garbage collector, even if i only create one or two new objects each cicle, the midlet crashes on my nokia 6600 (on wtk emulator the memory graph grows to the heap limit and then pauses everything while the gc is collecting all the junk) Memory management is a problem to have in mind when designing a midp game
Many (perhaps even all) firmware versions of the Nokia6600 leak memory when drawing flipped/rotated images through the midp2 api. That is one potencial cause of your problems, though the 6600 does have a host of other problems. (InputStream & Image classes (and their subclasses) both have significant bugs in their implementation. TBH the 6600 is a pile of crap as a reference device, you'd do much better testing on a SonyEricssonK700i. (similar in capabilities, but far less device specific bugs)
|
|
|
|
|
OverKill
Sr. Member   Posts: 337
Java games rock!
|
 |
«
Reply #16 on:
2006-01-09 03:58:02 » |
|
@Topic: Depends on how 'deep' you want to go. If you simply want to write an app for one or two similar devices it would suffice to get the SDK for that/those devices and start.
Anything else leads down a long road full of pain in the ass 'features'. Every platform has its features. ATM my comp supports 60 unique devices.
@f.I.x: Always garbagecollect where and when you can. Like Anon said, the 6600 is a PITA! Their are also a memory leak in forms. We even had a MONTY_THREAD exception on one game we could not solve.
|
|
|
|
|
ahonkhai
JGO n00b  Posts: 6
|
 |
«
Reply #17 on:
2006-01-09 05:14:24 » |
|
please i will like to know the softwares step by step required for mobile phone games development
2. i will like to get source codes on a simple mobile phone game ,,so i can start up from there
3. how can i use the software downloaded? where will i start from imputing codes
|
|
|
|
|
nonnus29
JGO Ninja    Posts: 687
Giving Java a second chance after ludumdare fiasco
|
 |
«
Reply #18 on:
2006-01-09 08:16:49 » |
|
please i will like to know the softwares step by step required for mobile phone games development
2. i will like to get source codes on a simple mobile phone game ,,so i can start up from there
3. how can i use the software downloaded? where will i start from imputing codes
Learning to use google is the best thing you can do yourself. Or the search feature on this site. 
|
|
|
|
|
danielmd3000
JGO n00b  Posts: 38
|
 |
«
Reply #19 on:
2006-01-09 11:21:44 » |
|
please i will like to know the softwares step by step required for mobile phone games development
2. i will like to get source codes on a simple mobile phone game ,,so i can start up from there
3. how can i use the software downloaded? where will i start from imputing codes
Ok once you have the software downloaded and installed - install jvm, install NB first, then mobility pack, then SDKs/emulators. NB will find the emulators on its own, if it does not then there is an option to find them. After you have all installed you can start to see some code that comes with mobility pack, start NB go to new project (a wizard window pops up) and select samples->mobile->midp1 or midp2 ->various games there you will find the source to the most popular computer game ever (WORMS) and other puzzle games. You can also start programming simply select new project-> mobile->mobile application. And start coding it's that simple. You can also look at a more complex game Marv the Miner from digiment.no example here: http://www.digiment.no/index.jsp?category=downloads&sub=2hope this helps, if you have more specific question go ahead and ask them, this is the place to place them don't be embarrassed, I and the rest of the forum, will do our best to help.
|
|
|
|
|
ahonkhai
JGO n00b  Posts: 6
|
 |
«
Reply #20 on:
2006-01-11 14:03:23 » |
|
i will like to know how to make games that is compactable to various mobile phones and models.
|
|
|
|
|
danielmd3000
JGO n00b  Posts: 38
|
 |
«
Reply #21 on:
2006-01-11 14:52:56 » |
|
In that case,
Don't use device specific APIs in your code (almost impossible for good performance) or use pre-processor to deal with the differences.
The distribution process is similar to all phones.
|
|
|
|
|
f.l.x
Sr. Member   Posts: 305
there is no place like 127.0.0.1
|
 |
«
Reply #22 on:
2006-01-11 17:36:25 » |
|
@f.I.x: Like Anon said, the 6600 is a PITA! Their are also a memory leak in forms. We even had a MONTY_THREAD exception on one game we could not solve.
yeah, i noticed, there is a full pdf here which lists a lot of them and some workarrounds but i can't afford to switch to another phone now. I have had very litle experience with other devices (7650 and 3650 mostly) since i don't know many people who will pay the connection fee to download a test aplication from an untrusted web page and very few devices will accept and install a jar/jad sent by bluetooth or ir. there are not many midp2 devices out there (there are on the shelves, but not on the hands of my friends and potential testers  ) so i allways stick to the base, midp1 cldc1.0. the memory problems i had was creating new Graphics each loop, but i got it fixed as soon as i ran the profiler. the source is avaliable, search on the j2me games showcase, it's an old post.
|
|
|
|
OverKill
Sr. Member   Posts: 337
Java games rock!
|
 |
«
Reply #23 on:
2006-01-12 03:18:15 » |
|
@f.I.x: Like Anon said, the 6600 is a PITA! Their are also a memory leak in forms. We even had a MONTY_THREAD exception on one game we could not solve.
yeah, i noticed, there is a full pdf here which lists a lot of them and some workarrounds but i can't afford to switch to another phone now. I have had very litle experience with other devices (7650 and 3650 mostly) since i don't know many people who will pay the connection fee to download a test aplication from an untrusted web page and very few devices will accept and install a jar/jad sent by bluetooth or ir. there are not many midp2 devices out there (there are on the shelves, but not on the hands of my friends and potential testers  ) so i allways stick to the base, midp1 cldc1.0. the memory problems i had was creating new Graphics each loop, but i got it fixed as soon as i ran the profiler. the source is avaliable, search on the j2me games showcase, it's an old post. hmmm forum nokia does not like me (it bitches when I want to download it) 7650 and 3650 are just as bad and for the rest of the device landscape: it does not get better! My fav is 7650's (dunno which version) setGain()... I would understand if the method, becaus it does not work, would not do anyhting but ... here it comes... it crashes the device..
|
|
|
|
|
ahonkhai
JGO n00b  Posts: 6
|
 |
«
Reply #24 on:
2006-01-13 12:07:01 » |
|
hi my friends,i really appreciate your effort over me.thanks i do appreciate.I have installed ,i have seen examples on the snake games.pls give me step by step simple keynotes of the Important tools needed in the Java NETBEANS IDE 5.0 windows to create my games please explain each.
how can i see views of what i have created
I opened netbeans ide5.0,i went to mobile>various games and also worm.java,i saw the various source codes for the snake game i (run) the source codes and a (+5550000 Default color phone came out on the phone was the snake game) I have some questions 1.can i use these same sourcecodes to create a well advanced snake games? are they copyright laws or restrictions?
2.was the snake created by using programming language or by using paint tool to design the snake,its food and the background.that is how do i work graphically?
3.how do i change backgrounds and put more effects.
4.in the snake example on the java Netbeans IDE 5.0 The source codes are divided in to sub sections example worm.java,wormfood.java,wormlink.java. pls how can i divide my codes in to subsections.
|
|
|
|
|
ahonkhai
JGO n00b  Posts: 6
|
 |
«
Reply #25 on:
2006-01-20 06:28:59 » |
|
pls i need help how do i create games using netbeans ide 5.0 how do i create animation. am totally new to net beans and its not easy pls i need guide on how to startt createing mobile for games using the design mode
|
|
|
|
|
|