!
#1318 posted by Qmaster on 2014/02/19 04:07:34
BUMP!!
Can we please sticky this thread next to Mapping Help? I come here often to read up on awesome stuff going on in QC Land but I keep having to dig down in All Threads.
#1319 posted by necros on 2014/03/23 03:51:21
is there a reason why C++ compilers are so unhelpful?
the language is nice and having access to the heap and more control over what goes on the stack is great but tracking down some bugs or even mistyped things can be such a hassle.
Clang
#1320 posted by Preach on 2014/03/23 06:44:33
I've not used it myself, but one of the touted features of the clang compiler is superior error message delivery:
http://clang.llvm.org/diagnostics.html
Might be worth a punt...
Hah
The problem with C++ error messages is (nested) templates. This makes the error messages very long and basically unreadable. The Xcode IDE is quite helpful here because it allows you to click on the separate lines of a template error and highlight their occurrence in the source files.
Other than that, I remember reading a trick to simplify the error messages in a C++ book. I can look it up if you're interested.
Preach, maybe clang has better error messages than others, but they're still hard to understand when there are templates involved ;-)
#1322 posted by mwh on 2014/03/23 10:31:34
#1323 posted by JneeraZ on 2014/03/23 14:16:55
#1324 posted by necros on 2014/03/23 16:36:59
lol willem, yeah, i feel like that sometimes. :)
as for using another compiler, i have no idea how to change it since i'm using visual studio 2012... i assume i'm just using microsoft compilers of some kind.
Cpp
#1325 posted by necros on 2014/03/23 21:09:57
to give an example, at one point i started getting an error saying NULL was an undefined variable. and then suddenly it went away and I have no idea what caused that to happen.
Yes
NULL is a typedef for the literal value 0. It is defined as soon as you import any STL header, such as iostream.
#1327 posted by necros on 2014/03/23 23:45:03
yeah that's what i mean. it should just be there regardless but something i wrote in my own code was stopping it from being defined or at least, made it look that way to the compiler.
i'm sure if i knew more about it it wouldn't be that strange but for a noob like me, it's just befuddling.
New Blogosphere
#1328 posted by Preach on 2014/05/12 00:31:17
So I haven't posted much on the old blog this year - putting together the Quoth release took up most of my Quaking time. So now that it's out the door, here's a return to posting stuff. Today we develop a bit of a hack to create an EndFrame function.
http://tomeofpreach.wordpress.com/2014/05/11/creating-the-endframe-function/
There are a bunch of extra hacky things this makes possible, but the article is tightly focused, maybe I can follow up with some of the options...
@Preach - Entity Order
#1329 posted by Qmaster on 2014/05/17 03:34:28
Does this mean there's a way to reorder the entity edicts list? Is that what .chain and head are doing? Care to explain how those work, please?
I have a really cool entity that requires any linked entities to be right next to each other (or very nearly) in the edict list in order to avoid any mid-frame lag between eachother. I haven't released the entity as a standalone .qc file yet since I haven't found a workaround for telling people to "Yeah, just select the entities in the editor, copy them, delete them, then paste them to bring them back, then compile. That way the linked entities are always last on the edicts list since they are last in the map file. That way you avoid any mid-frame lag from having to calculate too many physics calls in between entities within the same frame." (DEATH to 0.100 second delays when arriving at path_corners!)
Is there a way to always make sure these entities are near each other in the edicts list so that they're physics are called together?
#1330 posted by necros on 2014/05/17 03:39:21
.chain is set when you run findradius. the engine simply sets this on all entities in the radius so you can iterate through them.
relying on the entity spawn order for your code is dangerous and impractical. it would be better to create a new .entity field and then build your list of entities with the new field at map start once. then you can iterate smoothly without having to rely on the map playing nice.
#1331 posted by Spike on 2014/05/17 08:25:04
@Qmaster: try using copyentity to copy the slave entity towards the end of the list. combine with the entnum builtin/intrinsic/nextent so you know the order is okay. do it inside the master's spawn function if the slave already exists and you should be okay with respect to targetname stuff on other entities.
Agreed
#1332 posted by Preach on 2014/05/17 08:53:14
Now, from the context clues in your post, I'm guessing you're trying to create some kind of escalator or conveyor belt contraption out of a set of func_train entities. Ensuring that all of the trains are next to each other in the entity list will not save you here. One way they can still go out of sync is if a player blocks one of the trains, but the others are free to move.
What I'd recommend is getting a copy of the "custents" mod, and looking at their func_train_sync entity, which is designed to fix this specific issue. I can't remember if the fix was complex - like ensuring all the movement shuts down when one entity is blocked, or the simpler solution of having individual entities wait at each corner until all the trains have reached their next stop.
...btw
#1333 posted by Preach on 2014/05/17 11:01:18
Incidentally I'm running into a bug now with the tutorial I posted, so hold on using it until I figure out what's causing it. It's the kind of bug that creates a substring out of a QC string, so something's really having a party on the entity...
Fixing Endframe
#1334 posted by Preach on 2014/05/20 23:27:32
Ok, so it turns out that the compiler optimisations I was using with FTEQCC have an obscure bug that got exposed by the spawn() function wrapper in the previous tutorial. This was corrupting the entities, and it also managed to corrupt the linked list in CreateBackstop to obscure the fact that it should loop infinitely.
The full skinny on what form the bug takes, how to work around it, and how to fix the bugs it masked in my own code is now up on the blog:
http://tomeofpreach.wordpress.com/2014/05/20/fixing-the-endframe-function/
@Preach
#1335 posted by Spike on 2014/05/21 01:03:34
Preach, in all seriousness, get an updated version. That's an order!
New Release?
#1336 posted by Preach on 2014/05/21 09:21:54
Latest version on the page is 1.0 and that's like 3 years old...
#1337 posted by Spike on 2014/05/21 10:52:36
Triptohell.info
Blocked by NOD32 :(
Disable The Religious Filtering
#1339 posted by Spirit on 2014/05/21 11:27:08
#1340 posted by Joel B on 2014/05/21 19:40:33
Speaking of FTE things, what is the general story about the lack of public stable releases for FTEQW etc.? I ain't mad, just curious. I see there's development still churning away, but I typically avoid using dev builds of stuff unless there's a specific reason.
#1341 posted by Spike on 2014/05/21 22:44:32
as the v1 release proved, stable builds are not really that much more stable than stuff that has since been fixed...
I'm not really a milestone kind of person, thus there's not really any point where a release is any more worthy than another (generally the 'best' time is just before I commit some huge awesome feature that's likely to break everything, which means that the release is effectively crippleware).
plus I'm too lazy to figure out how to edit the site. :s
Beware Of The Leopard
#1342 posted by Preach on 2014/05/21 22:52:56
Yeah, it seems a shame that this kind of stuff gets lost - I guess it's the downside to that continuous integration, nightly builds stuff - there's less inclination to tie things up into a release milestone. I'll make a blog post once I've messed around with it, which will at least give it a tad more coverage...
|