« first day (1541 days earlier)      last day (3469 days later) » 

3:06 PM
 
@MickLH does this mean, you gave up on your last engine, and started a new one?
 
@Ali.S No, I just lost a partition that contained my latest work
 
@MickLH sad :|
what about online backup? version control? etc.?
 
My my fault screwing around with Windows 7 installer just to play games on the computer I work on
I reverted to the latest version in git
Which was horribly outdated
Yeah yeah
 
:(
 
3:09 PM
@snake5 what about android/ios/wp ports?
 
@snake5 It seems like a good option, I evaluated AngelScript too, and Python, LISP, even embedding LLVM and using their IL as a script language
 
@Ali.S there are no build files for android but it's supported
as for the other two, not supported yet
 
user92578
	CRenderDescription* tempRenderDescription = BuildRenderDescription();
	m_RenderDescription = tempRenderDescription;
	delete tempRenderDescription;
 
it is so hard not to answer every Code Review question that uses something else with "Use Allman bracing" :)
 
Actually I checked out V8 and SpiderMonkey too, Ruby, basically everything I could get my hands on for the last few years
 
user92578
3:10 PM
Is this proper memory management in C++?
 
well, only if the system-specific code is removed
 
no
 
user92578
or does m_RenderDescription get corrupted when I delete the tempDescription?
 
@Tyyppi_77 no
 
@Tyyppi_77 It looks horribly wrong, but maybe m_RenderDescription is a class which implements operator=
 
3:11 PM
@Tyyppi_77 yes
 
when you call delete tempRenderDescrituion, m_RenderDescription is now pointing to invalid memory
 
user92578
okay
 
delete deallocates the memory used by the object pointed to
 
You guys are saying "No" too fast, m_RenderDescription could implement operator=(CRenderDescription*)
 
@Tyyppi_77 you need to learn about pointers :) find some C++ tutorials
 
3:12 PM
so if someone else is pointing to it, they are now an invalid pointer
 
user92578
I know about them... at least some
 
man, we have way too many c++ developers in the room :P
 
user92578
SO how'd I do this?
 
:D
 
user92578
BuildRenderDescription() returns a new CRenderDescription();
 
3:12 PM
don't call delete on the renderdescription until you don't need it anymore
 
user92578
but this code will get called every frame
 
@Tyyppi_77 Do you ever use the same CRenderDescription* for multiple entities?
 
user92578
it'll bleed the value on tempDescription every frame?
 
user92578
@MickLH no
 
Well then there's a design problem
 
3:13 PM
ok we don't have enough information about your code to answer the question
but it does not look right
 
You shouldn't be using new and delete in this case
 
user92578
and all this will go away if I make my function to modify the state instead of returning something...
 
If you wanted to make what you have work, you could probably do something like:

if (m_RenderDescription) delete m_RenderDescription;
m_RenderDescription = BuildRenderDescription();

but that's not recommended
 
EYE BURN
 
user92578
void CEntitySkin::BuildRenderDescription()
{
	delete m_RenderDescription;
	m_RenderDescription = new CRenderDescriptiion(...);
}
 
3:15 PM
@Tyyppi_77 it seems to me like you're really new to C++. Try to start with something a lot more simple to get comfortable with memory management in C++. Don't try to learn everything at once. A lot of people here are giving good advice that will work as a quick fix, but it wont help you much understanding what is going on, and it will not help you make games on your own.
 
user92578
@RoyT. I've practically got a game working in C++ that I've been programming from June
 
user92578
So I'm a noob I guess
 
@Tyyppi_77 Why do you delete something, just to create a new one
Don't use the constructor as a function
 
user92578
You're supposed to delete tthe old one before reallocation, right?
 
Don't reallocate at all
You are deleting an object and then creating the same one
 
3:17 PM
@Tyyppi_77 you're supposed to do what you have to, and nothing more
 
user92578
Well to be honest my game has pretty much no memory management at all
 
