Grid based lighting/field of view

Discussion and feedback on Construct 2

Post » Sun Sep 25, 2011 7:41 am

[QUOTE=harrio] rad 7 = 34-38 fps
it won't let me change the radius on my laptop
and the 'pretty' test runs at 40-44 fps.[/QUOTE]

It's num plus and minus so make sure you have numlock on if ya can!
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Sun Sep 25, 2011 8:19 am

C2 r58; Windows XP SP3; FireFox 6.0.2; ATI Radeon HD 4870;
Dual-core E5200 @ 2.5 GhZ; 3,5 Go RAM

Pretty example : 7 FPS

Rad1-3 = 64 FPS
Rad4 = 60 (sometime, herratic, not often) - 64 FPS
Rad5 = 55 to 64 (more often)
Rad6 = ~55 FPS
Rad7 = ~41 FPS
Rad8 = 31 to 35 FPS
Rad9 = 26 to 29 FPS
Rad10 = 21 to 23 FPS
Rad11 = 18 to 20 FPS
Rad12 = 13 to 17 FPS

Nice work so far, keep it up you're doing good !
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sun Sep 25, 2011 9:20 am

[QUOTE=Kyatric] C2 r58; Windows XP SP3; FireFox 6.0.2; ATI Radeon HD 4870;
Dual-core E5200 @ 2.5 GhZ; 3,5 Go RAM

Pretty example : 7 FPS

Rad1-3 = 64 FPS
Rad4 = 60 (sometime, herratic, not often) - 64 FPS
Rad5 = 55 to 64 (more often)
Rad6 = ~55 FPS
Rad7 = ~41 FPS
Rad8 = 31 to 35 FPS
Rad9 = 26 to 29 FPS
Rad10 = 21 to 23 FPS
Rad11 = 18 to 20 FPS
Rad12 = 13 to 17 FPS

Nice work so far, keep it up you're doing good ![/QUOTE]

Thanks Kyatric!

I just can't increase the rendering speed if I take out effects it's faster and I stop creating shadow blocks its even faster (60fps+) so the plugin works fine just the rendering... Currently cleaning the plugin up and making an example project then I'll upload so people can test. Will also upload my Line plugin some people might find that useful. It will stay as a plugin for now eventually it will be a behavior so you can have more than one field of view. Hopefully as time goes on myself and possibly other people will have better ideas for optimisation! If you didn't have to render shadows and just used it to test for sight purposes (so none of the pretty stuff) it would run at 60fps easily! So it achieves its purpose I guess.
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Sun Sep 25, 2011 3:13 pm

[QUOTE=00Rez] I just can't increase the rendering speed if I take out effects it's faster and I stop creating shadow blocks its even faster (60fps+) so the plugin works fine just the rendering... Currently cleaning the plugin up and making an example project then I'll upload so people can test. Will also upload my Line plugin some people might find that useful. It will stay as a plugin for now eventually it will be a behavior so you can have more than one field of view. Hopefully as time goes on myself and possibly other people will have better ideas for optimisation! If you didn't have to render shadows and just used it to test for sight purposes (so none of the pretty stuff) it would run at 60fps easily! So it achieves its purpose I guess.[/QUOTE]

Well don't beat yourself up too much anyway.
On the one hand, I'm still using FF on win XP (on purpose to see "how the app looks at its worst"). I mean, it is known for like having the worst performance of all major browsers for now. Scrolling isn't fluid, the more plugins (and effects) you have on screen, the laggier it gets.
To me it's ok.

Also, even if FPS aren't 60, during the test it took up to around rad8 before the character really starts to be laggy and not feel smooth in its moving.
So even at 40FPS, the board and shadows displays pretty fine.

For optimisation, let's wait for all the browsers to finaly display about the same performances (FF should do it in about 3 monthes according to their plan).

So for now, optimisation isn't really an issue. For now just focus on the release and the examples/documentation and you'll have yourself a nice useful plugin sir.
And one more nice and helpful member to the community.

As I said previously, keep up the good work Kyatric2011-09-25 15:15:56
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sun Sep 25, 2011 5:30 pm

Hey 00Rez,

I like your work so far. Just keep on going, I think it is the right way.
For the rendering "issue": You might want to try deleting every object that is not lit.

I made the tests and I think there is something wrong either in the fps calculation or the code itself. But first the results:

pretty example: 8-9

rad 1: 56-60 (22-25)
rad 3: 56-61
rad 5: 58-62
rad 7: 60-64
rad 8: 47-51
rad 9: 36-40
rad 10: 29-31
rad 11: 24-27
rad 12: 21-22

