GPWiki.org
GPWiki.org
It is currently Thu May 23, 2013 12:51 pm

All times are UTC




Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: What to do next?
PostPosted: Fri Jul 29, 2011 10:29 am 
Shake'n'Baker
User avatar

Joined: Mon Jun 14, 2010 3:51 pm
Posts: 62
Hello, it's been a while.

Progress: I am trying to make an isometric grid. I used a 2d array to keep the layout of my grid and drew out with loops from top to bottom. They kinda look like the image below.

This array contain height and depth of the grid only.
Image

Question:
Is this approach okay? Will it work in the long run?
What to do next? Should I be working on filling the grid with grass and dirt?

If you know any good links for me, please let me know.
Thanks.


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Sun Jul 31, 2011 3:04 am 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3808
Location: Ferriday, LA, US
Hard to tell if it will cause any problems, being that you haven't given any details or code on how it is done. Of course, one thing that strikes me as a bit odd is that there appears to be a "negative" tile (the one that goes below what I assume is the "ground" level). I would assume that you could get the same effect by making the 0 height the bottom of the world, and some number above that be the "ground" level, as opposed to having tiles with a negative height.

It may or not be problematic, just an observation.

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Tue Aug 09, 2011 2:07 pm 
Shake'n'Baker
User avatar

Joined: Mon Jun 14, 2010 3:51 pm
Posts: 62
Yes that's a bummer!

But maybe I got on the wrong foot.

I want to make a game engine for a game. I like this game.
http://en.wikipedia.org/wiki/Tactics_Og ... t_of_Lodis

But I am new, just recently learned how to code.
Can anyone tell me what a game engine does?
How one should design a game engine?


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Tue Aug 09, 2011 2:16 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11182
Location: Abingdon, MD
You're trying to run before you can walk. If you just learned how to code, that means you're still learning. Start smaller by trying to create a clone of a small game like tic-tac-toe, then something bigger, work your way up to something like Tetris. Then try something like this. Don't worry about a game engine. Just code to create your specific game.

_________________
Bored? Head on over to my blog and see what I'm up to.

Microsoft XNA MVP


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Tue Aug 09, 2011 3:01 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
Quack wrote:
This array contain height and depth of the grid only.

Is this approach okay? Will it work in the long run?


Yes it will work. Negative depth tiles are not a problem.

An important part of designing isometric is to make sure the tiles line up correctly. In game, there will not be lines between the tiles, so you must design the tile shape with that in mind, so that they fit together perfectly. You only need to draw flat ground to do that, and I would suggest drawing it as a checkerboard pattern with red and green diamonds.

Only then can you start drawing the grass and dirt. :)

_________________
I ain't pushing no moon buttons.


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Wed Aug 10, 2011 4:25 pm 
Shake'n'Baker
User avatar

Joined: Mon Jun 14, 2010 3:51 pm
Posts: 62
Thanks...And I did worked on Tic Tac Toe.

So can you tell what's the difference between the camera and viewport of a 2d game?


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Thu Aug 11, 2011 12:29 pm 
Shake'n'Baker
User avatar

Joined: Fri Feb 05, 2010 1:11 pm
Posts: 52
Location: MiddleEurope
It seems Quack, that you're taking on a project similar to mine, even though my project
intends to be an isometric RPG project (using bitmap output graphics, whether rendered
or drawn).
Maybe you'll know some of these games and I incline to those of late 90-ties and at the turn
of the 20th cent. to 21th century.
http://members.chello.at/theodor.lauppe ... pg-iso.htm

What's the difference between the camera and viewport of a 2d game?
Well, I guess if you intend to make your game 2d (tile and sprite based, but isometric!),
you won't use "camera" for such a thing - same as I won't.
Unless you're using 3D models instead of bitmap graphic, 1 viewport should logically
be the only camera you have - that is, what resolution are you using
and how much of the display screen is used to determine the panel interface
and the rest that is the display view of the game.

_________________
Even this world is "programmed" by a Creator, the most skilled programmer of us all. What do you think of all that exists and all the environmental phenomena? He that maketh all had programmed it all and whenever needed, He can call one of the functions with input specified by Him. :)


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Thu Aug 11, 2011 12:40 pm 
Shake'n'Baker
User avatar

