Welcome Guest ( Log In | Register )




                Web Hosting Guide

 
Reply to this topicNew Topic
Flash 8/actionscript 2, Platform Game (little Help).
Chesso
post Mar 28 2007, 01:31 PM
Post #1


Teh Coder
Group Icon

Group: Members
Posts: 1,053
Joined: 18-April 06
From: Australia
Member No.: 12,833
myCENTs:89.25


Hello, I have been following along with the tutorial here:

http://www.kirupa.com/developer/mx2004/platform_game.htm

I am basically at the point of having the ball/character fall onto the blocks within the ground/platform movie clip, movie left and right, jump up and down etc.

So far this is all very good, except for one very annoying thing lol, which has pretty much halted me from continuing any further (heck I even tried searching google for the lats couple of hours but can't find any relevant hits to my specific case).

If anyone has followed this, understands it's method of play and collision detection or has followed this before will more than likely know my problem, which is:

When the ball/character jumps/falls onto a block, the collision detection is quite random, sometimes it falls a bit too far above, sometimes exact, sometimes inside (I move the balls movie clip point upward so the crosshair was below the image for somewhat better detection).

Does anyone have a solution for this?

I know I could create singular platformed objects and test them individually using the old basic co-ordinate checks, but being able to have multiple platforms of the same type all sitting in the same movie clip and all subject to the exact same collision call is extremely usefull and removes alot of bloated code.

Any help is greatly appreciated! smile.gif.
Go to the top of the page
 
+Quote Post
Ed :P
post Apr 14 2007, 06:37 PM
Post #2


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 63
Joined: 28-August 06
Member No.: 15,585


QUOTE(Chesso @ Mar 28 2007, 01:31 PM) [snapback]100609[/snapback]
Hello, I have been following along with the tutorial here:

http://www.kirupa.com/developer/mx2004/platform_game.htm

I am basically at the point of having the ball/character fall onto the blocks within the ground/platform movie clip, movie left and right, jump up and down etc.

So far this is all very good, except for one very annoying thing lol, which has pretty much halted me from continuing any further (heck I even tried searching google for the lats couple of hours but can't find any relevant hits to my specific case).

If anyone has followed this, understands it's method of play and collision detection or has followed this before will more than likely know my problem, which is:

When the ball/character jumps/falls onto a block, the collision detection is quite random, sometimes it falls a bit too far above, sometimes exact, sometimes inside (I move the balls movie clip point upward so the crosshair was below the image for somewhat better detection).

Does anyone have a solution for this?

I know I could create singular platformed objects and test them individually using the old basic co-ordinate checks, but being able to have multiple platforms of the same type all sitting in the same movie clip and all subject to the exact same collision call is extremely usefull and removes alot of bloated code.

Any help is greatly appreciated! smile.gif.

You should slow down the gravity speed and speed up the fps. To change the frame speed just right click and change the properties.
Go to the top of the page
 
+Quote Post
Chesso
post Apr 15 2007, 01:41 AM
Post #3


Teh Coder
Group Icon

Group: Members
Posts: 1,053
Joined: 18-April 06
From: Australia
Member No.: 12,833
myCENTs:89.25


Yeah of course, I always have it at 30 FPS.

I'm familiar with Object Pascal/DirectX programming so I'm not new to concept such as frames per second, depth, collision detection, enemy AI etc.

Mostly just grasping how flash and actionscript goes about things.
Go to the top of the page
 
+Quote Post
iGuest
post Nov 11 2007, 07:20 AM
Post #4


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869


was following that tutorial for a while, but then the code he gave me had unexpected errors.
I pasted the exact code over and over again, but it always had a syntax error.
do I need to get a new flash program?
Go to the top of the page
 
+Quote Post
iGuest
post Jan 9 2008, 01:20 AM
Post #5


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869


I have seen that tutorial before, but I have not analyzed how the code is structured... But the way that I make sure that things stop on the places that I want it to is to basically check if the object will pass the point which I wish for it to stop at, if it does I make it go directly to the place which I want it to...

So what I do is create an if with the calculation, yes, I know it's a bit redundant but it works better than adjusting fps values and such... Here is an example:

If(ourCharacter._x-walkSpeed < 0){
ourCharacter._x=0;
}

It could probably be used in conjunction with hittests... Just a question of trying it out.
Go to the top of the page
 
+Quote Post
iGuest
post Mar 8 2008, 11:00 PM
Post #6


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869


Answer
Flash 8/actionscript 2, Platform Game (little Help).

Well my conclusion is that it is a glitch. If you notice on the game hes made even that has collision detection problems. Youve made no mistake its just not a very good way to make the game. Soz who made it but it isnt.

-reply by rosssss
Go to the top of the page
 
+Quote Post
opium
post Apr 28 2008, 06:37 PM
Post #7


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 7
Joined: 25-April 08
Member No.: 30,011


platform games are low graphics as you can clearly tell umm at this point i dont know what to tell you.
Go to the top of the page
 
+Quote Post
iGuest
post Jun 13 2008, 06:48 AM
Post #8


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869


Change path of Shared Object
Flash 8/actionscript 2, Platform Game (little Help).

Can anybody tell me how to change the path of shared object default path to any D or E drive..

E.G : Default path like
C:\Documents and Settings\TempName\Application Data\Macromedia\Flash Player\#SharedObjects\D8F43EBD\localhost\Temp\Flash1.Swf

to

D:\Sample

Plse reply

Thank you


-question by Harish
Go to the top of the page
 
+Quote Post

Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   2 Ploforia 1,857 Today, 01:33 AM
Last post by: HannahI
No New Posts   4 FirefoxRocks 189 Today, 01:26 AM
Last post by: HannahI
No New Posts   0 HannahI 4 Today, 01:18 AM
Last post by: HannahI
No New Posts   16 mikesoft 3,619 6th November 2009 - 10:21 PM
Last post by: iG-Oscar
No New Posts   0 michellezum 13 5th November 2009 - 09:57 PM
Last post by: michellezum
No New Posts   8 unclebob 2,132 5th November 2009 - 08:38 PM
Last post by: HannahI
No New Posts   1 xboxrulz 310 5th November 2009 - 08:29 PM
Last post by: HannahI
No new   24 HannahI 170 5th November 2009 - 08:09 PM
Last post by: HannahI
No New Posts   2 Jimmy89 2,199 4th November 2009 - 10:25 PM
Last post by: HannahI
No New Posts   9 Sizux 7,576 3rd November 2009 - 11:28 PM
Last post by: iG-MomaNana2008
No New Posts   15 gamerchick39 7,915 27th October 2009 - 11:27 PM
Last post by: HannahI
No New Posts 10 wanhafizi 2,808 24th October 2009 - 08:07 PM
Last post by: iGuest
No New Posts 3 astdesy 425 8th October 2009 - 08:23 PM
Last post by: HannahI
No New Posts   11 Daming 10,082 6th October 2009 - 12:00 PM
Last post by: iG-
No New Posts   8 kc8ual 2,556 5th October 2009 - 08:56 PM
Last post by: HannahI


Web Hosting Powered by ComputingHost.com.