J2ME Tile Engine Help!

Started by
4 comments, last by brcolow 19 years, 12 months ago
Hey, I have started an upcoming Mobile Phone Game company. Currently it has two staff members. They consist of an amazing pixel artist and myself, the coder. I have undertaken quite a large task and I have managed to get pretty far but it seems that I am stuck. Basically, I need some help to finish my tile engine. It is a very simple tile based engine that just needs support for multiple tiles reading off of a .dat file. I have that all to work fine but my current code only supports one tile! So really, it's a matter of revising a few functions and that's really it. You will be listed as a Coder for the project and a link to your website if you have one will be provided. Thank you, brcolow If you would like, I can give you the code through AIM or MSN or even email, I prefer aim though ^_^ Feel free to contact me! AIM: brcolow3 MSN: brcolow@hotmail.com EMAIL: " " [edited by - brcolow on April 21, 2004 1:41:37 AM]
-Brcolow-
Advertisement
Not to beat down on you or anything like that, honestly, but if you can''t write a tile engine without help then maybe you are better off not creating a commercial mobile game company. Trust me, the mobile market is tough, you don''t want to put out halfassed games.

Now, to answer your question I first need to ask a few myself. What are you using to develop the game, MIDP1 or MIDP2?

Also, what do you mean by "my engine can show only one tile"? Do you mean that you actually read in the whole tilemap from file but only display one tile or what? Or do you mean that you only READ one tile from your .dat file?
-----------------------------Final Frontier Trader
Yeah, I thought I would get this response ^_^

Anyways, it runs off of MIDP 1 because the vast majority of the market is MIDP 1, there is a limited market with MIDP2. Basically, it reads off of the tile map of a 99X7 map. But the problem is, is that it takes all of the numbers and only displays one of the same tile, because of some error in my methods I suppose. I really want to fix it but I think I need some help on the matter. I am dedicated enough to make it, I can aquire the knowledge if I am given to time. Anyways, thank you for your response.
-Brcolow
-Brcolow-
I had the same problem for a little while. The way Java works is that every single object is a pointer to the data in memory. What you''re retrieving, I believe, is something along the lines of creating a 99x7 tile map by having each element equal one single tile. When you grab a tile, you should create a copy of it.

I''m not sure if this is how you do things, but I had that problem when I was making a tile engine. I had a matrix of pointers to a tile list. I would retrieve the object from the list thinking that it would work, but only 3 tiles would show up on the screen. What was happening is that I was drawing that tile 37 times in one spot. When you pull the tile from a matrix or list, create a copy of it so you''re working with individual data, instead of multiple pointers to one object.

AIM: The Tarviathun
Well in that case, please post your loading and drawing methods for your tile map so that we can help you.
-----------------------------Final Frontier Trader
I do agree.

This topic is closed to new replies.

Advertisement