Jump to content

f13rce

Members
  • Posts

    510
  • Joined

  • Last visited

Everything posted by f13rce

  1. Oh wow. Thank you all for those detailed responses! I will try some of these out and look more into the information you gave me. This should definitely help me. I'll post some results when I get to that. Many. thanks. Please, feel free to post more if something comes up your mind.
  2. Hey all, After programming for a few years I've noticed that the performance in my projects are low. This is mainly because of bad written code. Since I don't really like to keep that bad habit, I will need a bit of your help and advice. I do know how to code, but the problem is coding for performance. My goal is to improve the performance as much as possible. I've started coding in Game Maker - where you don't really have classes but objects. I haven't really been learning how to program in performance back then (neither coding clean actually, working with classes etc). So basically I *cough* might *cough* have had a bad start. In my project Ravage Online (the online FPS) I've only have 8 classes - I assume this is low for over 6000 lines of code (also building takes long, etc). Are many classes good to have when looking at performance and are they easy to use? Also, I'm currently programming in MVS2008 in C and C++. Are there any handy tools to record the performance/check your code for performance? Or are there any ways to check the performance using the Leadwerks engine? Then we have the big while loop. I used to put like every bit of code in there with barely any functions (I feel your pain). But writing functions all the time also fills up a lot of space before the int main - should I work with some more classes? I also noticed some people are sketching what they want to code - I would like to try this. Is anyone doing this as well? Does anyone have tips and tricks for that? At last: Do you have any tips, tricks and/or tools about coding clean/optimizing performance? I'm thinking about having a good start with a new project but don't want to end it up like Ravage, where the easiest scenes have a low FPS because of the code. You don't have to answer them all of course - I just need some advice with coding. Big thanks in advance! - Ivar / Evayr
  3. f13rce

    Ravage Online

    Thanks for the comments! Will be testing on the release since I don't think there will be more than 25 active players.
  4. f13rce

    Ravage Online

    I think it's about time to start this thread.. Ravage Online is an online multiplayer FPS based on action. The key feature in the game is to customize your gun to use it against other players. Custom Guns You will be given 250 points which you can spend on Accuracy, Damage, Rate of Fire, Stability and Clip Size, as shown below. The gun will change depending your spendings. Ex: If you spend more than 70 points on Damage or Accuracy, it becomes a Sniper Rifle. Ex2: If you spend more than 70 points on Rate of Fire (ROF) you will get the SMG. The server will check the weapons if they're valid and set up correctly (no wrong model, etc). The networking has been done with RakNet, with some help from Haxior. Maps I currently have 5 maps for Ravage: Mall, Deserted, The Pit, Cliffside and Village. Mall: Fighting in an abandoned mall which has been partly destroyed; lighting coming from the roof thanks to that. Good for any kind of game-mode. The Pit: A side near the sea full of containers. A lot of height influencing the map and very close quarters. Good for FFA. Deserted: More like a proving ground. Very close quarters which is great to try tactics and train reflexes. Cliffside: One of the snipers' favorite maps. Wide and open spaces yet enough cover to go running with an assault rifle. Good for FFA. Village: A large map full with hills and accessible rooftops. Great for any team-based game mode. Some screenshots: Teaser: Currently planning to release it the 28th if nothing goes wrong. Only really have to fix the updater for the game, which I've already done before with my previous project. I always love feedback! I'm not really the perfect designer, but I do love tips how to improve my way of working. Coding and designing is the best you can combine if you can do both well. Thanks, Ivar / Evayr Like this on Facebook
  5. +1. Can't wait, this is a very needy feature... x_x
  6. To get a bit back on topic; I am 17 years old and also making an online FPS too. It is definitely possible to make it, but it really takes years before you have a stable game. The networking and basics (movement, gun system, menu, etc) just takes really long to make it perfect. From what I hear from you is that you sound confident and willing to learn. Keep it that way, it's only a good thing. If you really want to do it then just go ahead. I can't really tell which engine is better for an online FPS though. I just started UDK at school, but Leadwerks works really well for me. It's very stable and easy to program with (and faster compared to UDK from what I saw). You also have this great community and wiki helping you out whenever you need it.
  7. f13rce

    Low FPS

    That must exactly have been the problem. Thanks.
  8. f13rce

    Low FPS

    Wow, how the... Anyway, thanks a lot for the help Josh. Any idea how to optimize the animated viewmodels too? Then it would be perfect.
  9. f13rce

    Low FPS

    Found it in post #9, nothing has been changed since then: Download Have you by the way found anything special on the viewmodels?
  10. f13rce

    Low FPS

    Thanks for the reply. I haven't enabled SSAO since Frameworks doesn't like it for some reason. Instead I've tried to get the camera in the weapon after switching to the other one... but it didn't affect the FPS. Good call though.
  11. f13rce

    Low FPS

    Sure: The UV on the other guns look about the same. I know it isn't the way how a pro would, but at least this works. Edit: It isn't the polycount either; I tried it with a more high poly rifle and it only costs 5 more fps at its max.
  12. f13rce

    Low FPS

    I've posted two viewmodels, one is animated (the M4A1) and the other isn't (M9). I've also included my export settings. And not at all, they don't have thousands of bones or so. If you want I could send you the .Max too.
  13. f13rce

    Low FPS

    I've found the problem! It has something to do with the viewmodel. Can't really tell exactly what. When I'm holding the viewmodel I'm having an FPS of solid 60 (vsync off)... but when I switch to my CreateCube() gun (without calling HideEntity on the first gun) I'm having an FPS of ~200 (remaining first gun on the same position and rotation in the view!). Without the M9 on the screen I get ~230. I tried to resize the textures since they were pretty big (1024 and 2048) to 256 and 512, but that didn't affect the FPS a lot. I neither think it's the polycount since all the viewmodels are beneath 5k poly including arms. Also the FPS gained with ~140 after I didn't hide my other gun. It can't be the animation because some guns don't have animations yet but also take down the FPS. The only things I'm doing with the weapon models are animating, positioning and rotating it; Nothing special. I do not have an extra buffer so they can get through walls. Anyone got an idea what could cause this problem? And is there perhaps an alternative for HideEntity (maybe that will work)? Thanks a LOT in regards, Ivar / Evayr
  14. f13rce

    Low FPS

    Done digging for a while. Time for results: Left side: Mall Notes: - No lighting Noticeable things: - FPS is just 14 higher than the middle SetStats(2) result (Desert highway) - 319 entities drawn. After playing around with the camera rotation and position in the map, this had some serious influences in the map (300 was low, gave me ~120 fps, 1000 entities gave me ~70 FPS). - 439 Batches drawn. Again, after playing with the cam this had no influence on the FPS. Middle side: Desert Highway Notes: - No lighting - Imported it in Ravage, not the Editor Noticeable things: - A LOT of polies, no influence on the FPS (so that isn't the problem at all, unlike my first post). - A LOT more memory usage, guess that lowers the FPS so much. - Only 12 batches drawn. But as I said above, it has no influence on the FPS. Yet the draw time is higher than the 439 batches... found that slightly weird to see. Right side: CreateCube() Notes: - No lighting - Scene is a cube from Leadwerks. No LoadScene nor LoadModel has been used (except for the viewmodel). Noticeable things: - Low everything and 161 FPS. It's only ~5k poly's away from the Mall scene but 315 entities. Guess we have a winner: the amount of entities. However, the amount of batches is also insanely low compared to the Mall scene. But I wrote that didn't matter when I was playing around with the camera. -------------------------- To fix the entities problem, I think I will have to export the models in Mall piece by piece... am I right? I rather ask it first to make sure before I start that big job, heheh.. What also bothered me a LOT is that the lighting and shadows take a LOT of FPS. I've set the ShadowMapsize to 2048 because then it looks good, even though it's high. ShadowQuality is 1 (best). Any tips and tricks to keep the FPS high with some good lighting? I'm used to have one big sun, but that makes the FPS go so low I don't dare to put some small detail lights in the map. Thanks for reading and helping in advance. Big time. - Ivar / Evayr
  15. f13rce

    Low FPS

    Some more testing with interesting results. Worth double-posting. I've made the frameworks work from scratch, totally clean and got 88FPS. I guess my laptop's video card isn't perfect (Ati Mobility Radeon 5470). I'll edit my laptop's hardware in my signature. The reason I'm using a laptop is because I'm at a place full of nurses and such (I'll be fine, don't worry). So I can't test it on my good PC. Instead, I gave the .exe to a friend. After installing OpenAL he got 580 FPS. The hardware of his PC: - nVidia GeForce 460 GTX - 6 GB RAM - Intel i7 920 @2.67GHz - Windows 7 64 Bit In the test, nothing has been drawn on the screen (no models, no CreateCube etc). Is 580 FPS normal for such a good PC? At last I also made a new project with just a camera and world. My friend was able to get a FPS of 2500 (422 on my laptop). Does this mean Framewerks is a lot slower? Could that be the problem? (Using LE2.43 btw, will try 2.50 tomorrow)
  16. f13rce

    Low FPS

    Ah, I see. I also checked it with Fraps and you're both right. I removed it. Back to ~77 FPS.
  17. f13rce

    Low FPS

    Unfortunately not the problem. From ~150 FPS I now get 77 FPS. Guess that line is pretty essential. I'll edit this post if I find something new.
  18. f13rce

    Low FPS

    Thanks for the fast replies! This saved another 13 FPS. Any other ideas? Edit: Apparently is does over here. The effects are just some contrast, brightness and saturation changes. I have been thinking about some memory leaks or something, too many initializes or perhaps some bad build settings? Can't really figure it out, hopefully you can. I will supply you as much as I can. Another edit: I changed the cube.gmf with the CreateCube(); command. FPS is 152 now. Something might be wrong with the exporting of the GMF? Or perhaps importing? My export settings in Max aren't that weird: http://Evayr.com/images/MaxExport.jpg
  19. f13rce

    Low FPS

    Pretty big update on this topic: I've looked into the source code and changed the drawing of frames. It's working with Framewerks now. This also increased the FPS by 30. Because of that I solved a few problems, like a box shadow following the camera all the time ( (don't know if this is a bug, guess it's my fault?)). So I fixed up some code and changed some lights. I was doing tests and logged the fps manually with every little change I did. After a while I changed the camera scale from 1.4 back to 1, which saved me 17.7 fps. This used to remove the square on the ground. Second I used a gigantic directional light instead of a spotlight, which saved me another 22.5 fps. So in the end I ended up with ~100FPS instead of 61.3. But still, I don't think that's a lot for only 15k tris (7k poly). So I made a cube in 3DS Max and exported it - Zing, 109 FPS. Guess it's something in my code. I've cut out a lot of things that didn't matter with the FPS. Since I use multiple .h and .cpp files you won't be able to compile it and run it - sorry for that, but I don't feel like giving the entire source away. You can download the source in the attachments. I will personally give you a big hug if you can see the problem (or something else - except for kisses *lol*). Main loop starts at line 816. As I said, I removed a lot of (mail loop) code to make it easier to understand what's happening. Thanks for helping in advance! whatisit.txt
  20. f13rce

    Low FPS

    Update: I've put Mall in the Editor and removed some unseen polies, but I get the same result. :\ (VSync is off, just a small gain of 8 FPS.) Editor files: Download (Extract these files in the Leadwerks SDK root folder. I forgot to add mall_ in the beginning of each .gmf file, so please spare me for that) Anyone got an idea what it could be? Thanks
  21. f13rce

    Low FPS

    Thanks for the help Richard I'll wait for Josh's response before I'll do that hell of a job in case anything seems to be a mistake or so.
  22. f13rce

    Low FPS

    Thanks for helping Josh. Here you go: http://Evayr.com/other/Mall.rar
  23. f13rce

    Low FPS

    Thanks for the fast reply Lumooja. I've tried SetStats(2); in the editor with the Mall.gmf and the terrain_arctic.sbx. This was the result: Now I see that the ammount of Polies and Mem. Usage is way lower than the arctic scene, but that the ammount of entities and batches is ridiculously higher. I suppose that is the problem? If so, what can I do about it to get that fixed? Thanks, Ivar / Evayr
×
×
  • Create New...