Hey guys thank you so much for the prompt responses I didn't expect so many quick replies.
Just so you guys know the # i used in the code I posted was something just to represent any sort of number I tried to put there anything greater than 1 in the place of those #'s doesn't work. In the actual code I do not use a #, but real numbers.
Also I apologize for not uploading the .love but I assumed you guys wouldn't want to wade through all my crappy code just to help me out but if you guys have the time I would certainly appreciate it! Hopefully the code is understandable ha and not completely terrible. Thanks again!
If you guys have any questions I'll be back in like... 6 hours or so after work.
Love crashes without error, don't know whats wrong 7.1/7.2
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Love crashes without error, don't know whats wrong 7.1/7
- Attachments
-
- Fraction.love
- (153.4 KiB) Downloaded 78 times
Re: Love crashes without error, don't know whats wrong 7.1/7
The error has to do with physics (of course it does...) - it looks like Box2D doesn't like something to do with your RectangleShape creation in TerrainSquare. I'm not sure what yet, though.
Re: Love crashes without error, don't know whats wrong 7.1/7
Here is what I get on console (hey, its an error message )anjo wrote:The error has to do with physics (of course it does...) - it looks like Box2D doesn't like something to do with your RectangleShape creation in TerrainSquare. I'm not sure what yet, though.
Code: Select all
love: modules/physics/box2d/Source/Collision/b2BroadPhase.cpp:240: uint16 b2BroadPhase::CreateProxy(const b2AABB&, void*): Assertion `m_proxyCount < b2_maxProxies' failed.
Code: Select all
b2Assert(m_proxyCount < b2_maxProxies);
As for the code error, the terrainSquare:init() is called 2048 times before it crashes (for me), and this for sure is not what you want. I think it has no more resources to create the new shape.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Re: Love crashes without error, don't know whats wrong 7.1/7
I took the liberty of creating such a thread. I tried to write it in a friendly, non-imposing manner since the atmosphere here is nice and relaxed. And personally, I can't stand forums that are full of threads listing rules. I mean, the forum needs to have rules like that enforced then it's no longer a community is it?Robin wrote:It might very well. I have been thinking that a wiki page on this would be useful, but a sticky will probably be read more often.Lafolie wrote:Do you think it would be worth making an announcement/sticky thread regarding this? Not so much a forum rules, but a guideline giving people tips on how to help us help them. The more information they give us the faster their problem will inevitably be solved.
Anyway, you can find the thread here if you haven't already seen it.
[/offtopic]
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Re: Love crashes without error, don't know whats wrong 7.1/7
bartbes tried, I'm not sure how much success he had with that endeavor but my suspicion is "not much".miko wrote:My suggestion for love would be to redefine b2Assert() to a love-friendly version, so there would be no more "crashes without error".
Re: Love crashes without error, don't know whats wrong 7.1/7
Hmmm so to be honest I'm a little confused on how to "fix" this issue. I guess it's just too many physics bodies and it crashes?
Maybe if I explain what I'm trying to do you guys can give me a less crashy way to do it.
Basically I'm making a 2d game with dynamic terrain based on blocks. I know... it's basically 2D minecraft how original, but this is mostly for me to learn from and see where I can take it. I have a system in place where I i have a block object that is stored in 64*64 array "chunks", and then I plan to have these chunks fill the world. Making a body for all those squares at once is causing love to crash, so now I need a creative way to make a block only be physically interactive when needed. Any ideas?
Maybe if I explain what I'm trying to do you guys can give me a less crashy way to do it.
Basically I'm making a 2d game with dynamic terrain based on blocks. I know... it's basically 2D minecraft how original, but this is mostly for me to learn from and see where I can take it. I have a system in place where I i have a block object that is stored in 64*64 array "chunks", and then I plan to have these chunks fill the world. Making a body for all those squares at once is causing love to crash, so now I need a creative way to make a block only be physically interactive when needed. Any ideas?
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Love crashes without error, don't know whats wrong 7.1/7
Yep, you're creating too many physical shapes. I've had the same problem when using tiles, and so has Taehl. Taehl fixed it by implementing his own custom physics. The only other option I can think of is to use some sort of algorithm to detect when optimisations can be made; for example, if you have 20 tiles in a row, you can just make that into a big rectangle shape. But the practicality of doing that in a Minecraft like game may not be very good.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Love crashes without error, don't know whats wrong 7.1/7
Well, I could map it to an internal error alright, but then the wrappers needed a whole lot of work. Also, it has been pointed out that the assertions should be disabled in distributed code, but then, how do tell our lovers what happened?anjo wrote: bartbes tried, I'm not sure how much success he had with that endeavor but my suspicion is "not much".
Who is online
Users browsing this forum: Semrush [Bot], slime and 4 guests