Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (213)
games submitted by our members
Games in WIP (785)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Design Issue  (Read 2313 times)
0 Members and 1 Guest are viewing this topic.
Offline mhnsp

Junior Newbie

Java games rock!

« Posted 2003-11-18 14:29:19 »

I am relatively new to J2ME and wireless development, and am currently writing a game to become more familiar with the idosincracies involved.  My game is cell/map-based in which each cell contains an object, and the game contains approximately 20 levels, each containing a map of 20x30 cells.  Since memory is a prime issue, each level contains a 2D-array of int's that denote the type of object in the particular cell.   To save memory, I made each level a separate class that can be swapped in-and-out as needed via an interface adapter.  Does anyone know of a better way to design this particular issue?  As it stands, I have a MIDlet class, a GameCanvas class, a class to manage the levels, an adapter class, and possibly 20 classes for each of the levels.  Right now, I have only one level completed and incorporated into the game, and wonder if the JAR file will even get loaded after adding the other 19 level classes.  Any suggestions?  Thanks!
Offline Matzon

JGO Knight

Medals: 19
Projects: 1

I'm gonna wring your pants!

« Reply #1 - Posted 2003-11-19 04:53:19 »

Since abstraction usually implies more classes I would recommend creating somekind of generalized Level class, which can create a Level based on some input parameters which are loaded at level change.

20+ classes is a lot for a j2me implementation, at least for a Nokia series 40 phone, which has 210 kB heap and 64kB limit on jar+jad size.

Offline mhnsp

Junior Newbie

Java games rock!

« Reply #2 - Posted 2003-11-19 10:44:45 »

Thanks.  This was the answer I was (dreadfully) looking for.  Is there a place on the 'net where I can get information regarding capacities (memory/jad/jar sizes) for wireless devices?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline davidaprice

Junior Devvie

« Reply #3 - Posted 2003-11-20 07:00:10 »

Forum Nokia provides this sort of information for Nokia phones in its device table. Other manufacturers probably have similar information available.

Forum Nokia's device table confusingly has two kinds of information: individual pages for some devices from the 'Select a Device' drop-down menu, and then a table with information for pretty much every device which you access using the 'Series 40', 'Series 60', 'Series 90', 'GSM', 'CDMA', 'TDMA' and 'W-CDMA' links. The info you want is in the table entries, not in the individual pages.
Offline shareme

Junior Devvie

Java games rock!

« Reply #4 - Posted 2003-11-20 07:36:38 »

I woudl use an abstract class for abstract concept of level..slim it down to abstract methods that appear in both levels..

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

numerical (376 views)
2017-02-21 07:32:16

numerical (377 views)
2017-02-21 07:31:46

theagentd (491 views)
2017-02-18 13:42:33

theagentd (487 views)
2017-02-18 13:35:16

h.pernpeintner (1653 views)
2017-01-24 22:39:11

h.pernpeintner (1638 views)
2017-01-24 22:38:32

Galdo (2208 views)
2017-01-12 13:44:09

Archive (2164 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2703 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2356 views)
2016-12-15 21:50:57
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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!