gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > traveling and isometric world

#35561 - esl - Mon Feb 07, 2005 5:16 am

Hey all,

So here are the questions. Are there any tools that anyone knows of to make editing a large aray a little easier, say like a spreadsheet that you could get to output in the format of a 2d array? And...Is there an easier way to get the effect described bellow that I just can't seem to think of.

Alright here is what I have going and I have a couple questions. I am making a game in an isometric view, think marble madness. I have created a good set of tiles for mode 0 to represent the map. What I would like to be able to do is have a character move about this map such that I can have multiple steps (elevations) with which the character can either jump off from use ramps to travel between. So essentially I would like to be able to have a character say standing on top of a cube that is sitting on a plane and walk off the edge and fall down to the plane bellow. In viewing this in isometric you will see that, while falling, the character is traveling over the part of the background that depicts the side of the cube, which should have no effect on his falling, and then down to the plane bellow. But if you could look at the map from directly above (instead of in isometric) it would just apear that the character walked a straight line off from the top of the cube then onto the plane bellow. I would also like to be able to have the character jump between two cubes in which both top surfaces are at the same elevation. To get the jumping and falling to look real in a isometric view I was thinking of trying to make a 2D aray that would represent the elevations of the map at all of the different x and y (this x and y would be the x and y you would view if you again were looking at the map from directly above instead of in isometric) locations and using this elevation and some conversion factor that I haven't figured to change the y offset for the display so that the character would "fall" when traveling between two different elevations. This seems like it would work and all but where I have trouble is that I would like to have a fine enough resolution in the elevation so that the character can travel ramps and not have it look like a bunch of small steps but in getting that fine of a resolution I run into needing to create a huge array to represent the elevation and as far as I can tell have to do it manually, hence the reason I am looking for an easy way to edit a very large array.

One more thing that I hope can make this mess of a post a little more clear...the character travels along the x and y that you would view from looking above down at the world....so when viewing the world in isometric traveling in the posotive x direction actually travels to the right and down on the screen, and traveling in the posotive y direction causes the character to travel to the left and down on the screen. Oh, and the character stays in the middle of the screen at all times.

Sorry about the rubish above, if I could draw it for you I could explain it in approximatly .3 seconds, but doing it verbally gets a little long winded.

As always any thoughts would be great. Also, it is great to have a forum like this with so many knowledgable people at it that aren't just sitting there flaming one another back and forth.

Peace,

-e-

#35562 - sajiimori - Mon Feb 07, 2005 5:54 am

Along with the height value for each tile, store its slope type (flat, right, left, steep left, etc).

Editing maps by hand is madness. ;) Write a tool of your own if you can't find a suitable one.

#35564 - esl - Mon Feb 07, 2005 6:22 am

I have never created a tool before and have had a hard time searching the forum finding anything related to doing so. If anyone knows of any good sources for information about such things and could pass it on I would be in your debt.

Thanks for the help,

-e-

#35579 - blinky465 - Mon Feb 07, 2005 3:26 pm

Regulars to this forum were probably waiting for it, so here goes....
I'm writing an isometric block based game - http://www.multiedge-net.co.uk/gba/demo.zip and have now got as far as editing the rooms myself.

I'm using a linked list to store the position of the on screen objects - much neater than a massive great array. As each object moves, it looks at all other objects in the room and asks "am I within 8 pixels of any other block in all x,y,z axis?" as part of the collision detection. (my blocks are 8x8x8 pixels in size)
If so, a collision is detected and if the block is immediately below, the moving block does not fall, otherwise it does.

I suppose you could alter this so that a "ramp block" with a definite slope type could affect gravity (e.g. use %8 to determine how far "into" each block you in terms of fine co-ords) and make each object fall just a little bit further.

#35594 - sajiimori - Mon Feb 07, 2005 8:17 pm

Well, if you were going to write a graphical map editor, you'd need to know how to create a GUI and write binary files.

There are 2 main methods of creating GUIs: writing code that describes the interface using a particular library (wxWindows, GTK, etc), and using a graphical UI designer (provided by Visual Basic, Visual C++, SharpDevelop, etc).

I've never used a free UI designer that I liked. Visual Basic has the best one I've ever seen.

Writing binary files is explained in most good C books, but you're free to choose more convenient languages for development tools. Python is good in that respect, and there's lots of GUI stuff available for it.