Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Montana

Hi All

Guess im going to start being a bit of an annoyance as i learn how to use the engine/learn jscript more ...(if its any consolation ive designed/produced games for almost two decades so there's lots i can i give back to the community!)

My question: How would i set movement patterns for platfroms .. so i can create elevators or spinning platforms?

thx

1 decade ago by fugufish

for simple linear movements you can check out Biolab Disaster's source ( i think it's there )

basically it works by having 3 entities: a start pt, end pt and the platform

with an update() call , absolute distance measuring, and some neat timers, you can set the velocity of the platform.

or you could use some handleMovementTrace() too

1 decade ago by fugufish

feel free to contact me if it's too vague :D

1 decade ago by Montana

Well i got the basic platform moving via the void,js and mover.js, but its not very smooth which is why i guess your suggesting the handle movement trace?

Despite this code:
init: function( x, y, settings ) {
this.addAnim( 'idle', 1, [0] );
this.parent( x, y, settings );

The player actually ends up in the 'fall' state ... a ideas why the above code doesnt set the player state to 'idle'?

And whats the benefit of looking at handleMovementTrace over the void.mover mechanism, will it resolve the pixel judder when the player is on the platform?

1 decade ago by ebeer

Hi all,

I've recently added the BasePlatform plugin just to suit this purpose. It's quite easy to make it work by just extending it with your own entity. Check it out here:

http://www.pointofimpactjs.com/plugins/view/36/base-platform-entity

I'm working now on a much more versatile version with possible targets and multiroutes so you can toggle between them.

1 decade ago by BlondGorilla

Hi Guys

Im building a game similar to frogger, looking for some advice on the best approach to deal with the water scenario. I think its a moving platform issue which is why Ive posted here, appologies if not.

The way Ive been dealing with water in general (ie the player dies if they jump into the water)... is to use one of the blank tiles on the collision layer (46) and in update check if they are on it then kill them...

If you remember the game screenshot here: http://mytheongame.com/wp-content/uploads/2013/03/pFroggerPad.png

there are turtles and aligators floating in the water moving from side to side on the screen alligators kill the player (easy enough) and turtles carry the player to the edge of the screen.

Would a way to deal with this be to have an invisible entity that spawns turtle entities on the side of the screen, if the player moves onto a tile with a turtle, ignore the kill action then somehow link the player to the movement of the turtle entity.... (how would you do that)? any ideas would be awesome guys..

Cheers

8 years ago by jddb

This is my update function for moving platforms. Max and min positions are set in Weltmeister.

    if (this.moveTimer.delta() >= this.moveSpeed / 100) {
				if (this.moveType === 'vertical') {
					if (this.pos.y < this.maxY && this.moving === "down") {
						this.vel.y = this.moveSpeed
					} else if (this.pos.y > this.maxY && this.moving === "down") {
						this.moving = "up";
					} else if (this.pos.y > this.minY && this.moving === "up") {
						this.vel.y = -this.moveSpeed;
					} else if (this.pos.y < this.minY && this.moving === "up") {
						this.moving = "down";
					}
				} else if (this.moveType === 'horizontal') {
					if (this.pos.x < this.maxX && this.moving === 'down') {
						this.vel.x = this.moveSpeed;
					} else if (this.pos.x > this.maxX && this.moving === 'down') {
						this.moving = 'up';
					} else if (this.pos.x > this.minX && this.moving === 'up') {
						this.vel.x = -this.moveSpeed;
					} else if (this.pos.x < this.minX && this.moving === 'up') {
						this.moving = 'down';
					}
				}
			    this.moveTimer.reset();	
			}

7 years ago by EwcUser122

Question:
1- Do you know if you can create MMO games with Impact ?

2- Do you know if the game that you create with Impact are Multi-Platform (If the video game that you can create wwith "Impact" can be played on a desktop, laptop, cell phone, tablet and television)?

7 years ago by Joncom

@EwcUser122, yes to both your questions. However, your questions had nothing to do with this thread. Please create new a thread if you want to discuss a new topic (or post to a related existing thread).
Page 1 of 1
« first « previous next › last »