Powered by Create your own unique website with customizable templates.
CREVIS
  • Home
  • Devblog
  • Apply
  • About
  • Download

Welcome, staff in training!

Here we are going to teach you how to become good at your modeling job. Modeling, in our book, is the art of creating a model of something (for example a tree) and converting it into code to be used in the game. This might sound a complex job, but you do not need any knowledge of coding whatsoever. Study the following carefully. You will be tested at the end. If you are to become a modeler, you must score 100% on the test. If you score under, you can retake/restudy. Good luck!

Coordinate Understanding 

Picture
figure 1.
The following picture in the red circle shows 3 blocks. Each block has a height and width of 32 pixels. The bottom-most block is the origin. The origin is the block that has the coordinates (x,y). The block above it, however, has the coordinates (x,y-32). Why is this? This is because every time you go up one block the y value will decrease by 32 (the block's height). If you wanted to go up a third block, it would decrease by another 32. The coordinates of a third block would be (x,y-64). Notice that the x value does not increase or decrease, as the only thing that is increasing/decreasing is the y value. If you wanted to go down one block, the coordinates of a block under the origin would be (x,y+32).

Now, let's work on the x value, as you seem to have a good understanding of the y value. The x value works very similarly to the y value. Instead of going up and down, it goes side to side, or left to right. The model to the left of the model in the red circle is an example of the use of the x value. When creating a block to the right, you will add 32 to x. If you wanted to create a second block next to that, you would add another 32, making it 64. If you wanted to create a block to the  left, you would subtract 32 to x. If you wanted to create a second block next to that, you would subtract another 32, making it subtract 64. The coordinates of that would be (x-64,y). Let's say you want to go left one block, and up one block. We are going to use both the x and y value for this. The coordinates of that would be: (x-32,y-32) because you are going left one block, and up one block. 

Translating the model and coordinates into code

Once you have the coordinates of your model, all that is left to do is translate the coordinates/model into code. This is probably the easiest step. Here's how translating works:

To create the block, you need to write:

instance_create(coordinates,object);. 
Instead of writing (coordinates) you would write the coordinates of the block in the model. So, to create, the origin, we would have to use the code:

instance_create(x,y,object);


The coordinates are (x,y) because neither the x value or the y value is changed. 

Instead of writing object, you would write the name of the block. For example:

instance_create(x,y,obj_wood); 
Wood is the material you would be creating. When you are given something to do on the team, you will be given a list of material names.
For the sake of making things easier, we will just use object.

For each block, you need to create another line of code. To create the model in the red circle, the code you would use is:

instance_create(x,y,object);
instance_create(x,y-32,object);
instance_create(x,y-64,object);


Each line of code creates another block. To create the other model that uses both the x and y value, the code you would use is:

instance_create(x,y,object);
instance_create(x-32,y,object);
instance_create(x+32,y,object);
instance_create(x+32,y-32,object);

    Final Test: Understanding of Modeling Concept

    Picture
    Convert this model into code in the following textbox. The red box is the origin.
Submit
Powered by Create your own unique website with customizable templates.
  • Home
  • Devblog
  • Apply
  • About
  • Download