side-scrolling game

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 (http://www.davieboy.net/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?

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.
http://goldenstudios.or.id/products/GTGE/
I haven’t used it myself, but from what I heard it’s quite good and easy to use and it has tutorials.

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.

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.