2d – Unit – reusing maps map segments

I wonder what is the "best practice" workflow for the reusable map map segments. For example, outside of my mosaic palette I build a room and I want to reuse it in multiple places.

Is there any way to "prefab" a section of a tilemap? I have not found such a thing.

Or maybe I should prefabricate the entire tilemap and use several tilemap objects within a grid? Will not that introduce a significant overload?

What happens if I want to prefabricate a section of a tilemap with some additional objects that are not tilemap?

Thanks for any help!

2d map in mosaic with Javascript images

I am trying to create a mosaic map with simple 2D images (30×30). I restarted the project from my previous publication, and instead of using another person's code, I thought I would learn more to start from scratch. It was fine, but I came across a pothole when trying to use mosaic images. My previous project used to continue to create simple cubes. Now I am trying to use images, and I was wondering if there is a way to make the images do not have to follow exactly the same steps as below:

function renderLevel () {
// clean the canvas
context.clearRect (0, 0, canvas.width, canvas.height);
// walls = red boxes
context.fillStyle = "# ff0000";
for (i = 0; i <levelRows; i ++) {
for (j = 0; j <levelCols; j ++) {
yes[i][j]== 1) {
blockrow.push (i);
blockcol.push (j);
context.fillRect (j * tileSize, i * tileSize, tileSize, tileSize);
console.log ("add");
//collision[i] = new matrix ([i],[j]);
}
}
}
// player = green box
context.fillStyle = "# 00ff00";
context.fillRect (playerXPos, playerYPos, tileSize, tileSize);

}

Currently, I am simply trying to drop the images and manually declare the sizes when calling them.

                setmapimages () {function {
for (i = 0; i <mapArray.length; i ++) {
for (k = 0; k <mapArray[i].length; k ++) {
// image for player
if (k == positionX && i == positionY) {
ctx.drawImage (img, 30, 30);
}
// image for road
yes (mapArray[i][k]    == 0) {
ctx.drawImage (img2, 30, 30);
}
// image by collision
yes (mapArray[i][k]    == 1) {
ctx.drawImage (img3, 30, 30);
}
// image for the store
yes (mapArray[i][k]    == 2) {
ctx.drawImage (img4, 30, 30);
}
}
}
};

I set the size of the canvas in a similar way to the previous project:

var canvas = document.getElementById (& # 39; canvas & # 39;);
var ctx = canvas.getContext ("2d");
canvas.width = img.width * 11;
canvas.height = img.height * 9;

Although I configure the variables a little differently. Since I'm using images now.

var img = new image ();
img.src = "http://gamedev.stackexchange.com/image.png";
var img2 = new image ();
img.src = "image2.png";
var img3 = new image ();
img.src = "image3.png";
var img4 = new image ();
img.src = "image3.png";

Am I calling the images correctly? I searched for "drawimage" and I think I went the wrong way, but I'm not sure what I could call the images correctly.

python – Store coordinates in 2d grid

I am writing a feature for a small pygame program. The idea is that I have a square screen of 500 pixels and I want to place 5 objects per row with the size of width Y height in random order and I need a function to generate and store coordinates.

of random import randint

def gen_coords (width = 50, height = 50, side_of_scr = 500):
"" "Generates random coordinates for objects in rows
that are placed in a 5x5 grid. "" "

coords = []
    for row in rank (5):
# creating a row container
chords[])
for pos in rank (5):
# range of values ​​in randint reflects that I want the objects
# to be placed with offset from the sides of the screen
x = randint (0.5 * width, side_of_scr - 0.5 * width)

# the distance between the rows is equal to the height of an object
y = 0.5 * height + row * 2 * height
Coords[row].append ((x, y))
return chords

So this

for coord in gen_coords ():
print (coord)

returns

[(177, 25.0), (367, 25.0), (214, 25.0), (284, 25.0), (125, 25.0)]
[(425, 125.0), (446, 125.0), (126, 125.0), (409, 125.0), (187, 125.0)]
[(210, 225.0), (188, 225.0), (215, 225.0), (132, 225.0), (431, 225.0)]
[(303, 325.0), (471, 325.0), (252, 325.0), (26, 325.0), (111, 325.0)]
[(468, 425.0), (127, 425.0), (452, 425.0), (30, 425.0), (345, 425.0)]

I've done this using the list of lists and it's working so far, but I'm looking for the best way to do it. Thanks for the help.

2d – How to prevent enemies from swinging to the left and to the right during the chase?

I have an enemy on the ground with a simple persecution state. When in this state, the enemy moves with constant velox towards the player.

However, if my player jumps directly on the enemy, the enemy will change direction quickly several times, since every time the vel.x is updated, the sign is displayed. If the player is on a ladder over the enemy, the enemy will simply oscillate indefinitely. Ugly.

My enemy has an active state where it stops and then attacks, but my player has a high jump and, therefore, can keep a sufficient distance to prevent the enemy from entering this state.

I wonder what design options I can do to avoid this ugly swing from one side to the other during the chase.

Architecture plans, sections, 2D plans, 3D of AutoCAD and Sketchup for $ 10

Architecture plans, sections, 2D drawings, 3D of AutoCAD and Sketchup

Hi, I'm Uzban, an expert architect. I have more than 3 years of experience as an Executive Architect.

Some of my services include

  • Design of plans, sections and plans.
  • Convert handmade drawings into CAD.
  • Modifying old plans to new high quality plans.
  • Professional quality representation

If you are looking to make professional floor plans, and sections, I am here to help you.

Do not hesitate to contact me.

.

unit: Where should I start when I make a 2D point-and-click game that has static images like the classic Shadowgate game?

I'm having trouble finding a good reference for the specific type of 2D point-and-click adventure I'm thinking about. I would like to make a game that is in line with the classic Apple / NES Shadowgate game. https://en.wikipedia.org/wiki/Shadowgate

Basically, it consists of completely static images where you must click on the image to determine your way forward (or backward). This could be achieved with a compass or arrows somewhere in the user interface. This would be the first person perspective. It has an inventory in which you can click to apply to the image and solve missions.

I'm using Unity, but I do not mind reviewing something more suitable to develop a game like that. I have experience with C # mainly, so it is a consideration.

2D shader to affect lights based on distance and

I've been struggling with this problem for a few weeks (mainly because I'm very new to shaders), but I have an angled camera for my 2D game that uses lights.

