• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
LAURENT*

I have this collision detection concept I want to discuss

11 posts in this topic

My game is an isometric game with an isometric view. coming up with the logic for collIsion detection hasn't been easy but I have a concept. I wanna discuss how reasonsable the concept is before I attempt it and waste time. I've stumbled on the execution of step 3.

 

What I planned to have are special functions that handle the relation between the floorpad and wall objects for each  level. The function would be call levelone_collision() and would call the other function to do it job. Here is a rough sketch of my concept as well as some philosophy code I thought of. 

//Checks collision detection between floorpad and landpad
Function 1 (floorpad, landpad)
{
	//Check the collision. Return true if collision happens
}

//Uses function 1 to determine collision between character and wall object
Function 2 (floorpad, landpad, character, wallobject)
{
	//a variable declared in this function
	bool interaction;

	//call the first function
	if (Function 1 (floorpad, landpad) = true)
	{
		//if interaction = false the function return false
		interaction = true;
	}

	if (interaction = true)
	{
		//check collision between character and wall object
	}

	else  
	{
		return false;
	}	

}



//This function detriment the collision of a single level
function 3 (floorpad, landpad, character, wallobject)
{
		

for (int a = 0; a < 5: a++)
{
	//call function 2
	if (function 2 (floorpad[1], landpad, character, wallobject[a]) == true)
	{
		//When this function return true the correct force is applied to push the character back
		return true;
	}
}


for (int b = 6; b < 10; b++)
{
	if (function 2 (floorpad[2], landpad, character, wallobject[b]) == true )
	{
		return true;
	}
}
}

?

?

  concept_zpsf6faa9f0.png

0

Share this post


Link to post
Share on other sites

I'm struggling to follow, but seems like you want to spatially partition your wall objects using a grid, then broadphase using the floor grid to get a list of local wall objects to then test against. This is a perfectly good approach. That N game that was popular for a while did something similar:

 

http://www.metanetsoftware.com/technique/tutorialB.html

 

Depending on your level layout, there may be better approaches for spatial partitioning. Also bear in mind the added complexity of spatial partitioning may actually outweigh just brute-force AABB checking the player against each wall. I've abandoned whole spatial systems in small levels because it turned out to be unnecessary.

0

Share this post


Link to post
Share on other sites

No, this is not the goal of my concept. If my concept was misread this badly I need to seriously reword everything. My game is isometric. Most isometric games do not allow characters to jump. What I want to do is allow my characters to jump, and climb up objects within the game. I was trying to come up with a logic to allow this work. This picture below is a good example of how the character would travel through a level. This is isometric.

 

I feel like whatever I say no one will understand. There is literally nothing else like this that has been attempted or if it has it isn't very well know. 

 

071d.gif

0

Share this post


Link to post
Share on other sites

 


I feel like whatever I say no one will understand. There is literally nothing else like this that has been attempted or if it has it isn't very well know. 

 

Well, sorry, I have no idea what you mean and if you can't find a way to express it better, its hard to discuss it. Maybe others more familiar with the isometric domain can make better sense of this.

 

I would say though that given that the isometric part really only applies to rendering (and translating mouse input back to world positions) and you need a 3D representation of your world to allow the behaviour you are asking for, I'm not really sure what difference it being an isometric view makes to the mechanics of collision detection.

 

 

The collision detection wouldn't be a problem if I didn't have this z variable. The z variable is the characters height in comparison to the landpad which has which has 2 variable named x and y. Anyways I don't think anyone would help now, the general rule for programming places like this is if it  isn't clear and to the point by the first post it's ignored so I guess I'll just go solo now until I really made sure the concept is perfect. 

0

Share this post


Link to post
Share on other sites

Yeah your landpad, floorpad, etc are very confusing to follow.

 

Are your levels largely static? A lot of iso games will create another texture map of the level defining the walkable paths - whether this is a feasible solution depends on if you are rendering a 3d world from a certain view (and if this view is changeable) or if you are using static textures for your levels, or if you are doing a tile based game.

 

Isometric tile based (that use 2d sprites etc) benefit from a grid system - you can then predefine different height levels for the grid. IE allow 16 different elevations which would create a grid that is the level's width by height by 16 tall. You then put all of your game objects in one of the grid spaces, and you draw them in an order that gives isometric appearance (usually start at bottom layer at upper right corner and finish on top layer at lower left corner). In this type of grid system you can give each of your objects a height - so that a tree that is 10 layers tall, for example, will not be overdrawn unless some object is at level 11 or higher.

 

For collision detection, you check each one of your game's dynamic objects against the tiles that it might occupy on completing the move - if something else occupies those tiles then the check fails. Usually you don't have too many dynamic objects (characters, enemies) and so this check is not very expensive.

 

In any case, isometric with elevation has definitely been done before - just google and you can find lots of different implementations.

0

Share this post


Link to post
Share on other sites


I feel like whatever I say no one will understand. There is literally nothing else like this that has been attempted or if it has it isn't very well know. 

 

This is the first game that comes to mind:

 

http://en.wikipedia.org/wiki/Little_Big_Adventure

 

I am sure there are some old Nintendo games that are isometric with jumping... I remember something with snakes...

 

http://en.wikipedia.org/wiki/Snake_Rattle_'n'_Roll

 

I also agree with Servant of the Lord: drawing your game isometrically doesn't mean that the internal logic would be any different from anything else in 3D. Your problem, whatever it is, has been solved before, at least dozens of times.

0

Share this post


Link to post
Share on other sites

I am sure there are some old Nintendo games that are isometric with jumping...


Solstice for NES had fairly complex isometric jumping puzzles.
0

Share this post


Link to post
Share on other sites

Regarding collision detection for jumping in 3D environments with isometric graphics, it's true that the data structures and algorithms need to be able to represent a 3D environment, but it can be highly simplified. Typically, you might have a 3D grid of blocks that is completely analogous to a 2D grid of tiles; very sophisticated environments might add sloped block faces (like e.g. in Marble Madness).

 

The environment can be even simpler in some cases: for example if there are no overhanging platforms you can store one floor height at each x,y position with implicit blocks (a stack beginning at the minimum possible height).

 

On the other hand, some representation are constrained but as difficult to process as general 3D geometry and more complicated. For example, sparse lists of axis-aligned horizontal or vertical walls, even if the walls are rectangular, require general geometric search (what walls intersect a certain volume, what is the closest wall to an object, etc.) rather than simply looking up a few relevant grid cells..

 

Whatever you mean by floor pads and land pads, I assume they are horizontal or vertical faces of the map blocks or horizontal or vertical faces of the collision shape of the character, or portions of such faces. Can you give explicit definitions?

 

With grid-based movement all collision detection algorithms are similar to 2D ones, usually simply projected onto the axis-aligned plane that contains the movement velocity. (Example: the 3D movement in Q*bert is equivalent to climbing a 2D staircase, with a choice of intersecting x-aligned or y-aligned staircases at each step)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0