Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8611217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:19:09+00:00 2026-06-12T04:19:09+00:00

I have a game, and recently decided to switch from TilED (a tile map

  • 0

I have a game, and recently decided to switch from TilED (a tile map editor), to doing it manually. I’ve been searching all over google for some help, but to no avail. Here’s my code that renders my background using sky tiles:

for (int x = 0; x < 16; x++) {
           for (int y = 0; y < 16; y++) {
              map[x][y] = AIR; 
              if(map[x][y] == AIR) {
                 air.draw(x * tilesize, y * tilesize);
              }

           }
        }

This just creates a new 16 * 16 map and fills it with sky tiles. My question is, how do I specify levels for other tiles to go? So like grass tiles go on layer 10, dirt goes through 9 – 6, and stone fills the rest?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:19:10+00:00Added an answer on June 12, 2026 at 4:19 am

    To do it on each level you would just do another for loop:

    for(int x = 0; x < 16; x++) {
        map[x][10] = GRASS;
    }
    

    And that is how you would make it work. Hope it helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been doing RPG game recently and every page load I have to use
I have been working on a Java game and I recently wanted to see
I have been recently writing a UDP server for a 2D shooter game I
recently I have been trying my hand at coding a game in C#. I'm
I recently wrote a Java playing card game and have all the game logic
Recently I have been developing a small OpenGL game. Everything in it runs fine
I have been looking into game development recently and my first programming language is
I have recently developed a game in Slick2D, i have accessed all my images
I have recently been adding sounds into a game I'm developing using AVAudioPlayer .
I have recently finished phase 1 of my Facebook game: Rails Across Europe It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.