Now the thing is, to me it makes no sense that the framerate decreases if I decrease the radius from the starting 7 down to 1. But more obviously there is another issue. If I decrease the radius from the starting point down to 1 the resulting framerate is 56-60. But if I get to radius 1 by increasing from the starting point all the way up to radius 12 and still increasing, where it automatically switches back to 1, then the resulting framerate is 22-25. So there is something wrong, although I don't know what :)

This is a very good project. It shows the hesitating people, like me, how far you can already go with C2. I will use this project (if you will post further updates, that is) to see the progress of C2 and my browser's speed :)tulamide2011-09-25 17:31:28
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sun Sep 25, 2011 5:42 pm

[QUOTE=tulamide] Hey 00Rez,

I like your work so far. Just keep on going, I think it is the right way.
For the rendering "issue": You might want to try deleting every object that is not lit.

I made the tests and I think there is something wrong either in the fps calculation or the code itself. But first the results:

pretty example: 8-9

rad 1: 56-60 (22-25)
rad 3: 56-61
rad 5: 58-62
rad 7: 60-64
rad 8: 47-51
rad 9: 36-40
rad 10: 29-31
rad 11: 24-27
rad 12: 21-22

Now the thing is, to me it makes no sense that the framerate decreases if I decrease the radius from the starting 7 down to 1. But more obviously there is another issue. If I decrease the radius from the starting point down to 1 the resulting framerate is 56-60. But if I get to radius 1 by increasing from the starting point all the way up to radius 12 and still increasing, where it automatically switches back to 1, then the resulting framerate is 22-25. So there is something wrong, although I don't know what :)

This is a very good project. It shows the hesitating people, like me, how far you can already go with C2. I will use this project (if you will post further updates, that is) to see the progress of C2 and my browser's speed :)[/QUOTE]

Thanks tulamide I'm prettifying the plugin and I'll redo that speed test again and see if I can fix the errors. There's a chance I might have missed some when I release this so everyone will have to keep an eye out . Not long now!
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Sun Sep 25, 2011 5:51 pm

[QUOTE=Kyatric] [QUOTE=00Rez] I just can't increase the rendering speed if I take out effects it's faster and I stop creating shadow blocks its even faster (60fps+) so the plugin works fine just the rendering... Currently cleaning the plugin up and making an example project then I'll upload so people can test. Will also upload my Line plugin some people might find that useful. It will stay as a plugin for now eventually it will be a behavior so you can have more than one field of view. Hopefully as time goes on myself and possibly other people will have better ideas for optimisation! If you didn't have to render shadows and just used it to test for sight purposes (so none of the pretty stuff) it would run at 60fps easily! So it achieves its purpose I guess.[/QUOTE]

Well don't beat yourself up too much anyway.
On the one hand, I'm still using FF on win XP (on purpose to see "how the app looks at its worst"). I mean, it is known for like having the worst performance of all major browsers for now. Scrolling isn't fluid, the more plugins (and effects) you have on screen, the laggier it gets.
To me it's ok.

Also, even if FPS aren't 60, during the test it took up to around rad8 before the character really starts to be laggy and not feel smooth in its moving.
So even at 40FPS, the board and shadows displays pretty fine.

For optimisation, let's wait for all the browsers to finaly display about the same performances (FF should do it in about 3 monthes according to their plan).

So for now, optimisation isn't really an issue. For now just focus on the release and the examples/documentation and you'll have yourself a nice useful plugin sir.
And one more nice and helpful member to the community.

As I said previously, keep up the good work [/QUOTE]

Thanks for the positive words Kyatric!
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Sun Sep 25, 2011 6:10 pm

Ok people here is a quick demonstration of the events in this plugin:



This makes this.

Please note for optimisation this only shows the hidden cells within the radius. An action to iterate through ALL cells will be included in the release.

Please let me know a) what you think and b) if its easy to understand!

Thanks for your time,

Rez.
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

Post » Sun Sep 25, 2011 8:14 pm

good progress sir.

rogue likes everywhere await your completion...lol.
B
52
S
17
G
15
Posts: 1,029
Reputation: 26,339

Post » Mon Sep 26, 2011 10:10 pm

[QUOTE=harrio] good progress sir.

rogue likes everywhere await your completion...lol.[/QUOTE]

r1 released! stuck it in its own thread
B
21
S
7
G
2
Posts: 185
Reputation: 3,280

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: ounound and 6 guests