Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (590)
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 1145 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.

 

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

The first screenshot will be displayed as a thumbnail.

trollwarrior1 (34 views)
2014-11-22 12:13:56

xFryIx (73 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (40 views)
2014-11-12 21:09:33

kovacsa (66 views)
2014-11-07 19:57:14

TehJavaDev (70 views)
2014-11-03 22:04:50

BurntPizza (68 views)
2014-11-03 18:54:52

moogie (83 views)
2014-11-03 06:22:04

CopyableCougar4 (82 views)
2014-11-01 23:36:41
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org 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‑gaming.org
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!