replace

delete m_RenderDescription;
m_RenderDescription = new CRenderDescriptiion(...);

with:

if (!m_RenderDescription) m_RenderDescription = new CRenderDescriptiion();
m_RenderDescription->DoThatStuff(...);
 
user92578
but I'm trying to do it for every new class
 
@Tyyppi_77 is that a problem?
 
user92578
But what I'm doing is creating a new description class with updated data
 
3:18 PM
or better yet, just pull the render description fields into the parent
 
user92578
@snake5 I don't think so
 
@MickLH that is a terrible pattern
 
user92578
It'll run out of memory eventually, because all the leaks
 
@RoyT. Your words sound like those of an arrogant elitist in troll-mode.
They provide not even the slightest useful insight, and actually only cause emotional grief to everyone involved.
 
@MickLH definitely not what I'm trying to do. But your giving all sorts of hacky quick fixes now to someone who, I think, does not yet understand what is going on
@MickLH I was trying to google a good resource to use as a guide
 
user92578
3:20 PM
Like I know the basics of pointers and then the basic objects
 
user92578
references are a bit mystery for me
 
user92578
But I don't use them, so it's fine
 
He understands the very basics, but I think he he's not written his hobbyist OS yet if that's what you mean
 
@MickLH and checking for null and then allocating causes a disparity between where you initialize and where you clean up
 
I disagree, but that's not even what I care about here
I already said there are design problems, I'm not gonna beat him over the head with that
 
3:22 PM
Look guys, I'm not trying to flame anyone here. I just think that, when talking about C++, this sort of random information is often more harmful, than good. Let's take a step back. Look at the real problem, and lets help solve that
Ehm....
 
user92578
regrets asking anything since the conversation like 70% of the times lead to me beeing a noob and a bad programmer
 
I switched to giving examples which can outline the way the semantics function, I've found it seems to inspire @Tyyppi_77 to learn on his own
 
user92578
yeah
 
user92578
that's a good way
 
@Tyyppi_77 not to mention 95% of the time it leads to huge debate between people here ;)
 
3:23 PM
@Tyyppi_77 I'm sorry, I never called you a noob, its just very complex stuff you're dealing with now and I want to help you.
 
user92578
So any good pointer tutorials, when I know the basics?
 
@RoyT. Hey I hope there's no hard feelings
I'm only being viciously blunt with you because I can sense that you can handle it and undestand
 
Now I'm confused, :P what do you even know about me?
 
user92578
@RoyT. It's fine, I didn't know this was complex stuff. And I get annoyed quite quickly, any help on anything is always appreciated
 
@Tyyppi_77 everyone's a noob at something
the goal generally is to either fix or forget that, not use it as an excuse
 
3:25 PM
Anyway lets get back to the problem
 
@RoyT. Well I've observed so little that it's actually amazing how much I can infer, it's for the most part fuzzy reasoning and doesn't place literal values on most of my judgement slots, but instead places constraints between them which still contribute to the overall solution even if they don't provide concrete experiences
 
user92578
I split it to this now
 
@Tyyppi_77 what do you really want? Do I understand correctly that you want to reuse a n object over different frames?
 
@Tyyppi_77 you're not supposed to delete NULL
 
user92578
3:26 PM
Basicaly I want to create an easy class for storing information about the visuals of an entity in a simpler structure than my RenderDescription data class
 
user92578
@MickLH right, that was a brain fart
 
And in the long run, @RoyT. is right, you should be following RAII
 
user92578
Just checked if it's NULL, no sense to delete it :)
 
@MickLH ah thats the term I'm Googling, couldn't remember it!
 
:P it had to be that because there are only a few ways to stay sane while using C++ in real life
 
user92578
3:27 PM
my whole codebase is such a mess on the memory
 
@Tyyppi_77 if you add a destructor to that class, that checks if m_renderDescriptor is null and if not deletes it, that code seems OK
 
