Hello, I`m new here, I like your editor idea I have some questions.
*Is there any basic data structure, like an array??, It could be very useful for tiles and those things.
*Is there any scrolling??
*Can I play a .mid file??
*I`m making an asteroids clone, but I have some trouble with my "ship": I don`t know how to make it advance facing certain angle.
Tanks a lot!!
Hi!!
Moderator: Moderators
Hi and welcome juansrx!
However, I will soon add a feature that will make it possible to move the camera and then it will be easier to make scrolling games.
In the Update list of the model use a ZExpression that sets the current speed and angle depending on the variable:
The "* 2" is the speed of your ship. You could use a variable for that also, like ShipSpeed and increase it when cursor up is pressed. All the "*(2*3.14)" stuff is because the rotation.z unit is cycles and the parameters to cos and sin should be in radians.
If you have trouble getting it to work, you can send your project to me (post here or PM) and I can take a look at it.
There is currently no built in array type in the scripting language. But if you look at the FileDemo example it demonstrates how to read an array-like structure from a text file and build a tile-map from that.Is there any basic data structure, like an array
The camera is fixed in the current version of ZGE. The sample project TripleE appears to scroll, but instead it is all the sprites that are moving not the cameraIs there any scrolling??

No, but I hope to add that in a future version. Or some other kind of music support.Can I play a .mid file??
Define a variable called ShipAngle. Use KeyPress components to increase and decrease that variable when pressing left and right on keyboard.I`m making an asteroids clone, but I have some trouble with my "ship": I don`t know how to make it advance facing certain angle.
In the Update list of the model use a ZExpression that sets the current speed and angle depending on the variable:
Code: Select all
//Rotate the model to face the direction it is moving
CurrentModel.Rotation.Z=ShipAngle;
//Update model velocity
CurrentModel.Velocity.X=cos((0.25+ShipAngle)*(2*3.14)) * 2;
CurrentModel.Velocity.Y=sin((0.25+ShipAngle)*(2*3.14)) * 2;
If you have trouble getting it to work, you can send your project to me (post here or PM) and I can take a look at it.
uhm ... i'll try making something like small sample game and ill upload source here so you can see how is it workingVilleK wrote:Code:
//Rotate the model to face the direction it is moving
CurrentModel.Rotation.Z=ShipAngle;
//Update model velocity
CurrentModel.Velocity.X=cos((0.25+ShipAngle)*(2*3.14)) * 2;
CurrentModel.Velocity.Y=sin((0.25+ShipAngle)*(2*3.14)) * 2;

i just want to test my ZGE skills (i hope i didn't forget ZGE though lol)
cheers
Boris