#Tiles in a 2d Java game

25 messages · Page 1 of 1 (latest)

warm glacier
#

In working on making a simple tile-based 2d game and I was just wondering about something. Say I have a setup like so;

0 1 2 3 4
5 6 7 8 9
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0

0 = grass
1 = water
2 = spruce
And so on

Is there anyway to have more than 9 different types of tiles in a world map? If so I would love to know

exotic kilnBOT
#

This post has been reserved for your question.

Hey @warm glacier! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

mild spindle
#

you could use the alphabet

full ibex
#

yea you could use characters

#

and to compare them just cast to int etc

warm glacier
warm glacier
mild spindle
#

should prob look like this then

title= new ArrayList<Char>();
title['a'] = ...

mellow quarry
#

Can't you just use numbers over 9?

#

Like
120 4 10 8
1 2 5 12

full ibex
#

he can

full ibex
exotic kilnBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

warm glacier
warm glacier
mellow quarry
#

Could you explain why it wont work?

#

And what exactly do you aim to achieve?

warm glacier
#

so ive got this jframe, you see the trees and stuff, im able to have 9 different types of tiles, so the grass is one of them the tree is one of them the water is one of them and the sorta carpet thing is one of em. what i aim to achieve is to be able to have more variety in my tiles

#

i dont know the reason it didnt work

#

but

#

when i use single dig numbers it works, being able to load the texture on the world map

#

symbols dont work

#

neither do letters