java - Making a 2D grid of Sprites -


i finished first coding class (ib computer science, if helps), , decided wanted make first game.

the game world have top-down view of terrain. each part of terrain made of squares (it similar way dwarf fortress looks). have been able output console, using characters stand-in graphics, course covered little on graphics work.

what best way create grid of sprites or colored squares inside jpanel? have been able display bufferedimages before, have not been able align multiple bufferedimages grid.

as of now, have '2d' arraylist, arraylist of arraylist, making game world. works great when use double loop , system.out.print("");

check oracle documentaion layout managers. 1 looking grid layout.

if feel fancy, can upgrade javafx, , use grid pane instead.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -