Announcement

User registrations are currently disabled due to high spam traffic.

#26 20/01/08 9:00pm

Zuriki
Flash Dev (The Lazy One)
From: Manchester
Registered: 18/01/08
Posts: 755
Website

Re: GAME IDEAS

Well minor but I'd like to try them out first.
I also have a game idea based on that game. But its secret!


[img]http://img134.imageshack.us/img134/9129/headerxt2.png[/img]
[url=http://zuriki.co.nr/project/traveller/][img]http://i28.tinypic.com/2vspafo.png[/img][/url]
[url=http://zuriki.co.nr]Zuriki - PSP Flash Games[/url]

Offline

 

#27 20/01/08 9:04pm

der-zef-meister
Addict
From: barrow-in-furness
Registered: 21/01/07
Posts: 267

Re: GAME IDEAS

okay, fair enough. Good luck with your game


The shadow of the wicker man is rising up again...

Offline

 

#28 20/01/08 11:03pm

tallphil
Banned
From: UK
Registered: 29/04/06
Posts: 823
Website

Re: GAME IDEAS

I did turn down my volume, but then I couldn't listen to my music tongue And there's some fairly easy as to turn off music, or at least turn the volume in flash down to nothing. Can't remember it off the top of my head though sorry - let me know if you have problems...


PSP Flash Gaming creator

Offline

 

#29 21/01/08 8:09am

Zuriki
Flash Dev (The Lazy One)
From: Manchester
Registered: 18/01/08
Posts: 755
Website

Re: GAME IDEAS

Have a movieclip check a value of a var and go to a frame with music if yes or go to a frame thats empty if not. Its crappy but works.

On a side note, does anyone know the key code for circle or square. Not a major prob if not.

As for my escape game. I've planned out everything. Theres 4 difficulties and some cheat codes and ZOMBIES!

Yup also gonna be a side scroller and shooter. Also Insane mode is very hard. One hit kill on j00!
This will be fun!

Last edited by Zuriki (21/01/08 8:18am)


[img]http://img134.imageshack.us/img134/9129/headerxt2.png[/img]
[url=http://zuriki.co.nr/project/traveller/][img]http://i28.tinypic.com/2vspafo.png[/img][/url]
[url=http://zuriki.co.nr]Zuriki - PSP Flash Games[/url]

Offline

 

#30 21/01/08 10:46am

tallphil
Banned
From: UK
Registered: 29/04/06
Posts: 823
Website

Re: GAME IDEAS

If you're running the sound with a handler through actionscript (best way), ie you have this somewhere:

Code:

handlername = new Sound();

Then it's just something along the lines of

Code:

on(release){
    handlername.setVolume(0);
}

As for the code to draw a circle or a square, guess you could use the drawing board API in flash, and use basic maths with lineto() to dynamically draw a circle or square. Depends what you want it for really - otherwise have a mc of a square or circle in the library which is linked for dynamic as usage and dynamically stick it onto the stage?


PSP Flash Gaming creator

Offline

 

#31 21/01/08 4:11pm

Zuriki
Flash Dev (The Lazy One)
From: Manchester
Registered: 18/01/08
Posts: 755
Website

Re: GAME IDEAS

Lol I have so much to learn. I only know little snip-its.


[img]http://img134.imageshack.us/img134/9129/headerxt2.png[/img]
[url=http://zuriki.co.nr/project/traveller/][img]http://i28.tinypic.com/2vspafo.png[/img][/url]
[url=http://zuriki.co.nr]Zuriki - PSP Flash Games[/url]

Offline

 

#32 21/01/08 8:32pm

tallphil
Banned
From: UK
Registered: 29/04/06
Posts: 823
Website

Re: GAME IDEAS

Sorry, my bad - ignore the first suggestion about the API.

What you want is to be able to use movieclips in the library, using actionscript.
You do this by creating a mc like normal (ie a circle or square) then right clicking on it in the library panel. Hit Linkage... then check Export for ActionScript. Use an easy identifier (like "square" - i tend to use the same as the name in the library to keep things simple) and hit OK. The mc can now be accessed by actionscript even if it isn't present on the stage. With me so far...? smile

That's the hard bit done, now you just want to dynamically put the mc onto the stage using actionscript. There's a few ways to do this, but the easiest is to drop the mc into a container movieclip or onto the stage using the attachMovie function, eg:

drop.attachMovie(Linkage name, newname, depth);

The newname has to be a unique identifier - if you're going to be doing this with lots of things, stick a variable in that name using eval() to keep it dynamic. Same with depth. Don't worry about them too much though smile
drop can just be _root if you like, after you've created this new mc you can move it etc by accessing it through 'newname', eg:

_root.newname._x = 120;


That all make sense? Let me know if you have any questions...

As for sound - kirupa tutorial HERE


PSP Flash Gaming creator

Offline

 

#33 21/01/08 9:18pm

der-zef-meister
Addict
From: barrow-in-furness
Registered: 21/01/07
Posts: 267

Re: GAME IDEAS

Okay, I got something worked out after playing with it for a bit.

http://img228.imageshack.us/img228/744/ … rovxf4.swf

*Edit

By the way, how do you listen to music when you're in the internet browser?

*Edit (again)

Nope! In one ear and out of the other! But I got something sorted. Still works good on the PSP!

Last edited by der-zef-meister (21/01/08 9:25pm)


The shadow of the wicker man is rising up again...

Offline

 

#34 21/01/08 11:04pm

Zuriki
Flash Dev (The Lazy One)
From: Manchester
Registered: 18/01/08
Posts: 755
Website

Re: GAME IDEAS

I totally forgot about the Export for AS! Man this would be so useful for my game!

Oh yes I need help too.

I want an mc which in this case is defined as "this", to follow a mc called "a". "this" moves at a set speed of 3pixels. The only AS I can find uses "a"s x,y - "this" x,y /20 which means the distance varys the speed (closer slower)


[img]http://img134.imageshack.us/img134/9129/headerxt2.png[/img]
[url=http://zuriki.co.nr/project/traveller/][img]http://i28.tinypic.com/2vspafo.png[/img][/url]
[url=http://zuriki.co.nr]Zuriki - PSP Flash Games[/url]

Offline

 

#35 22/01/08 11:59am

tallphil
Banned
From: UK
Registered: 29/04/06
Posts: 823
Website

Re: GAME IDEAS

der-zef-meister wrote:

By the way, how do you listen to music when you're in the internet browser?

On my PC, so iTunes smile
Seeing the ball helps a lot i think - certainly getting there!

Zuriki wrote:

Oh yes I need help too.

Not entirely clear on your question - you have a movieclip that you want to follow a movieclip. How is the leading mc (a) moving? But you don't want it to decelerate as it gets closer?

Anyway, i'll take a guess at what you mean (i'm seeing ghosts chasing pacman in my head). The problem has two aspects - knowing where to move to, and moving. The moving bit is easy, just add 3 each frame to it's position, the direction is the harder bit.

A basic model could just add 3 on x and y until they're the same as the target mc, so:
onClipEvent(enterFrame) {
    if(this._x > a._x){
         this._x -= 3;
    }
    if(this._x < a._x){
         this._x += 3;
    }
    if(this._y > a._y){
         this._y -= 3;
    }
    if(this._y < a._y){
         this._y += 3;
    }
}

This is a bit crude though, as it won't move in a straight line towards the target unless the target is exactly 45degrees to the mc. So, to make a better version you need to set the direction, then work out _x and _y motion with a total speed of 3. I would do this by working out the x and y distances, getting a ratio then getting the mc to move according to the ratio. If you need help getting this to work, let me know and i'll sit down with a cup of tea and figure it out...

Hope that helps!


PSP Flash Gaming creator

Offline

 

#36 22/01/08 2:17pm

Scruffy15
Anti-Christ
From: Facing The Plastic
Registered: 07/01/08
Posts: 871

Re: GAME IDEAS

its not workin! it says save failed (FFFFF)


I'm Infinite.

Offline

 

#37 22/01/08 3:42pm

Zuriki
Flash Dev (The Lazy One)
From: Manchester
Registered: 18/01/08
Posts: 755
Website

Re: GAME IDEAS

@tallphil: This would work for a simple beta but not what I want for the full version. I could have wrote it this way if I wasn't really to fussed but I want the best possible experience!

onClipEvent (enterFrame) {
    myRadians = Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x);
    // Calculates the mouse angle in radians
    myDegrees = Math.round((myRadians*180/Math.PI));
    // Converts the mouse angle to degrees so it can be expressed in _rotation terms
    _root.yChange = Math.round(_root._ymouse-this._y);
    // Calculates the distance between the movie clip and the mouse
    _root.xChange = Math.round(_root._xmouse-this._x);
    // Calculates the distance between the movie clip and the mouse
    _root.yMove = Math.round(_root.yChange/20);
    // Determines the amount the movie clip should move toward the mouse, grows larger the further the mouse gets from the MC
    _root.xMove = Math.round(_root.xChange/20);
    // See above
    this._y += _root.yMove;
    //Adds yMove onto the position of the clip (Note: Must be '+=' and not '-=' or else the MC will move away from the mouse, not towards it
    this._x += _root.xMove;
    // See above
    this._rotation = myDegrees+90;
    // Turns the MC to face the mouse
}

That (as explained by the //comments) is the code I have. Now if you change _xmouse to a._x then you have the code I used for it to find and face "a" but when I moves towards a the speed decreases and vice versa.

Now obviously it calculates the difference between the 2 movie clips in a straight line. but when it comes to movement it has the undesiered effects...

Please Mr.Guru Dude have some tea and cookies and help me figure this out.


[img]http://img134.imageshack.us/img134/9129/headerxt2.png[/img]
[url=http://zuriki.co.nr/project/traveller/][img]http://i28.tinypic.com/2vspafo.png[/img][/url]
[url=http://zuriki.co.nr]Zuriki - PSP Flash Games[/url]

Offline

 

#38 22/01/08 4:25pm

der-zef-meister
Addict
From: barrow-in-furness
Registered: 21/01/07
Posts: 267

Re: GAME IDEAS

thanks tallphil!
Is there anything else? I think I may actually finish this one!
The main thing I'd like to clean up is the hitTesting, but I'm not sure how.

All I have is four hiTests:

One that says if the ball hits the wall and the right key is down then move the ball left.
One that says if the ball hits the wall and the up key is down then move the ball down.

You get the idea. Is there a better way of doing this without sacrificing game speed?


The shadow of the wicker man is rising up again...

Offline

 

#39 22/01/08 4:50pm

Zuriki
Flash Dev (The Lazy One)
From: Manchester
Registered: 18/01/08
Posts: 755
Website

Re: GAME IDEAS

Gimme your current hitTest code because it is pretty screwed. In fact if you give me the fla I will clean it up. I'll throw in some free graphics!


[img]http://img134.imageshack.us/img134/9129/headerxt2.png[/img]
[url=http://zuriki.co.nr/project/traveller/][img]http://i28.tinypic.com/2vspafo.png[/img][/url]
[url=http://zuriki.co.nr]Zuriki - PSP Flash Games[/url]

Offline

 

#40 22/01/08 6:02pm

tallphil
Banned
From: UK
Registered: 29/04/06
Posts: 823
Website

Re: GAME IDEAS

der-zef-meister Can you make the hitTest just stop the ball from moving in that direction instead of moving it backwards? Then it won't 'jump' when it hits a wall?


Zuriki, have sat down with tea and post-it note and think i have some code that *should* work though i haven't tested it in flash yet.
It needs some basic maths (oof, few years since i've done any of this) - your code figures out the angle of the target so you can use trig to get the x and y components of the motion needed. Remember SOHCAHTOA? Well, with some v. basic rearrangement etc, I got this:

Code:

onClipEvent(load){
    speed = 3; //set speed (hypotenuse)
}
onClipEvent(enterFrame){
    //figure out angle needed
    xDiff = a._x - this._x
    yDiff = a._y - this._y;
    angle = Math.atan2(yDiff, xDiff);
    //figure out x and y components of speed
    ymove = Math.sin(angle)*speed;
    xmove = Math.cos(angle)*speed;
    //move
    this._y += ymove;
    this._x += xmove;
}

So basically you have a triangle of speeds, your hypotenuse is the total speed, and the two sides are the x and y components of the speed. You know the angle and the hypotenuse, so you can figure the two sides out using sin and cos.

Let me know if that makes sense / works!


PSP Flash Gaming creator

Offline

 

#41 22/01/08 7:10pm

Zuriki
Flash Dev (The Lazy One)
From: Manchester
Registered: 18/01/08
Posts: 755
Website

Re: GAME IDEAS

Your code works and vaguely makes sense. Mainly because I haven't learn Maths in flash (stupid trigonometry) and I haven't ever use sin/cos.


[img]http://img134.imageshack.us/img134/9129/headerxt2.png[/img]
[url=http://zuriki.co.nr/project/traveller/][img]http://i28.tinypic.com/2vspafo.png[/img][/url]
[url=http://zuriki.co.nr]Zuriki - PSP Flash Games[/url]

Offline

 

#42 22/01/08 9:43pm

der-zef-meister
Addict
From: barrow-in-furness
Registered: 21/01/07
Posts: 267

Re: GAME IDEAS

Right, flash only detects a hitTest when the ball is in the middle of the wall. I don't know why, it just does. I don't think there is going to be much improvement on this because the current method isn't solid, I wouldn't know where to begin using arrays to make the maze and I'm not writing out a hitTest for every wall on there.

Zuriki -I don't want to give you my .fla but here's my hitTest:

Code:

 onClipEvent (load) {
    xcorrect = (_root.man._width/2);
    ycorrect = (_root.man._height/2);
    speed = 20;
}
onClipEvent (enterFrame) {
    if (this.hitTest(_root.man._x, _root.man._y-ycorrect, true) == true && (Key.isDown(Key.RIGHT))) {
        _root.man._x -= speed;
    }
    if (this.hitTest(_root.man._x, _root.man._y-ycorrect, true) == true && (Key.isDown(Key.LEFT))) {
        _root.man._x += speed;
    }
    if (this.hitTest(_root.man._x, _root.man._y-ycorrect, true) == true && (Key.isDown(Key.UP))) {
        _root.man._y += speed;
    }
    if (this.hitTest(_root.man._x, _root.man._y-ycorrect, true) == true && (Key.isDown(Key.DOWN))) {
        _root.man._y -= speed;
    }
}

It's placed in the wall mc.


The shadow of the wicker man is rising up again...

Offline

 

#43 22/01/08 9:43pm

tallphil
Banned
From: UK
Registered: 29/04/06
Posts: 823
Website

Re: GAME IDEAS

Yeah, coding stuff like this can get a bit mathsey sometimes. Guess that maths A level can come in handy after all! yikes


PSP Flash Gaming creator

Offline

 

#44 22/01/08 10:50pm

Zuriki
Flash Dev (The Lazy One)
From: Manchester
Registered: 18/01/08
Posts: 755
Website

Re: GAME IDEAS

The reason it hitTests the center is because of its orgin. The code is best suited to circular.

An array map could be coded as:
Map1=["1","0","1"]
if(Map1[1]=="1"){
_root.wall.duplicateMovieClip("wall1");
blah blah blah...

This is too messy though. I seen a code some where... I'll go find it.


[img]http://img134.imageshack.us/img134/9129/headerxt2.png[/img]
[url=http://zuriki.co.nr/project/traveller/][img]http://i28.tinypic.com/2vspafo.png[/img][/url]
[url=http://zuriki.co.nr]Zuriki - PSP Flash Games[/url]

Offline

 

#45 22/01/08 11:06pm

Zuriki
Flash Dev (The Lazy One)
From: Manchester
Registered: 18/01/08
Posts: 755
Website

Re: GAME IDEAS

Using psp no edit:

http://kirupa.com/developer/actionscrip … amming.htm

Page 6 has map array though bear in mind Exporting for ActionScript doesnt work on PSP so place it on the stage with Instance name instead of linkage. Also no guaruntee this will run on PSP so make a backup.


[img]http://img134.imageshack.us/img134/9129/headerxt2.png[/img]
[url=http://zuriki.co.nr/project/traveller/][img]http://i28.tinypic.com/2vspafo.png[/img][/url]
[url=http://zuriki.co.nr]Zuriki - PSP Flash Games[/url]

Offline

 

#46 24/01/08 3:24pm

Scruffy15
Anti-Christ
From: Facing The Plastic
Registered: 07/01/08
Posts: 871

Re: GAME IDEAS

how about a game where you race and shoot people like that game called spyhunter(i think its called that) your a car that can shoot other cars!


I'm Infinite.

Offline

 

#47 24/01/08 3:35pm

Zuriki
Flash Dev (The Lazy One)
From: Manchester
Registered: 18/01/08
Posts: 755
Website

Re: GAME IDEAS

My game ESCAPE is coming along nicely. Zombie AI is done. I had fun making it. Next hitTests. Then zombie spawner. Finishing with level designs & graphic tweaks.


[img]http://img134.imageshack.us/img134/9129/headerxt2.png[/img]
[url=http://zuriki.co.nr/project/traveller/][img]http://i28.tinypic.com/2vspafo.png[/img][/url]
[url=http://zuriki.co.nr]Zuriki - PSP Flash Games[/url]

Offline

 

#48 03/02/08 10:17pm

Alpha009
Edge
From: new york
Registered: 03/02/08
Posts: 1117

Re: GAME IDEAS

can some one make a platforming game or somehow make a fighting game?

Offline

 

#49 03/02/08 10:27pm

Alpha009
Edge
From: new york
Registered: 03/02/08
Posts: 1117

Re: GAME IDEAS

can some one make a platforming game or somehow make a fighting game?

Offline

 

#50 03/02/08 11:12pm

Alpha009
Edge
From: new york
Registered: 03/02/08
Posts: 1117

Re: GAME IDEAS

i dont know how i put two of the same same post

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson