PDA

View Full Version : Unwanted/Stealth Game


InsertName
10-12-2011, 04:12 PM
I'm working on this new stealth game but when I start the game. It starts dropping frames like a beast.
I don't see why it doing that, it's only just over 7mb and only has over 300 cubes and some other stuff. It wasn't doing that before ?:(:confused:

It will probbaly not make much sense to any of you, so this is just for the Best(ish) Alice users.

arrow keys move
S crouchs
W attacks (only when behind guard and close enough)
1 2 3 4 changes veiw

x2495iiii
10-12-2011, 05:22 PM
Whoosh.

Well to start, you should be condensing the cubes in a row into one long prism by resizing one cube along one dimension.

Also, I notice all of your wall collision loops test every wall at the same time. You can save memory by only making the group of walls closest to the character active (Dameria made a very nice example using quadrants where only 1/4th of all the walls in the room were solid at a time).

InsertName
10-12-2011, 07:16 PM
Won't it not be able to bounc back if you go to far end?

x2495iiii
10-12-2011, 09:19 PM
Not if you make the collision code recognize the character's distance in front of the prism, rather than its distance to the prism.

InsertName
10-13-2011, 02:47 PM
I'll check it out.

InsertName
10-13-2011, 03:34 PM
It was weird, some times it would work, and some times it moved me so far away it took 15 second to get back to the cube. It's the same collision

if distance in front of is < than 0.8
move 0.85 meters away in 0.04 seconds.

InsertName
10-17-2011, 05:15 PM
bumpity bump bump

same question

InsertName
10-18-2011, 02:51 PM
this game is not working for me. so it may be uncomplete for awhile.

jediaction
10-18-2011, 03:59 PM
Aww.

x2495iiii
10-18-2011, 04:13 PM
It might not work if the cubes aren't all facing towards the inside of the enclosure. Turn and resize them accordingly, then see if it works.

Also, sorry for not responding.

room14
10-18-2011, 04:31 PM
It was weird, some times it would work, and some times it moved me so far away it took 15 second to get back to the cube. It's the same collision

if distance in front of is < than 0.8
move 0.85 meters away in 0.04 seconds.

you have to make the {Item from walls} to all the wall variables. other wise it uses a pasific wall to do collision.

{Edit} Are you doing the memory saving thing?
if so, don't you have to change the walls as you move?

room14
10-18-2011, 04:47 PM
oh, also you shouldn't use move away from method. because sometimes it lift the character off the ground.

DensetsuNoKaboom
10-18-2011, 07:33 PM
oh, also you shouldn't use move away from method. because sometimes it lift the character off the ground.

If the axis of the moving-away object and that of the moved-away-from object are at the same height, then it'll be fine, otherwise the objects may sink into or lift off the ground.

room14
10-18-2011, 09:11 PM
If the axis of the moving-away object and that of the moved-away-from object are at the same height, then it'll be fine, otherwise the objects may sink into or lift off the ground.

yeah, but you see, even if it is slightly above it will lift off.