Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (764)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (852)
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  
  side-scrolling game  (Read 2111 times)
0 Members and 1 Guest are viewing this topic.
Offline games

Senior Newbie

« Posted 2005-08-08 21:24:49 »

Hi, I am very embarrassed for asking this question and I am very new to Java and I am trying to make an online 2D side-scrolling applet game similar to Super Mario Bros. using tiles and MemoryImageSource. The tile map is a two-dimensional array. Generating the map is easy. Scrolling is slow. I don't which way is the fastest way of scrolling the map and don't know if a two-dimensional array using tiles is the best way to make a game like that. I don't know how to make it as fast as the illegal Java NES emulator called NESCafe ( I looked at the source code of NESCafe and it uses MemoryImageSource because it's the fastest way and I don't understand most of it. NESCafe can play Super Mario Bros. very fast at 30 fps. How do I start?
Offline erikd

JGO Ninja

Medals: 16
Projects: 4
Exp: 14 years


« Reply #1 - Posted 2005-08-08 22:01:50 »

If you have performance problems with anything, always profile first (for example by running with -Xprof) before doing anything else.
MemoryImageSource is not the fastest way to do rendering because what you will basically do is software rendering. Most of the time people use MemoryImageSource is because it is compatible with java 1.1. (But, since you want to make an applet game, maybe that's what you want?)

Maybe you could benefit from a higher level 2D game engine like GTGE. It has most difficult stuff done for you already.
I haven't used it myself, but from what I heard it's quite good and easy to use and it has tutorials.

Offline games

Senior Newbie

« Reply #2 - Posted 2005-08-15 17:03:09 »

I hate high-level game engines. I want something that is low-level that can make very fast Java 1.5 applet games so I can have more control of the game.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Soulfly32

Senior Newbie

« Reply #3 - Posted 2005-08-15 18:16:17 »

HI I made a sidescrolling myself and maybe i can help you with scrolling perfomance issues..
If you use a tiled background only draw what is really on screen and if
you do this for the tiles of the level you will have no problem.

Pages: [1]
  ignore  |  Print  

EgonOlsen (591 views)
2018-06-10 19:43:48

EgonOlsen (694 views)
2018-06-10 19:43:44

EgonOlsen (478 views)
2018-06-10 19:43:20

DesertCoockie (831 views)
2018-05-13 18:23:11

nelsongames (1026 views)
2018-04-24 18:15:36

nelsongames (1083 views)
2018-04-24 18:14:32

ivj94 (1664 views)
2018-03-24 14:47:39

ivj94 (590 views)
2018-03-24 14:46:31

ivj94 (1501 views)
2018-03-24 14:43:53

Solater (568 views)
2018-03-17 05:04:08
Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46

Deployment and Packaging
by philfrei
2018-08-19 23:53:08

Deployment and Packaging
by philfrei
2018-08-19 23:50:04

Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39 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!