user92578
and everytime I try to add delete, I get horrible heap exceptions
 
lol
 
user92578
but it's very very true
 
user92578
horrible data structure I guess
 
3:29 PM
@Tyyppi_77 This. is like design flaws embodied into physical form, at your front door lighting a bag of dogshit
 
For every new in your code there should be an equivalent delete somewhere
 
user92578
yeah, I know that
 
user92578
well, I learned that a bit too late
 
user92578
when the codebase was already past the state where adding deletes just cause exceptions and crasches and stuff
 
What I usually do is check for each class, that at the moment they are created they initialize everything (new) and at the moment they are destructed they delete everything they have created. I often try not to let other classes take responsibility for that. Keeps you sane :)
 
user92578
3:30 PM
yeah, that's what I've tried
 
@Tyyppi_77 but if you never delete your code will always be unstable (assuming you used new at least once in your update loop)
*code = game
 
@Tyyppi_77 once you get to your feature checkpoint, don't be afraid to re-write everything and use your old code like a "tutorial"
 
@RoyT. oh, games have been shipped with worse problems than a few missing deletes
 
@snake5 true :P
 
user92578
or just "ship" and make a sequel
 
3:31 PM
@snake5 I think Watch Dogs shipped with a bug that slowly ate all video memory :P
 
but it generally helps not to touch the heap at all, if possible
 
@Tyyppi_77 yeah that's the idea, once you ship it, you have plenty of time to re-write
 
@RoyT. CoD:Ghosts definitely did
 
Well the heap is great for objects that live a long time
 
user92578
but there's no time limit for me
 
3:31 PM
had to restart it after every two levels
 
user92578
I'd like to keep this weekend as a refactoring weekend
 
I been meaning to ask about your background, @RoyT. You come off like a comp-sci guy to me.
 
user92578
re-write a lot of stuff (atleast a bit)
 
Well you can probably do a lot in a weekend
 
user92578
now should I like really write the stuff again (like in class-level) or just maybe split stuff into methods and smaller classes possibly, and clean the code?
 
3:33 PM
@MickLH agreed, people tend to cling too much to their old code at times
 
@MickLH true, mini prof. life recap: I just finished my master Game & Media Technology. Interned at Nixxes (Tomb Raider) and Abbey Games (Reus, REIS), also worked as dev creating science exhibits.
 
Nice, what kind of science exhibits?
 
@Tyyppi_77 refactoring weekends are great. Feels so good to fix all those annoyances you have with the code, and then after the weekend start with a cleaned-up version :)
 
learning things takes about 90% of the code writing process, the other 10% are for putting things in code
 
user92578
@RoyT. Life-recaps happen here too rarely :D
 
user92578
3:34 PM
@snake5 totally not me
 
@Tyyppi_77 why not?
 
user92578
I spend weeks on stupid stuff
 
well, that's learning
 
@snake5 I've always been able to re-write even my largest applications in a week after I've done it before.
 
user92578
because I haven't learnt anything? and go by trial and error?
 
3:34 PM
@MickLH same here
 
@MickLH mostly stuff that can be classified as "automated slides" but I also made a few cool things. Simulation of our solar system on a 50" touch screen, and a 'robot' that mimicks facial expressions.
 
user92578
@MickLH week of freetime if work time?
 
@Tyyppi_77 trial & error is learning too
 
*automated slide shows
 
user92578
yeah, I guess so
 
3:35 PM
@RoyT. Sweet, the vibe you bring into the room is....
I don't want to try and put words on it, but it's pleasant imo
 
user92578
The bad thing is on the weekends when I could get a lot of done, no-one is yelling me at this chat, to turn me to the right direction
 
Not an "arrogant elitist in troll-mode"-vibe? ;)
 
user92578
How do you decide what to refactor?
 
@RoyT. hahaha no that's me
 
@Tyyppi_77 hard question
 
3:37 PM
@Tyyppi_77 it's rarely possible to predict the outcome so, educated guesses, most of the time
 
