View Single Post
  #21    
Old February 16th, 2011, 02:21 PM
Rossay's Avatar
Rossay
Quack quack
 
Join Date: Oct 2010
Location: Scotland
Age: 22
Gender: Male
Nature: Careful
Quote:
Originally Posted by DaSpirit View Post
Data Structures? I found them to be quiet slow as compared to 2-dimensional arrays. Besides, aren't these two the same:
ds_grid_set(id, x, y, val);
and
id[x,y]=val;
With the latter being not only faster but also less memory consuming. The only logical point to use a GM data structure is if you want to change all values in a region, which is not useful for Pokemon as well as that you can do the same with a for loop.
A little incorrect I believe; data structures were added to GM because they operate faster than arrays for complex proceedures (i.e. what you'll probably require them for when coding a Pokemon game). The main advantage of using them is because to sort and order a 2D array requires a great deal of difficulty and large sections of GML whereas data structures have built-in functions to do this for you; which, is where you will observe a speed difference is - as the scripting required to sort a 2D array lags more than a ds function.

Quote:
Originally Posted by NatureKeeper View Post
Something that is always a stand in the way. How can you make a whole region appear without having to putting them in one room...?

It is a mystery.
The way they do it in Pokemon is to use several rooms and make the boundaries of the adjacent rooms look identically graphically. Then all you need to do is define a blank room transition and it flows from room to room as if they were a single one. Hope that helps you out a bit.
__________________
Pokemon X - Friend code: 1435-4688-7520
- DeviantArt -



Last edited by Rossay; February 16th, 2011 at 02:35 PM.