|
dangerz posted:I'll post up more detailed information when I get home tonight. Sorry, I'm at work right now so I don't have access to all my stuff.
|
# ? Apr 21, 2011 15:52 |
|
|
# ? May 11, 2024 14:49 |
|
dangerz posted:The reason I believe it's the String is because when I watch the app using a memory profiler, I'm watching thousands of strings being created and released when the GC is ran. When I comment that single line out, those strings aren't being created at all. The parameters to spriteBatch.DrawString are being passed by value so copies of each parameter are made on the heap every time it is called. After spriteBatch is done running it drops reference to the new argument objects and they continue to exist in memory until the garbage collector fires off once every few hundred milliseconds. That isn't really a memory 'leak' in the traditional sense, you just have unreferenced objects building up between GC runs. This is normal .NET GC operation and it isn't really a problem. Like Orzo said, it just means strings are being used. Is this really becoming a limiting factor for your program, or is it just something interesting you noticed when profiling?
|
# ? Apr 21, 2011 22:30 |
|
I had assumed he was either running out of memory or monitoring the memory usage of the application (via task manager -> processes or something) and watched it grow every second. It definitely does happen. I just can't figure out why it's happening in his particular instance.
|
# ? Apr 21, 2011 22:45 |
|
I looked at XNA4 SpriteBatch and SpriteFont with ILSpy, and I can't see anything that could cause this sort of problem.
|
# ? Apr 21, 2011 23:17 |
|
PDP-1 posted:The parameters to spriteBatch.DrawString are being passed by value so copies of each parameter are made on the heap every time it is called. After spriteBatch is done running it drops reference to the new argument objects and they continue to exist in memory until the garbage collector fires off once every few hundred milliseconds. It's not a limiting factor at all. I'm just trying to hunt down any leaks I have before going forward.
|
# ? Apr 22, 2011 03:17 |
|
dangerz posted:It was just something I noticed while I was hunting down a memory leak. The weird thing is that when I comment out all of my spriteBatch.DrawString lines, my memory doesn't grow. The second I put them back in, my memory will fluctuate and it does go up and down when the GC kicks in, but it always allocates a tiny bit more than it releases.
|
# ? Apr 22, 2011 03:20 |
|
Orzo posted:Well the problem is that you've confused everyone by calling it a 'leak' when it might not be a leak at all. Memory going up constantly over time is bad and is probably a leak. Memory fluctuating rapidly back and forth is not a leak if the net usage does not grow with time. Which are you experiencing?
|
# ? Apr 22, 2011 03:30 |
|
That would be a leak in C++. It's not a leak in C#. It's just inefficient. If you were putting every new vector into a container or something so none of them could ever get gc'd then it would be a leak (effectively). Just allocating memory every frame that will eventually get gc'd is not a leak. Paniolo fucked around with this message at 03:38 on Apr 22, 2011 |
# ? Apr 22, 2011 03:32 |
|
Ya tl;dr, I should've researched more before I spoke. Sorry about that.
|
# ? Apr 22, 2011 03:50 |
|
dangerz posted:There was a small leak, though. It just wasn't from the Strings. It was from me putting 'new Vector2(0,0)' for the text position instead of assigning the position to a variable and passing that. Anyway, glad you worked it out.
|
# ? Apr 22, 2011 04:17 |
|
What would you guys consider the most complete, well developed engines (any language) that are free/open source? My purposes are 2D but anything really.
|
# ? Apr 22, 2011 22:55 |
|
So I posted earlier about this, but no one replied and I have some new questions. Next year, I am going to be on a large game project as part of a year long capstone class. We are currently trying to decide what engine to use or whether we should write our own since our teams seems like it is going to be very heavy in terms of programmers. It is going to be a 3D exploration/puzzle/platformer etc. There is currently a working prototype for it in Unity, but we have some reasons against using it. Firstly, the small prototype is currently already choking Unity, although for this project we know we would need to be doing a lot of asset swapping. The other main problem with Unity is the poor version control support that it seems to have. Our current leading choice seems to be UDK, but we have some problems with it. Mainly, no one on the team has any experience using it. Can we actually get into it to do work, or are we solely limited to writing scripts that are separate from the core of the engine. Additionally, we don't know how well it will address the concerns that we have with Unity. We are planning on use some high level engine since we don't think we have enough people to dedicate anyone to the type of tool programming that the designers would need in the event of writing our own engine. I was wondering if people could answer some of my questions about Unity and UDK. Also, if you know of a different engine that seems like it would be a good fit, I would love to hear about it. Tl;dr: In the early stages of pre-planning for a game, and we don't know which engine to use.
|
# ? Apr 22, 2011 23:09 |
|
If you load stuff in a separate thread or with asynchronous file functions, during a game, will it gently caress up the gameplay speed nevertheless? It always seems that if the hard drive light is flashing then unrelated stuff runs slow, but I'm not sure how much that can be averted with good management. Asking for the sake of things like slowly loading assets for the next level while you're still playing the current level, so you don't get those loving 30 second load times between levels / area transitions. Edit: I assume pre-emptive loading is not as simple a task as it seems, because so many things have crazy loading times, but maybe other people just don't consider that important enough to make any effort to remedy? roomforthetuna fucked around with this message at 00:21 on Apr 23, 2011 |
# ? Apr 23, 2011 00:09 |
|
roomforthetuna posted:If you load stuff in a separate thread or with asynchronous file functions, during a game, will it gently caress up the gameplay speed nevertheless? It always seems that if the hard drive light is flashing then unrelated stuff runs slow, but I'm not sure how much that can be averted with good management. The main type of loading that we need are to replace low quality models with high-poly models in realtime. A good example of similar ideas is the early part of Alice in Wonderland, where she shrinks in the world. When she is big, you don't need very complex models for everything in the room, just enough to look right. But when she is tiny, you need high-poly models so that you can properly interact with the objects. EDIT: Wait, was this not intended to be a reply to my question? Did I then somehow turn it into one The Glumslinger fucked around with this message at 00:31 on Apr 23, 2011 |
# ? Apr 23, 2011 00:17 |
|
roomforthetuna posted:Edit: I assume pre-emptive loading is not as simple a task as it seems, because so many things have crazy loading times, but maybe other people just don't consider that important enough to make any effort to remedy? An Xbox 360 has 512MB of ram.
|
# ? Apr 23, 2011 00:23 |
|
Paniolo posted:An Xbox 360 has 512MB of ram. (Prime examples of horrific loading times on PC: Thief 3, Half Life 2, and every time you go in or out of a building in Elder Scrolls: Oblivion.)
|
# ? Apr 23, 2011 00:41 |
hayden. posted:What would you guys consider the most complete, well developed engines (any language) that are free/open source? My purposes are 2D but anything really. For 2D in Java, I'm really REALLY enjoying the Slick library. I've done a lot with Java and a few others, but a lot of them felt either really invasive (have to use their reimplimentation of the linked list) or really minimalist (have to build the scene-graph manually). It's more fun (imho) than the jMonkeyEngine and more helpful than LWJGL. It's build on the latter. The only difficult part is getting started. Linking libraries correctly is a bit of a bitch, but after you've done that it's astonishingly easy to make it do what you want. In C++, SDL is much more minimalist, but is easy to start and use. It's more a library than a complete engine, but look for things which make use of and extend it. PyGame is heralded by some, but it's really not my cup of tea. It's easier to use than a lot of the competition, but I've always been fandangled by some of its nuanced behavior. Cocos is hugely popular and has bindings for Objective-C and Python. If I weren't using Slick, I'd be using this. I'm not a huge fan of Ogre3D, Irrlicht, or CrystalSpace. The Unreal Engine may suit your purposes, and is more than capable of doing 2D. (There are some example games build in 2D in it.) Unreal Engine isn't open source, but it's free until you make $25,000 with it, after which they take 25% of whatever you sell. Impact JS Engine is not open source or free, but it's cheap ($99 or so), and has an impressive tech demo. For the sake of curiosity, what are you doing? RPG? Shoot-'em-up? Platformer?
|
|
# ? Apr 23, 2011 00:41 |
|
roomforthetuna posted:But that doesn't explain PC loading times frequently being worse, except perhaps as an addendum to people not considering it important enough to remedy - not worth remedying just for PC, maybe? Yeah, plus just because PCs have more RAM than consoles doesn't necessarily imply that the majority of PC users are going to have enough free RAM to preload a significant amount of game assets. I mean, nowadays 4GB is nothing special, but back when Half-life 2 came out RAM was still pretty expensive, and on a PC you risk SEVERE slowdowns if you start paging virtual memory, so it makes sense that current-generation game engines are incredibly conservative with memory usage. That's my theory at least. Here's hoping the next console generation ships with at least 8GB of RAM (or SSDs...) and loading screens become a thing of the past.
|
# ? Apr 23, 2011 00:47 |
|
Jo posted:For 2D in Java, I'm really REALLY enjoying the Slick library. I've done a lot with Java and a few others, but a lot of them felt either really invasive (have to use their reimplimentation of the linked list) or really minimalist (have to build the scene-graph manually). It's more fun (imho) than the jMonkeyEngine and more helpful than LWJGL. It's build on the latter. The only difficult part is getting started. Linking libraries correctly is a bit of a bitch, but after you've done that it's astonishingly easy to make it do what you want. I've used Slick before and it was pretty great, but didn't seem hugely popular or terribly well supported. I'm just learning in general. I made a dynamically server generated tile walker with Slick, and I was thinking about maybe expanding the idea and making it a mutli-player pokemon game. Ideally I'd use WebGL since it'd be a non-resource-intensive game and not having the user download anything would be great, but unfortunately there's just not enough support for it right now hayden. fucked around with this message at 01:08 on Apr 23, 2011 |
# ? Apr 23, 2011 00:57 |
|
The Cheshire Cat posted:
This is something of a longshot as both are still developing, but have you looked into Neon, or even more of a longshot, Roguelike GCS? http://roguebasin.roguelikedevelopment.org/index.php?title=Neon http://roguebasin.roguelikedevelopment.org/index.php?title=Roguelike_GCS
|
# ? Apr 24, 2011 13:50 |
|
All this talk of roguelikes has gotten me to re-download libtcod and try to get working on a project I started a long time ago again. The difference being that last time I did it in python, and I want to check out the C++ side of the library. Maybe it's a horrible idea, and if it turns out to be too difficult for my simple mind I'll go back to python. Does anyone here have any thoughts on the library and the different bindings?
|
# ? Apr 24, 2011 14:38 |
|
ambushsabre posted:All this talk of roguelikes has gotten me to re-download libtcod and try to get working on a project I started a long time ago again. The difference being that last time I did it in python, and I want to check out the C++ side of the library. Maybe it's a horrible idea, and if it turns out to be too difficult for my simple mind I'll go back to python. Does anyone here have any thoughts on the library and the different bindings? I think it's a very cool library and a lot of fun to play with. I wasn't impressed with the Python wrapper though--it really is just a thin layer to call the underlying functions from Python. It doesn't lend itself to writing idiomatic Python programs out of the box.
|
# ? Apr 25, 2011 05:20 |
|
crazylakerfan posted:So I posted earlier about this, but no one replied and I have some new questions. I'd be curious to see what kind of a small prototype is "choking" unity. I'm tempted to say that there's bad design/code causing that. In my experience Unity is very robust outside of some specific niches, assuming you're using it properly.
|
# ? Apr 26, 2011 17:28 |
|
Anyone have some good examples/tutorials/libraries to use for netcode in gaming? I tried winsock but holy poo poo there's like 3 tutorials for it in total that aren't just codedumps and they don't explain half the stuff, and winsock seems really old anyway. Anything for c++ for use with SDL/openGL.
|
# ? Apr 26, 2011 19:45 |
|
There's a couple good ones including ones that do object data replication for you but I ended up going with enet and writing an object replication layer for my game on my own.
|
# ? Apr 26, 2011 20:17 |
|
octoroon posted:I'd be curious to see what kind of a small prototype is "choking" unity. I'm tempted to say that there's bad design/code causing that. In my experience Unity is very robust outside of some specific niches, assuming you're using it properly. The prototype is only small compared to what we plan to do overall. The bigger problem is that there are so many complex models in the scene, and it would only increase in the larger game. Additionally, in my experience Unity works best when you can have clearly distinct levels, which our game won't have since it will likely be more the mold of a sandbox style gameplay. The problem certainly is bad design, the main question is which engine would allow us to implement a better design with the least hassle.
|
# ? Apr 26, 2011 21:49 |
|
Open-ended levels would be a good reason not to go with Unity, but as for slowdowns... Do you think you can write a significantly more efficient renderer than Unity? I'm highly skeptical.
|
# ? Apr 26, 2011 21:56 |
|
Unity has the ability to additive load and unload scenes and you can use asset bundles to control what's loaded when to a certain extent. I don't really know but in general people dismiss things in Unity because they don't learn how to use it properly, it's a remarkably efficient engine.
|
# ? Apr 26, 2011 22:06 |
|
crazylakerfan posted:The prototype is only small compared to what we plan to do overall. The bigger problem is that there are so many complex models in the scene, and it would only increase in the larger game. Additionally, in my experience Unity works best when you can have clearly distinct levels, which our game won't have since it will likely be more the mold of a sandbox style gameplay. It's hard to make suggestions without knowing more details, but would it maybe help to implement some kind of level of detail system so you can simplify models that are further away from the camera?
|
# ? Apr 26, 2011 22:47 |
|
Tw1tchy posted:Anyone have some good examples/tutorials/libraries to use for netcode in gaming? Cracking open the Quake 3 source or reading the writeups on how its networking works would be a good start, since networking really hasn't changed that much aside from the rampant introduction of rewind-the-world lag compensation, and delayed-synchronous player interaction (which is the most stable strategy for interacting with complex physical objects like vehicles).
|
# ? Apr 26, 2011 23:30 |
|
Gerblyn posted:It's hard to make suggestions without knowing more details, but would it maybe help to implement some kind of level of detail system so you can simplify models that are further away from the camera? It is a game in which we are using a shrink/growing mechanic to explore the "world" in a room. I'll post the a link to the website which has an older version: http://alexbeachum.com/portfolio/Open_World/Open_World.html At this point, my biggest concern about Unity isn't its power, but that I have heard a lot of people have had trouble with version control on unity projects, and version control is something that we definitely plan to use. Right now, we are basically just trying to decide what we should should pursue for making it. The Glumslinger fucked around with this message at 01:11 on Apr 27, 2011 |
# ? Apr 27, 2011 01:08 |
|
crazylakerfan posted:It is a game in which we are using a shrink/growing mechanic to explore the "world" in a room. I'll post the a link to the website which has an older version: Just a random aside, but I get a real "Alice in Wonderland" vibe from that concept. It's a really intriguing idea.
|
# ? Apr 27, 2011 01:53 |
|
Tw1tchy posted:Anyone have some good examples/tutorials/libraries to use for netcode in gaming? I tried winsock but holy poo poo there's like 3 tutorials for it in total that aren't just codedumps and they don't explain half the stuff, and winsock seems really old anyway. Anything for c++ for use with SDL/openGL.
|
# ? Apr 27, 2011 02:25 |
|
crazylakerfan posted:It is a game in which we are using a shrink/growing mechanic to explore the "world" in a room. I'll post the a link to the website which has an older version: drat, that is really cool.
|
# ? Apr 27, 2011 02:28 |
|
crazylakerfan posted:It is a game in which we are using a shrink/growing mechanic to explore the "world" in a room. I'll post the a link to the website which has an older version: Funny thing - I didn't realize I'd come out of the box at the start, and made my way back into the box by lining up with the little hole, jumping on top, shrinking down and then stepping back off the edge and sliding down the wall until I slipped back into the hole. How disappointing that I hadn't made my way into somewhere new!
|
# ? Apr 27, 2011 05:17 |
|
crazylakerfan posted:It is a game in which we are using a shrink/growing mechanic to explore the "world" in a room. I'll post the a link to the website which has an older version:
|
# ? Apr 27, 2011 05:20 |
|
OneEightHundred posted:There isn't a "general" way to do netcode because it's REALLY tightly-integrated with the gamecode. Scaevolus posted:As OneEightHundred said, Quake 3 is a decent place to start. This has a good writeup on how it works. Thanks for the help. I'll read through all that soon when I get the time. Also what I'd be using it for would be a tile-based game, so would all the stuff in it still be completely fine for what I need to do? And does it mention what libraries to use for netcode; because that's still a big problem of mine.
|
# ? Apr 27, 2011 05:33 |
|
roomforthetuna posted:Is there anything more to that after finding the five orbs? I did the same thing! And it seems like the orbs are it. He said it was just a demo basically so I don't think there's supposed to be a lot of "game" there yet. It's a really cool concept though; taking advantage of the fact that scale is arbitrary in 3D modelling, you can do things like putting an entire, functional town on the head of a pin that you could pick up and carry around with you, or shrink down and interact with the town itself as if it was completely normal sized. Then just shrink down even more to find even more details that aren't evident at larger sizes. It's like the video game version of diving into a fractal. You mentioned that you were worried about performance because of the complexity of objects in the scene - maybe you need some really rigorous LoD scaling? There's no point in fully rendering a whole maze that's only going to be visible as a single pixel on the screen, so you could maybe have it start dropping polygons as your relative size compared to an object changes? I've never used Unity so I'm not sure what kind of power you actually have to do that sort of thing, but to me that would be the key issue for performance. If you don't have any kind of scaling, you're just going to waste a ton of time rendering microscopic polygons.
|
# ? Apr 27, 2011 05:35 |
|
Tw1tchy posted:Thanks for the help. I'll read through all that soon when I get the time. Also what I'd be using it for would be a tile-based game, so would all the stuff in it still be completely fine for what I need to do? And does it mention what libraries to use for netcode; because that's still a big problem of mine. For libraries, you could use something like Boost.Asio to wrap the platform-specific details.
|
# ? Apr 27, 2011 06:14 |
|
|
# ? May 11, 2024 14:49 |
|
Really digging SFML, should've used it instead of SDL in my project. Is there any docs that talk about how an engine should be structured now and days? I wrote mine up as a basic tree to depict my scene graph but adding things like Bullet physics and a deferred rendering pipeline got real hacky for me (granted it is my first game engine). I just want to keep things under the hood and not require any man handling of lower level stuff. Not trying to create an engine for the hell of it, I have another person working on it whom is not as skilled as me and would work faster with a decent interface.
|
# ? Apr 27, 2011 06:19 |