Play the games, create the levels

Topic, Path 4 Mouse Help

Checkout our iPhone & iPad games!

You must register or log in to post a message.

jp 15 years ago
  You don't need a separator while you keep the code size for each block to only ONE char. This way when you unserialize teh code you know that each char stands for one block.
geckojsc 15 years ago
  No, my editor will simply consist of a load of blocks arranged in a grid, and when you click on them, they change to a different block. If you press space with the mouse over a block then it will change back to the normal block.

Are your sure I can just have it like this?
0010110300

And that I don't need something like:
[0,0,1,0,1,1,0,3,0,0]
jp 15 years ago
  I think it's a good level data very similar to the sokoban levels.
Becareful if you plan to allow a lot of item combinations to stack on the same location in the grid. Because for each combination you need a character (a number or a letter).
doomlord 15 years ago
  Well, you might need more than numbers considering that's 4 of 10 possible numbers right there, and you would need a good amount of objects considering, based on this there is no customization of them.
geckojsc 15 years ago
  So, for my level data, how about something like this:

SPOILER


Is it a good way to use (will it be easy to unserealize the data)? I want loading the data and making a level out of it to be as easy as possible.
geckojsc 15 years ago
  Aha! I've found the problem! For every object I have the picture movieclip and the actual object movieclip, with the actions inside it. I was testing it on the stage and accidentally dragged the picture of the invisible block and not the actual invisible block! Lol!
jp 15 years ago
  Can you try this ?

onClipEvent(enterFrame){
trace("mouse="+_root._xmouse+","+_root._ymouse+" this="+this);
if(this.hitTest(_root._xmouse,_root._ymouse,true)){
trace("hit");
Mouse.hide();
}
}
geckojsc 15 years ago
  Thanks, but I'll just upload it to Media Fire... Then upload it again if I make a newer version.

I'm writing the code on a movieclip inside another movieclip. Does that help?
jp 15 years ago
  Difficult to say. you shoudl add some traces to see if you enter the functions.

As you decided to make your source available, if ou have some spare time to learn SVN, I would recommend to use google code. google code provides you with a free and ready to use SVN server. It will be very easy to upload the latest version of your fla and for us to update with your latest version. Then we can have a look very easily at your code.

You can install Tortoise SVN (client SVN).
geckojsc 15 years ago
  Thank you.
Also, please may somebody tell me what is wrong with this code?
SPOILER

I'm trying to hide the mouse when you hit the invisible block.
jp 15 years ago
  To start with, you have to determine a level data format. This same format will be used in the editor and in the game.

Basically, the level data is a string that represents the level. How its is constructed, is your choice.

Examples :
Sokoban level format.

Another example of format. The separator is "_" and the values [..] are integers with their description inside. Carriage returns has been added to make the format clearer but they are not part of the format.
first we start with the header describing the length and height of the tile grid, and the number of tile types that will follow after the header.

[grid length]_[grid height]_[n = nb of tile types]
_[tile type 0]_[nb of tiles]_[tile 0 grid index]_[tile 1 grid index] ....
_[tile type 1]_[nb of tiles]_[tile 0 grid index]_[tile 1 grid index] ....
....
_[tile type n]_[nb of tiles]_[tile 0 grid index]_[tile 1 grid index] ....


This will form a string that is created in the editor (you can start with the basic text editor like theNinja did with his game).
The game needs to make the reerse, ie interpret this string to create a grid and play it.
geckojsc 15 years ago
  Please may I have some help with my game, Path 4 Mouse?

Okay, I would like to know how to create the level data, and load it, and make all the objects work, and a lot of other stuff too. I think I might have started too early, but I was dying to make a game for BL, and I can't really give up now!

So basically I would like to know how to make a tile based map, that opens up on the screen when you play the game, or something like that.

I might be able to manage it myself if the game was not for BL, but using the API and making arrays are two completely new things to me!

[<<] [1] [2] [3]

Flash game development

First post of the topic

geckojsc 15 years ago
  Please may I have some help with my game, Path 4 Mouse?

Okay, I would like to know how to create the level data, and load it, and make all the objects work, and a lot of other stuff too. I think I might have started too early, but I was dying to make a game for BL, and I can't really give up now!

So basically I would like to know how to make a tile based map, that opens up on the screen when you play the game, or something like that.

I might be able to manage it myself if the game was not for BL, but using the API and making arrays are two completely new things to me!
Our free flash games   Games for your site   Games for your iPhone   Contact   Twitter @jpsarda & @bonuslevelorg