Joined: Fri Feb 05, 2010 1:11 pm
Posts: 52
Location: MiddleEurope
Nevertheless, i'd like to ask Machaira, why just tic-tac-toe,
or what principle of tic-tac-toe is essential for making isometric RPG / turn based games?

I must say I wonder about tic-tac-toe game, just tried to play it,
http://www.prongo.com/tictac/

and I wonder how does the AI work. Never tried to program AI yet.

_________________
Even this world is "programmed" by a Creator, the most skilled programmer of us all. What do you think of all that exists and all the environmental phenomena? He that maketh all had programmed it all and whenever needed, He can call one of the functions with input specified by Him. :)


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Thu Aug 11, 2011 4:02 pm 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3808
Location: Ferriday, LA, US
ElectroPaladin wrote:
Nevertheless, i'd like to ask Machaira, why just tic-tac-toe,
or what principle of tic-tac-toe is essential for making isometric RPG / turn based games?


What Machaira was getting at is that when you are first learning to program, it's best to start small. Tic-Tac-Toe has little to do with isometric RPGs, other than it is something to gain a little experience programming so one can move on to slightly bigger projects.

Like learning how an oven works before learning how to cook a souffle. :)

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Thu Aug 11, 2011 4:57 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
Quack wrote:
So can you tell what's the difference between the camera and viewport of a 2d game?


A viewport is a region of screen-space allocated for drawing.
A camera is a vector in game-space, which is used to translate game-space coordinates.

_________________
I ain't pushing no moon buttons.


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Mon Aug 15, 2011 6:14 pm 
Shake'n'Baker
User avatar

Joined: Mon Jun 14, 2010 3:51 pm
Posts: 62
ElectroPaladin wrote:
It seems Quack, that you're taking on a project similar to mine, even though my project
intends to be an isometric RPG project (using bitmap output graphics, whether rendered
or drawn).


@ElectroPaladin: I can always learn from others so I am looking forward to your project.

Now I am working with objects on my grid, by objects I mean tree/stone/etc and character.\
I want to select them with a mouse and then click another tile to make it move to.

Could you coders tell me what algorithm to implement? Btw I am a rough function that can calculate Iso coordinates from mouse position.


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Mon Aug 15, 2011 7:03 pm 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3808
Location: Ferriday, LA, US
I have an isometric tile engine written in JavaScript, but I haven't implemented mouse-clicking on tiles... that said, I find that the most straightforward method is to create a small image with differently colored "zones" and use it to "help" with the mouse picking. Basically you take one of your tile graphics, color the tile inside white, and color the "outside" corners with red, green, yellow, and blue (making sure each color element is either 0 or 255). Then you place (without drawing) the image under the mouse, aligned with your tile map -- and use the pixel data of the image to determine over which tile the mouse pointer is.

So, for example, you have a "mouse map" image. The inside is white, the NW corner is red, NE is green, SW is blue, and SE is yellow. While you mouse around, you have the image in memory, and -- based on where the mouse is in relation to the screen -- you can determine which tile to select on a click. If the pixel is red, select the tile to the NW of the "current" tile. If it is green, select the tile to the NE... and so on.

Caveat: Using this approach will require you to follow the "same server" rule -- you can only get the pixel data of an image if the image is from the same server as your script. And if you aren't running it on a server at all, the rule will kick in a give you an error by default.

As for an actual algorithm to determine the isometric tile the player clicks on (one that doesn't require using a mouse map image), that I don't have. Someone else probably does, though. ;)

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Mon Aug 15, 2011 8:26 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6716
Location: Oxford, Englandshire
theraje wrote:
Someone else probably does, though. ;)


I did mouse picking in an isometric grid ages ago. I don't have the code handy, but from memory it went like this:

Given a standard isometric grid:

Image

You can divide it up like this:

Image

That means that any given square can only have two configurations:

Image

You can work out which half of the square your mouse is hovering over fairly simply and then you have pixel perfect selection. However, if your tile have differing elevations this method won't work too well.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Tue Aug 16, 2011 11:19 am 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
You could do a coordinate transformation on the click point to determine the tile. If there are elevated tiles, you could do a coordinate transformation to determine a ray, and do a raytrace to find the tile.

When you have elevated tiles, there is a possibility of clicking on the side, rather than a face of a tile. You'll have to decide what those clicks should do.

_________________
I ain't pushing no moon buttons.


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Tue Aug 16, 2011 6:30 pm 
Shake'n'Baker
User avatar