I saw this link about the & # 39; 3D light simulation & # 39; and I asked myself how the person responsible for the shading was written. I'm in Godot, which uses its own shading language. I just need a way to compare the values ​​of y from the light source and the sprite. Any help would be really appreciated!

Sprites of characters from the game Fox 2D 187 for $ 10

Sprites of 2D 2D game characters 187

2D character game This asset is for developers who want to create their mobile game applications for IOS and Android and need character Spritesheets for their projects. The best resources for games like: shooting game, racing game, platform game and much more. Scrolling games. FATURES: Files included: Ai, Eps, Png, SpriterAnimations included:

  • IDLE
  • WALK
  • RUN
  • ATTACK
  • HURT
  • SKIP
  • DIE
  • -Dimensions 700 × 700px to all animations. All the character animation sprites are represented in the same size of dimensions. The images are represented with a dimension of 700 × 700 px for each character animation.TAKE NOTES!The Ai and Eps file contains only body parts of the vector, and there is no AI or PS for the character sprites. It's because the animation is done in SPRITER! But there is a high resolution image in Png for all animation sprites. I also included the Spriter files. ) "Title =" "/>

.

legal – Is it okay to redo a 2D game in the first person and then launch it for free?

I saw an online video where someone did a first-person version of Flappy Bird, so I was wondering …

If I had to redo a 2D game in a 3D game and change the perspective to first person, and then proceed to launch it online (as in itch.io) for free, would there be any repercussion?

The concept and gameplay of the game would be almost identical with a few changes, and although the art would be very similar, they will still be original 3D models that I made myself, and they differ from the actual resources used in the original game. All the code is original.

And could he simply call it "First Person (+ name of the game)" or is it better to call it something original?

Bear 2D Game Characte Sprites for $ 10 games

With TED, you are not only able to create games like Jetpack Joyride, Banana Kong and Hill Climb Racing, but also classic platform games.

by: sandrodrums
Created: –
Category: Graphics and Logos
Views: 162


.