user92578
like I really feel like spending the weeked just on the code, maybe only pressing f7, no f5 at all :)
 
I've refactored something many times and found out that the original version was actually better
so until you do both, you have no data
 
user92578
but like where do I start? go file by file?
 
don't start anywhere, just think of what annoys you most in the code
 
Since you said you were annoyed with how your memory is allocated/deallocated. Why not try to find the worst offender, see how it can be split-up, improved (dont be afraid to ask around) and see how that affects the rest of the code.
 
3:39 PM
@Tyyppi_77 for me, if I'm using some code and it regularly annoys me how it was set up, then I consider refactoring it
 
Be sure to make a backup before you start refactoring though :P
I seriously broke things beyond repair sometimes :P
 
with proper version control, preferably
 
the consideration depends on whether or not I think it will really help, or if it's the kind of refactoring that is endless and will prevent finishing the product
 
like git, where it's possible to make branches and stashes
and get back to the original version in a second
 
user92578
@RoyT. asking around is very difficult on weekends though; no one's here :(
 
3:40 PM
just found out my database structure for Lowest Number has a flaw, but it's not crippling until there's a TON of data in the db, and it can be dealt with later
 
user92578
I have a GitHub repo
 
so I'm putting it off until I've a least soft launched
 
@RoyT. Dude I'm totally joking, I'm not an elitist narcissist or anything like that.
 
You have to choose now, are you, or arent you ;)
 
I'm the most modest, skilled, gentle and forgiving person and if you don't believe me then fuckoff
 
3:47 PM
Mick is a hard read. Outside of incredibly intelligent I'm not sure what he is.
 
user92578
Mick is a really hard read to me, the smallish language barrier often blocks me from his true meaning
 
I'm completely joking btw, I actually am gentle and forgiving IRL, I just find it extremely hilarious leading people to judge me and then not being what they judged me as
 
user92578
Doesn't sound nice at all
 
@MickLH yeah, breaking prejudices is always fun
anyway, I should fix one horrible lightmap rendering bug
two, actually
 
user92578
I think that the entity & level relationship and both classes need a big refactoring
 
user92578
3:56 PM
UML Diagram Tool Suggestions?
 
Pen & Paper (not kidding :) )
 
^
I often opt for a whiteboard but same concept
 
lol uh oh
 
the book about what patterns are good for, instead of what they are ostensibly about
very, very good
for refactoring
 
user92578
4:00 PM
ain't nobody got the money for that
 
it turns out that people almost never use patterns the way they were originally described
oh, steal it
ebooks. easier than music or movies or games
 
you really shouldn't advocate stealing things here
 
i know
but if it's a money thing
well...then stealign becomes ok. right? right ?
 
OH AS LONG AS YOU KNOW ITS NOT A GOOD IDEA THEN I GUESS ITS OK TO SAY THESE THINGS
Not really
 
nope
then perhaps...the library?
it's just a good book, i recommend reading (but not stealing) it
 
4:01 PM
;)
 
user92578
the library in here is nut full of programming books
 
user92578
I worked the summer in the local library, and believe me, the stuff there was like about VBasic from the early 2000s
 
user92578
Is keeping the static entities in one list and the dynamic (moving) entities in one list a good idea?
 
I really came on chat because @Jon desperately needs to answer this question: gamedev.stackexchange.com/q/86349/19126
 
Jon
what is the issue, when you zoom, the offset of the background image moves?
paste your camera view matrix
 
user92578
4:08 PM
that's not Seth's question
 
user4704
@Jon The asker isn't in here.
 
Jon
oh
 
you know, since you've spent weeks solving this problem
 
Jon
you mean a day?
 
was that all?
seemed longer
 
Jon
4:10 PM
probably 2 days actually
my main issue with the bg offsetting, was becuase I was using a linear clamp across the viewport
so i dropped that
 
user4704
Meh.
 
