ActionScript 2.0 :: Mx Tile Based Games
Jan 10, 2005
i'm fiddling about with tile based games at the moment and am working from the super good tonypa tutorials. i'd like to change the source code a bit so that i can play about with placing items onto the tile grid dynamically but need some help! tile_dev2.fla.i've linked to the source file and would basically like some help to change a value in the map array so that it change the graphic displayed on the screen using a button or keypress maybe? i have a detectKey function working on the stage that is used to control the movement of the little birdy character i made. also maybe a function the change the character displayed on the screen.
View 1 Replies
Similar Posts:
Mar 25, 2011
I'm trying to create a simple side scrolling platform game. So, my question is, which direction should i go in? Tile based or art based?So far i have a jpg that extends far beyond the stage and if i wanted to make a real level then instead of having it 480x2000 i would need to make it more like 480x5000 at the least.Im interested in tile based but all the guides i've found are rather dated.
View 1 Replies
Nov 17, 2009
I'm relatively new to AS3. There's one thing that I don't quite understand about Sprites. I'm making a tile based game, and all the tile graphics for a level are inside one movie clip in each frame. Would I be able to go about creating multiple sprites based on the frames in said movieclip's timeline I would I have to go through and make a separate library graphic for each.
View 2 Replies
Feb 24, 2012
[code]...
This is my code so far, is square.graphics the way to go? How do I draw a tile that is a picture? Do I need to hold the graphics in some sort of array to do checking like collision?
View 1 Replies
Feb 28, 2010
I am trying to make a pacman game and was advised that collision detection for a game like this is much easier if you create it using a tile based methodology. I have the map created and the character moves fine around the grid. But once I added collision detection it seems to be a bit off and inconsistent. Im not entirely sure what the problem is with the collisions.
View 9 Replies
Dec 17, 2010
Is there any way to animate from a tile based .png image file? I have multiple images in 1 png file having slight changes in each image, which if cropped and put into layers one over the other, will give the feel of animation or a character moving or walking etc.I want to know can we do that kind of animation in flash as we do it in C++ or Java and how can we do it.
View 4 Replies
Feb 11, 2010
I am having problems with my collision detection. basically when I hit a solid tile my character's body is half way in the tile already. here is my code.The properties wY and wX are my game world positioning. Not the stage positioning. dx and dy is the velocity the character is traveling. This first snippet of code is within a game loop. The focus point of my character is centered on the x axis
package com.objects
{
import flash.display.MovieClip;
[code].....
View 4 Replies
Oct 1, 2007
I've been playing around with ActionScript 3. They have a new way of placing clips onto the stage, "addChild(clip)," which automatically places the clip onto the stage with it's own depth. So here's my problem, when making a tile based game, I have to constantly depth sort to make sure the object lower on the screen has the higher depth than an object higher on the screen. Pretty much, their depth depended on their y-coord. Does ActionScript 3 still let us play with depths?
View 2 Replies
Aug 23, 2010
I've recently picked up some flash work after a long respite into motion graphics via after effects, and I'm slowly mucking my way through things. I've currently got more than 250k pixels I need to seamlessly scroll through horizontally, via a scrollbar and buttons. I've bitten off more than I expected! I've been searching around, and it seems like tile based scrolling is what I'm going to need, due to max bitmap restrictions, is this correct?
If I'm on the right track here, I throw myself on the mercy of the community for any tile-based scrolling resources out there that you know of, something that explains the idea and setup from a non-game point of view maybe? Sorry if I seem like another noob looking for a quick fix, I've honestly been trying to find info on this all morning. Also, feel free to smack me into shape if I'm making this harder on myself than necessary.
View 12 Replies
Nov 3, 2011
I want to make some really simple board games that be played in your browser. AFAIK, there are really only two technologies capable of doing this: HTML5 Canvas, and Flash. I think Flash is on it's way out, so I think I should start learning how to work with the canvas.
My questions: Are there any other competing technologies/technologies I should consider? If canvas is the way to go, where can I get started? I already know HTML, JavaScript, and jQuery. I'm mostly interested in learning how to draw basic shapes and detect click events on these shapes.
I'm not overly concerned about supporting old browsers. Obviously I'd like to reach as large an audience as possible, but... I think it's about time people start upgrading their browsers if they want to keep up with the rest of the world, and this isn't going to be the sort of site you [should] visit at work, so corporate policies don't apply.
View 4 Replies
Oct 13, 2007
i want to transform some desktop based flash games fro mobile.is there any tool that transforms for mobile.so that i can do easily.
View 0 Replies
Oct 6, 2010
I have a grid based game with eight bots each moving under their own instruction set, I have set them to return their ID and location when clicked, the game as it stands now is over 2k lines so I wont post it all here. On occasion two of the bots are merging into the same MC, clicking on either one or between the two merged ones will return the same ID (bot 0 returns that it is bot 1 in bot 1s location for example). To make it more confusing they are continuing to run their own separate code, bot 0 is not moving the same way as bot 1 is. Doing a var dump does not show anything as wrong, they all show up with the right IDs and locations.
View 0 Replies
Mar 7, 2010
I'm familiar with C/C++/Scheme/Java/OpenGL/TCP/IP.I need to learn how to build a tile based / platform flash engine.What tools should I be using? What books should I buy?I strongly prefer tools that let me do things programatically rather than through a graphical UI.
View 2 Replies
Apr 19, 2011
I'm making a game where you place tiles on a grid. When placing a tile, I need to check the existance of another tile to the left, right, or above and below, otherwise the tile should not be placed.. Here is a function I thought would work, that accepts one variable (the position of the tile just as it is about to be placed) :-
private function checkSurroundingTiles(gridPosition:uint) { var t1 = gridPosition - 12; var t2 = gridPosition - 1; var t3 = gridPosition + 1; var t4 = gridPosition + 12; for(i = 0; i < gridRefArray.length; i++) { var checkTile = gridRefArray[i]; if(checkTile == t1) { return true;
[code]....
View 11 Replies
Nov 4, 2011
I just discovered impure.com and was very impressed by what can be achieved in terms of visualizing data using their workspace. Although the platform is free to use, but not open source yet. This causes a few problems because the API section works with .com sites for eg. for ebay, so I cannot visualize ebay listings for regional sites such as ebay.in because the link to ebay.com is hardcoded.I searched around, but didn't find other projects that offer a similar way to work with site APIs and other data sources with the kind of user interface and detail that impure.com does in a realtime way within a browser window.This brings me to the questions:
-What technologies would be involved in creating a similar kind of project
-What are the open source tools that can help develop a fullscreen UI to render the workspace. Are there any alternatives to flash for this, and how do they compare
The goal would be to use standard python data structures, python scripts to do some processing on these data structures, scripts to gather data from csv, json and API sources such as google yahoo, wikipedia and flickr, and scripts to render graphs, tag clouds, network visualizations etc. Then bring them all together into a visual interface that supports drag drop and simple type checking.How would the python backend integrate with the UI.
View 1 Replies
Jul 15, 2010
I need a flash based video player that is able to trigger events I can listen to via JavaScript. The events I need to listen to are:
The play button is pressed The pause button is pressed The video stops (is finished)
View 1 Replies
Feb 5, 2009
I'm making a strategy game the uses a tile map to show information about the other players! Every tile is 50*50px and when you start the map it loads about 50 tiles and puts them together (all this from a Flash->ASP->MySQL which i managed to do on my own)
What i need to do is to make the map draggable (kinda like maps.google.com) and make every tile clickable! I can't manage to do both of these things at the same time All the tiles are in a movieclip called mapMc so by creating a big button above the visible map area and write:
ActionScript Code:
on (press) {
allSize = _global.fullMapSize/2; //This gets the size of the map after all tiles have loaded[code].....
And that kinda works (except for the boundaries)Second, when you press a tile, which i stupidly constructed as another button, so every tile is a button (loaded dynamically) with as that fetches the tile information (already fixed ) But how do I combine them?
View 0 Replies
Jun 22, 2011
i no i will use the bitMap draw function and push each 1 into a array in order. but im unsure on how to separate 1 image into seprate 1s. can any1 just give me a quick knolage burst. as soon as im told how to ill be fine coding it just getting my head araound the math(not my strongest subject, bad i no).
View 3 Replies
Apr 16, 2011
Image of tile only shows once, how can I make it show more than once with my newTile MoiveClip object?
Game.fla
Actionscript Code:
import myPackage.GameBoard;var Map1:Array = [[1, 1, 1, 1, 1, 1, 1, 1],
[1, 0, 0, 0, 0, 0, 0, 1], [1, 0, 1, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1]];
var Game1:GameBoard = new GameBoard(30, 30);
Game1.setTile(1, waterTile); Game1.setTile(0, dirtTile);
Game1.buildMap(Map1); addChild(Game1);
[Code] .....
View 3 Replies
Jan 31, 2009
I am wokring on a movie and I want to tile a movieclip instead of a bitmap in AS3. I have figured out masking and the bitmap tiling in AS3, but am still encountering trouble finding a good solution for simply tiling an MC symbol across a set width and height in AS3.
View 7 Replies
Apr 8, 2011
I want to put an array of objects into a grid. I know the code is simple but somehow I'm not getting what I want.
Code:
const PADDING:Number = 10:
const COL:Number = Math.floor(Math.sqrt(tiles.length);
const ROW:Number = Math.floor(Math.sqrt(tiles.length);
for(var i:int = 0; i< COL; i++) {
var tile:TileSprite = tiles[i];
tile.x = i * tile.width + PADDING;
for(var j:int = 0; j < ROW; j++) {
tile.y = j * tile.height + PADDING;
}}
Notes:
- The array is declared else where as a public variable
- This is to be part of a game engine I'm building so I want it as flexible as possible
- The tiles as reading their properties for an XML file. But I don't want to use the XML to hard code the tiles' positions.
View 1 Replies
Apr 18, 2011
I dont want to make hboxes with labels and all for static headers in tile list... IS there a shortway to put column headers in a tile list in flex easily?
View 1 Replies
Dec 14, 2011
I am using Flex Builder 3.0 and i want to add image in tile list dynamically then how its possible.Images are stored in Images folder of src. and my array is similar like that.
private var arrImage:Array = [
{source:"Images/1.png",tooltip:"1"},
{source:"Images/2.png",tooltip:"2"},
[code].....
View 2 Replies
Jan 13, 2009
I am looking to take a single image and have it fill the screen....then I want the user to be able to pan and zoom in/out , and the image to be tiled into infinity. So eventually the screen will be filled with tons of little versions of this image. I can do the scrolling and stuff, but I don't know how to infinitely tile a background.
View 4 Replies
Dec 10, 2009
an image is smaller than the stage, is it possible to tile it?
View 3 Replies
Jun 10, 2011
I'm working on this little game and I want a movieclip to appear when hovered over, disappear when the mouse leaves the movieclip, and the visibility should equal false by default.
I have tried almost all the MOUSE_OVER, MOUSE_DOWN, MOUSE_OUT stuff and I already have it so when its hovered over, it appears and when its hovered out, it disappears.. I can't seem to make it invisible by default though.
Here's my code, if its needed.
Code:
import flash.events.MouseEvent;
exit2_mc.addEventListener(MouseEvent.ROLL_OVER, manageMouseOver);
exit2_mc.addEventListener(MouseEvent.ROLL_OUT, manageMouseOut);
[Code].....
View 9 Replies
Jan 20, 2010
I am trying to tile a small mc instead of a bmp image and I was wondering if anyone knows what aspects of Lee's tutorial need to be changed to accomedate that?
[Code]...
I tried a couple of things and was not able to get the mc loaded onto the stage.
View 1 Replies
May 8, 2010
I have a MovieClip I named mcGrid and I can't figure how to tile it as a background in my flash project. Is this even possible? If so can someone send me in the right direction.
View 2 Replies
Nov 2, 2010
Is there a way of actually controlling the spacing of the tiles I tried imagePadding, but it just pads the image within the tiles. But the tiles still stay next to each other. You can see this when you do a mouse over.
View 3 Replies
Feb 26, 2009
Not sure if you guys remember flash paper or not, but basically I am trying to clone it in AS3. The layout anyway, not the actual conversion. I have my PDF pages and SWF format and I have them loading into a tile list. I want to get the Y value of each item in the tile list so I can make a page browser.
View 2 Replies