Joined: Fri Feb 05, 2010 1:11 pm
Posts: 52
Location: MiddleEurope
Quack wrote:
ElectroPaladin wrote:
It seems Quack, that you're taking on a project similar to mine, even though my project
intends to be an isometric RPG project (using bitmap output graphics, whether rendered
or drawn).


@ElectroPaladin: I can always learn from others so I am looking forward to your project.

Now I am working with objects on my grid, by objects I mean tree/stone/etc and character.\
I want to select them with a mouse and then click another tile to make it move to.

Could you coders tell me what algorithm to implement? Btw I am a rough function that can calculate Iso coordinates from mouse position.


Maybe the programming language I use, may be somehow not very popular for most of you in the forum.
I use Lingo, which is the language of Macromedia Director. (I use Macromedia Director MX)

Here's a tutorial that helped me much in building my isometric engine for the game.
http://www.lingoworkshop.com/Articles/I ... Game_1.php

maybe you won't know the language, but try to follow the principles and implement it in your project.

First, as the tutorial says, you should have a map - I've done these foundations of my isometric engine by determining the fact that maps are essential for your game world. Games consist of a large variety of maps that have various width/height, the boundaries of the maps, where you can't go further. To achieve better effect, I advise to have map boundaries and scroll boundaries inside the map that block the player to scroll out, so that (s)he can't see the map boundaries (to achieve the effect of real world) - this way was used in Post-Nuclear RPG, Fallout.
The travelling thru game world is made by exiting one map and entering another. Every map has its own variables and data stored to determine what's on the map and what's not anymore, solved quests, botched things etc.

The screen size of the map in pixels should be calculated by number of columns (Y tiles) * tileWidth (width of 1 tile) and the number of rows (X tiles) * tileHeight (height of 1 tile)
I bet you'll find the tutorial helpful :)

Concerning my project, anyone interested to see,
here's the link:

http://www.sendspace.com/file/b3fiio

It's no installation file, just unpack somewhere, but make sure the directories remain within.
The principial foundations of an isometric RPG are laid I would say, but I welcome your comments for improvement etc.
btw. Don't forget to read the readme file :D

_________________
Even this world is "programmed" by a Creator, the most skilled programmer of us all. What do you think of all that exists and all the environmental phenomena? He that maketh all had programmed it all and whenever needed, He can call one of the functions with input specified by Him. :)


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Sat Aug 27, 2011 5:06 pm 
Shake'n'Baker
User avatar

Joined: Mon Jun 14, 2010 3:51 pm
Posts: 62
Nicely done ElectroPaladin....I wish I could be at your lvl....And I checked that url b4. Nice but I have a different concept it mind.


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Mon Aug 29, 2011 2:03 am 
Shake'n'Baker
User avatar

Joined: Mon Jun 14, 2010 3:51 pm
Posts: 62
Can you guys tell me about sprites, spritesheet and how to animate them?


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Mon Aug 29, 2011 7:03 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11182
Location: Abingdon, MD
There's this thing called a search engine... You type in what you want to find information on and it gives you a whole bunch of pages on that subject. :rolleyes

_________________
Bored? Head on over to my blog and see what I'm up to.

Microsoft XNA MVP


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Mon Aug 29, 2011 8:31 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6716
Location: Oxford, Englandshire
Machaira wrote:
There's this thing called a search engine... You type in what you want to find information on and it gives you a whole bunch of pages on that subject. :rolleyes

Saucer of milk for table four!


Quack wrote:
Can you guys tell me about sprites, spritesheet and how to animate them?

What specifically are you looking for Quack?

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
 Post subject: Re: What to do next?
PostPosted: Mon Aug 29, 2011 8:43 pm 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3808
Location: Ferriday, LA, US
Machaira wrote:
There's this thing called a search engine... You type in what you want to find information on and it gives you a whole bunch of pages on that subject. :rolleyes


There's also this thing called a forum... you ask questions and discuss things, and there is the occasional troll that needs a beat-down. Anyone for a game of Whack-A-Troll?

---

Quack, the basic idea of sprite sheets and animation is that you have all your animations in separate "cells" of a single image. These cells are the size of one frame of your sprite's animation. You animate a sprite by drawing just one cell of the sprite sheet at a time, and change the cell based on time. That way, you have all the animations in one image, and just draw the part of the image that represents the current frame.

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group