4:28 PM
friends I need your help regarding this topic
if you are aware with unity then you can help me
 
Pretty sure we have an answer to that here
2
A: Can a UIKit application co-exist with a Unity game as a single application?

Josh PetrieThis will be improbably difficult. Unity is not a standalone view wholly contained within a UIView subclass instance; if it were, this would be easy enough, you'd just add the view as a subview when you wanted to activate the Unity game and remove it when you were done (or use any number of simil...

 
@Noctrine for you help
I think first I have to go through all these content
then if any question arise ask you another time
are you available here regularly?
 
All the time
Mod and all
There are also a number of people here who use unity, you can totally get help by posting on our main site.
 
approximate on which time?
 
These peoples need rep
Click my name
It says when I'm usually on
 
4:34 PM
I am posting questions on main website but didn't get any answer there
most time it is closed
though I have good reputation there
in 2 mins I got some path to work here
but at that I am getting only negative marking
sorry for my clear statements
and thanks for this valuable help. it is big thing for me
because from long time I can't able to find any starting point
 
Just ran through
For the most part your questions seem to be up
You've got a few that are unclear
The other problem are questions that are out of scope
If you have a question that's closed because it's unclear - and you need help clearing it up - you should stop by here. The users of the chatroom will be happy to help you.
Also, you may interact with users who can talk with you in your native language - so that they can help you clarify things.
 
 
1 hour later…
user4704
5:53 PM
I plastered the front page again.
 
looks like it might be time to buy AMZN.
"Stocks are something nobody wants to buy when they're on sale"
 
Jon
could probably wait a little more
 
"Bear markets return shares to their rightful owners"
heheh
wow the fluid thingy is fuckin cool
 
user4704
maybe they shouldn't have made a stupid phone
 
user4704
6:06 PM
(nb didn't actually read their filings so have no idea if that's contributing)
 
user4704
(but the phone is still stupid)
 
hahah :D
not quite sure what this is showing me
when I drag, invariably it ends up with these black areas
Not like it's lack of particles there, since I can still drag and get it to affect stuff in there
 
a week of modding skyrim, that's the result
might be the prettiest game I've ever played now
the mountains in the background are real too. I can walk to them and climb them.
 
wow
 
6:25 PM
and the star citizen fps team is doing an ama and making their game sound really awesome again: reddit.com/r/IAmA/comments/2k7kuu/…
 
6:36 PM
"NO BUNNY HOPPING. "
good deal
I'm a veteran Q3 player and can strafe jump really, really well, but I never really liked it as a gameplay mechanic
 
7:06 PM
woa new error from P4 i've never seen before when doing Reconcile Offline Work: "Client map too twisted for directory list."
Perforce
sorry; version control software
i've been using it for many years, and tend to assume everyone knows what it is
 
I brought in a bot for a very short period of time... decided there was no actual good use of it
 
please don't over ping me
I have not used git
but P4 is free for up to 20 workspaces, and I know how it works
 
almo, it does file locking, right?
 
yeah p4 is a file-locking thing
 
mmm...i dislike
 
7:14 PM
it's pretty old-school, I gather.
you operate with branches
 
perforce may work with git, it is not obligatory
 
and do integrates from one branch to another
my experience with Kiln was not good
I would never choose it if I could avoid it
 
lots of things sound like git, but in practice they are so, so much worse
for example, hg
 
Pip
7:32 PM
Beyond Earth llooks amazing.... much want
Lokkij got it :P
 
Jon
7:46 PM
lets pillage his house
 
Jon
They are actively saying they want to lay off 1 million employees and replace them with robots.
 
@Jon You watched Humans Need Not Apply yet?
2
 
good video, that one
 
(heh, that was my new dishwasher, link modified)
Yeah... and scary. 1 million people in China factories is only the beginning
 
7:56 PM
Why does gfycat butcher converted files so much?
keep the same fps please gfycat
 

« first day (1541 days earlier)      last day (3469 days later) »