bertie Booster, Actually that original post name doesn't make a lot of sense anymore
This picture represents the layout and that isometric map is half the height of that.
roracle, That was quite bad explanation. I am restricting camera from going out from isometric map.
Ok well this should work.
Is between values:
angle(point1.x, point1.y, point2.x, point2.y)-angle(point1.x, point1.y, screen.x, screen.y)
Lower bound -180
Upper bound 0
I'm terrible at math and it is already quite late so could someone point me to the right direction with this.
Actually not object but screen center
So for short I would like to restrict camera from going over that line (scrollx,scrolly)
I also have this same issue as spongehammer on Firefox, not at Chrome. User Control Panel, View your posts, FAQ, Members and Logout works though.
dylantan, Please note that it doesn't have very good lag compensation. I quikly changed few things to use Delta time since I just tested it with Firefox and it was lagging a bit. You might see enemies to change direction during this as well.
https://dl.dropboxusercontent.com/u/104893773/C2%20examples/Platform%20game%20no%20bear.capx
Looking really nice! Didn't expect racer at first (Missed that 2D F-Zero ). Really quite unique.
lennaert, shinkan, Did you test without fog of war. If fps is reasonable without that it would help. I can always try to make better system for that, maybe using tilemaps again. Also that is quite interesting what you said about frame rate increasing when you move them. On debug I get CPU from those unit events from about 6% to 14% when idle and on move. Also thanks again this really helps!
I guess I could start to make actual game play and see how it is in practice. 200 units is quite a lot to draw at the same time after all
Updated. No more over 10000 objects!
—, Thanks!Good to know that GTX 650 isn't enough for this game I already have some better solusions ready. Might have to totally redesign that FOW at some point.
lennaert, On the layout editor that Tilemap with ID 1 is at half tile offset from 0. Layout width is 1024. It will not work for every width.
Maybe not perfect but seems to work for now
Edit: Also CAPX here https://dl.dropboxusercontent.com/u/104893773/C2%20examples/Draw%20Isomap%20to%202%20tilemaps.capx
lennaert, Not sure do you mean that tilemap system or this test. I still try to figure out the math to translate those mouse clicks to the path finder. It is a bit more complicated now then I upload a new test.
lennaert, Yes. That whole fog of war system was quite quikly slammed together and I was expecting it to be bad for performance. Also I should delete all 200 objects when FOW is disabled.
Another thing. I figured out a system where I can create the map from 2 tilemaps. So it is 2 objects instead of 10000
From every tick tests.
I left test 3 off because very inconsistent frame rates. Specially on CC.
Develop games in your browser. Powerful, performant & highly capable.
lennaert, Thanks a lot! While I hope things will get smoother when Chrome 33 comes. That fog of war effect seems quite taxing at the moment. Also that map tile count could be problem for some machines.
It is not desired that you would need extremely up to date gaming machine to play a game that basically looks like Red alert 2 Still of course it is not possible to get that same performance, but at the moment it is not so excellent.
shinkan, It seems it would be very hard to draw that tilemap from a file.
—, Sadly that is out of scope Can you run some C2 game on that? Or well I get around 30 FPS on Firefox.