« first day (1535 days earlier)      last day (3475 days later) » 

3:00 AM
when I discovered LERP, it was a good day
 
MLM
If you instead want lerping, it would be:
CameraTransformWrap.Y = Mathf.Lerp(CameraTransformWrap.Y, this.targetYPosition, .1f * Time.deltaTime);
 
The only jarring thing to me in the gif isn't the camera but the fish's first jump
I think the camera looks decent
 
yeah camera doesn't look bad to me
 
3:03 AM
You're losing your mind John
 
The "jerk" is in the water moving away quickly during the second skip
 
that doesn't look bad to me
 
MLM
I see it. It is more of a tug
 
yeah, a tug would be a better word
 
MLM
Does my snippet mitigate the issue?
 
3:05 AM
Code MLM provided I think would help if you play with the numbers
 
just giving it a try. Bah, why are perfects so hard to get?
 
because almost perfects are better
 
Indeed
 
The last idea I have is do the math to predict how long it will take for skippy to reach the peak of his jump and just adjust the camera position at a constant rate based on where the peak of his jump will be and how long it will take to get him there
 
MLM
You could move the camera at the same acceleration as the fish
 
3:14 AM
From my brief tests, this feels right:
	float cameraFixedPos = SkipperTransform.position.y - 1.6f;
	float cameraFlowPos = SkipperTransform.position.y / 4;
	if (cameraFixedPos > cameraFlowPos)
	{
		targetCameraY = cameraFixedPos;
	}
	else
	{
		targetCameraY = cameraFlowPos;
	}
	CameraTransformWrap.Y = Mathf.Lerp(CameraTransformWrap.Y, targetCameraY, Time.deltaTime * 5);
 
new gif pls
 
looks good to me
 
Looks smoother for sure
 
I concede. I see what you mean now
It didn't bother me before but I'll agree this version is better
 
3:21 AM
It's possible for the fish to go off the screen if you get a good skip, but I donno, I think I like it
 
your lerp could be higher, i think
you're at .08, you could do .09 or .1
 
MLM
Use the difference between the camera and fish as the scalar
 
lol, captured this at the perfect time:
 
MLM
Instead of just 5
 
3:23 AM
@MLM that just gives your curve e^-x^2 instead of e^-x
not necessary, really
a higher rate will drop off equally well
 
@SethBattin What's this? I don't follow
 
each frame, you move .08 of the way to your target
 
MLM
Yes but smoother in all situations if you use the diff
 
so you approach it as if your difference in position was an expoential decay
er, you approach the final position by a curve that looks like e^-x
if you approach it by a factor equal to their separation, that becomes e^-x^2
which....i don't think it's require, MLM thinks it's better
it's not a right or wrong type of thing
 
MLM
There is always clamp for a min
 
3:27 AM
sorry john, i answered the wrong question
so, elapsed time is about 16 ms
you multiply that by 5
you get a rate of 0.08
you know...sort of
i just think you could go a little higher
 
right
 
i used to have an excel spreadsheet to tell me how many frames it would take to reach .9 of the distance, .99, etc
i probably can't find that
 
Alright, did some experimenting with diffs and different consts, -1.5 and lerp delta * 6 seems to look good. Keeps the fish in sight, and doesn't tug the camera too much
Thanks guys!
:D I think I can call this Done!
 
awesome
congrats
 
looks nice
 
3:40 AM
Now, if I could only get a perfect on my phone. Gah
 
extra bit about Sucker Punch.. it makes me feel kind of sick when I think about it. The subject really is disturbing.
 
"Not Great", "Poor", "Good", "You suck", "Stop trying", "Just give up", "Perfect! but you're dead anyway", "Good", "chomp chomp chomp"
 
@JohnMcDonald link to the app store when it's up
 
YESSS GOT One!
I'll be linking the crap out of it, :p
It'll be released this Sunday for Androids
 
why sunday?
you said done. i am disappoint.
 
hm...if you say so
 
It'll be in beta in like 3 hours though, give or take
You in the beta?
 
i do not know, so probably not
 
It's a 2-step process. Request to be a beta tester in G+, then Opt-In and download
Google does the beta/alpha stream permissions through G+ groups
 
of course it does
 
3:49 AM
I'll say: It works really well for me. If users have an issue, they post there, then all beta testers can see it and reply
 
i don't have any problem with g+, i just notice how forceful google is with integrating it
 
:/ yeah
 
the download it from the playstore link was broken, is that because you're pushing a new version right now?
 
heh, it was broken? yeah. I literally just uploaded the new one
"Your application has been published. It can take several hours until it is available throughout Google Play."
Donno if you'll get the new version right away or not
and, since I didn't put the version # in the game anywhere, it's only really possible to tell by what the game does
 
i was able to download the previous version
 
3:55 AM
If Skipper goes off the screen: old version
Alright
 
so, when do you have to license unity?
 
After I make $100,000 in a single year
I hope I'm forced to license Unity one day
ppplleaaase
lol
 
fyi: I've made the ads less obnoxious in the next version
 
Man, what a week.
 
4:01 AM
yeah?
 
Yeah. With driver's license, shit ton of school work, and coming back here, things are really looking up.
 
Yep
 
@AttackingHobo Have you tried ksp career mode yet?
 
@AidanMueller :D Fun Times
 
4:07 AM
What?
 
ksp career mode
 
You make it sound like something bad happened.
 
with a ":D"
*some kerbals may have died in the making of my career
 
I haven't killed any yet.
Well, I have, but I revert.
And it only happens in tests.
 
Daamn. Lucky you. I played a while back, when rockets were still a little unstable, so... just a few died during launch.
 
4:10 AM
@JohnMcDonald I think they did a good job at implementing it.
@JohnMcDonald I am talking about the 0.25 career.
 
There's one on the mun, and a few just flying around (I think)
Yeah, I've played both
:/ I should eat
 
@JohnMcDonald Send in a rescue mission.
 
heh, How do you send an extra seat?
 
Either send a multi-person capsule, or just put two capsules on top of each other.
 
but, a multi-person capsule launches at capacity, no?
 
4:16 AM
@JohnMcDonald When you click on the launchpad, there is options for seating arrangements. You can also change these settings from the crew tab in the VAB.
 
Hunh, that might be new(ish)
 
Nope. Been there since at least 0.23.
 
:/ I don't even remember when I started
anyway
Thanks for the info, :)
 
@JohnMcDonald You can also do this ^.
I rendezvoused with 2 kerbals in orbit (for a contract that I accepted) like this.
It allowed be to store extra eva reports.
Whenever I go up, I try to do as much stuff as I can at once so that I save money on launches.
 
 
2 hours later…
user92578
6:18 AM
Morning
 
evening
well, no, i guess it's morning
 
user92578
yeah. if it's morning for me, it's morning for you
 
user92578
6:58 AM
GunHero Entity Editor: Now with 100% more HitBox Visualization!
 
user92578
 
9:22 AM
@SethBattin thx
I don't think the problem is the refactoring as such
just the fact that the code I have is not a design that makes any sense to me
really I should start again with the bits I hate
 
 
1 hour later…
10:30 AM
@Tyyppi_77 looks nice, you sure are productive :)
 
user92578
yeah, it looks nice, not that much functionality yet though
 
user92578
but it'll probably work fine by the end of this dev day
 
Wish I could spend my day programming stuff like that
Stuck editing the final part of my thesis
So boring
 
user92578
c# is a nice language to use for prejects like these
 
user92578
fast to dev, easy to write
 
10:32 AM
I love C#
I started out in VB6 (yeah really) dabbled some in C, C++, and Java. But ultimately I keep coming back to C#
 
user92578
Are you familiar with .NETs XML API?
 
Though C++ definitely has its uses, when used with caution
I am to some degree
 
user92578
do you have a moment to help me a bit?
 
Used a lot of it when I worked at Nixxes (on the Tomb Raider reboot)
(they were rewriting all their tools into C# at the time, and their asset pipeline used a lot of XML)
Sure
 
user92578
I need to create a XmlElement like this: <Type>EnemyType</Type>
 
user92578
10:34 AM
But I'm confused with the prefix stuff the constructor takes
 
Let me launch VS
Why are you using XmlElement and not XmlNode btw?
 
user92578
I have no idea what to use, so I have yet to try enything
 
And how on earth are you using the construct that takes a prefix? Its marked as protected internal I think :)
 
user92578
ah
 
user92578
I need to use CreateElement() on the document
 
user92578
10:38 AM
but is the prefix "Type" in my case?
 
1 sec
reading through old projects, how I did this :P
 
user92578
Or is there like a super easy way to get data from a property grid and convert it to XML?
 
user92578
ah, that makes sense :)
 
user92578
thanks for that
 
You could use the XMLSerialization
on the backend store of the property grid, methinks
But I've never used property grids :)
 
user92578
10:45 AM
Because doing this for every attribute is quite annoying:
 
user92578
            XmlElement typeElement = entityDoc.CreateElement("Type");
            typeElement.InnerText = m_PropertyGridValues.EntityTypeNames[(int)m_PropertyGridValues.Type];
            entityElement.AppendChild(typeElement);

            XmlElement speedElement = entityDoc.CreateElement("Speed");
            XmlElement xElement = entityDoc.CreateElement("X");
            xElement.InnerText = m_PropertyGridValues.Speed.ToString();
            XmlElement yElement = entityDoc.CreateElement("Y");
 
I can imagine
Can you create a class that backs the property grid?
Because you can super easily serialize and deserialize properties in C#
 
user92578
basicaly I have a class EntityPropertyGridValues that has properties for every property in the property grid
 
Easy
Let me back up an example
 
@Tyyppi_77 OUCH !!!
my eyes are bleeding
use linq to xml @Tyyppi_77
 
user92578
10:52 AM
You should see my C++ code for all the XML that goes on there...
 
user92578
You'd shoot yourself after that
 
var el = new XElement("element name", "value");
 
then you can simply do el.ToString() later if you want to get the full xml
 
I think that covers almost everything
 
10:54 AM
makes life so much easier
 
And shows how extremely simple it is
@Wardy XElement and Xml... dont mix and match, right?
 
user92578
How about enums? What gets saved? The number in the background or the actual name?
 
I wouldn't use them both together
it can be done but its evil
 
Enums are ints
unless otherwise stated
public enum something : byte {a, b, c} for example
 
in linq to xml its the result of .ToString()
 
10:56 AM
I think they are serialized just as the other stuff
 
so you'd probably want to cast first
i just like the fact that I can build whole xml docs but creating new elements in the second param
it makes for more "xml like code"
purely from ram in my head but i'm sure I remember doing something like this ...
var el = new XElement("foo",
    new XElement("bar", "some value"),
    new XElement("yup", "some other value")
);
 
user92578
BTW your thoughts on this?
 
user92578
String fileName = FileNameEntryBox.Text.Equals(string.Empty) ? FileNameEntryBox.Text : "Save1.xml";
 
what you trying to do ?
specify a default value ?
 
user92578
yeah
 
10:59 AM
what happens if "Save1.xml" already exists ?
 
user92578
if the box is empty
 
in that case it would replace the existing file
 
user92578
I don't care
 
fine
go with it then
lol
 
@Wardy that indeed looks XMLy, I had never used the X... parts of the XML apis
gotta give it a try sometime
 
11:00 AM
I would save using something like Save{0}.xml where the param can be dynamically figured out
@RoyT. I found it a lot simpler to work with but the best bit ... its xml and linq ready
so you can load in a random xml string then query it
var el = XElement.Load("some xml");
var result = el.Where(some condition);
in my case I was doing a lot of that
 
user92578
Omg this works so perfectly
 
your conditions can be anything from xpath expressions to normal logic
 
user92578
Is there a way to change the header elements tag name?
 
user92578
without changing the name of the class?
 
user92578
I guess I could do that too
 
11:02 AM
There are loads of ways to customize the outputted XML
You can also change stuff from properties, to attributes, to arrays, etc...
Dozens of annotations are available
 
normally using attribs if you're going the old xml way
 
And indeed giving it another name is possible as wel, I think so
 
yeh theres an attrib for that too
dammit ... im trying to port my voxel code back in to unity without changing it
but unity don't have any support for the tasks api in .Net yet
that API is evil
when trying to implement it :(
 
user92578
OMG I like C# for this stuff so much
 
@Tyyppi_77 did you know you can use the same system to serialize to JSON and INI and BLOB?
:)
 
user92578
11:08 AM
I like XML
 
Just shows how flexibile it is
 
user92578
Ah [System.Xml.Serialization.XmlRoot("Entity")]
 
user92578
I have a path like this: E:\Devel\Workspace\Visual\C++\GunHero\GunHero\Resource\Entity\Enemy.png
 
user92578
How do parse that to remove everything before "Resource"?
 
I didn't pay my last spotify premium, and now that my premium ended I instantly regret that
 
user92578
11:13 AM
u no like ads?
 
fucking annoying ads after every two tunes, and finland has like two of them playing so it's even more annoying
 
user92578
I haven't had an ad in like an hour...
 
user92578
have you stolen my ads?
 
I've heard like 5 in the past hour
I guess they are trying to annoy me back to premium
 
user92578
yeah
 
11:16 AM
I switched to youtube for now, screw spotify, they don't even have the albums I want to listen to available in finland
every week I logged in and noticed that some new tunes have been disabled because I'm in finland
 
@Tyyppi_77 now that is a hard question
Maybe there is some custom XML serialization step available?
 
user92578
How do I initialize a char array in C#?
 
user92578
char[] sep = "GunHero/GunHero/";
 
user92578
I think String.Split() will do the job
 
string sep = "somethingsomething";
 
user92578
11:19 AM
Split() needs a char[]
 
why split?
 
user92578
E:\Devel\Workspace\Visual\C++\GunHero\GunHero\Resource\Entity\Enemy.png I split this at "GunHero\GunHero\" and then take second part
 
I'd use replace if you just want to remove a string
I think split will split it up from every character in the array
like if you had "a" in there, it would split it on every a it finds
 
Don't you guys know C#? :P
 
This C#, friend of yours?
 
11:21 AM
file = Path.GetFileName(path);
path = Path.Combine("Entity", file);
 
@Tyyppi_77 you can split on strings
 
Something along those lines. :P
 
its one of the overloads
 
user92578
This isn't working for some reason: value.Replace("E:/Devel/Workspace/Visual/C++/GunHero/GunHero/", "")
 
Don't use it then.
The Path utility class is for just this kinda stuff :P
 
11:22 AM
Thats because its a "\"
 
user92578
ah
 
@William'MindWorX'Mariager we don't want to combine paths, we want to get rid of the exact path and convert that to relative
 
and replace is not inplace
 
user92578
But I can't use "\" in C# strings
 
Path.GetRoot or something
or GetRelative
 
11:22 AM
you can use \\
 
USE THE PATH UTILITY CLASS DAMNIT!
 
What William says!
 
yes!
 
Seriously, with this approach, you're getting very specific non-crossplatform solutions.
Path works in all environments.
 
user92578
So how do I get rid of part of the string then with Path?
 
11:24 AM
 
What are you trying to do btw?
 
user92578
I need to get "Resource/Entity/Enemy.png" from "E:\Devel\Workspace\Visual\C++\GunHero\GunHero\Resource\Entity\Enemy.png"
 
Why do you have the full path in the first place?
 
user92578
the angle of the slashes doesn't matter
 
user92578
@William'MindWorX'Mariager file dialog returns it
 
11:25 AM
The code I linked does exactly what yopu want
 
I had this problem many times :)
its from SE but the original had a bug
 
user92578
So how do I store the fullpath, but display and serilialize the short path?
 
its still ugly code though
 
user92578
doesn't matter, it works :)
 
11:28 AM
Not sure
 
user92578
Ah, got it to work
 
user92578
Now to make the bottom bar somehow pretty and more functional:
 
user92578
 
user92578
11:45 AM
Added a background and an icon:
 
user92578
 
user92578
it's done?!?
 
V2 will be done today
Just procrastinating with the cover again
just need to restructure the conclusion and appendix
 
awesome tune drop:
 
11:57 AM
@RoyT., Looks like you'll be the guy to ask about pathfinding stuff :P
 
user92578
yeah
 
Jon
12:10 PM
typpi
 
user92578
Hi @Jon
 
@William'MindWorX'Mariager that might be a correct assumption :P
 
user92578
Why in the world is my SaveFileDialog acting as a OpenFileDialog
 
Jon
you write that entity editor?
 
user92578
yeah
 
Jon
12:20 PM
worth it?
 
user92578
Well it's nice to get off the game project for a while
 
user92578
And it's cool to have selfmade tools
 
user92578
but probably not
 
user92578
This is a good practice for a CutScene Editor that will probably come next
 
Jon
12:31 PM
so you haven't done much gamewize then
?
 
user92578
none today
 
user92578
but developing tools to help in the actual development is going to be helpfull
 
Jon
just don't get caught up in them
 
user92578
ill try my best
 
user92578
Aight loading and creating new entities works fine
 
Jon
12:35 PM
 
user92578
now saving and I should be good
 
user92578
lol
 
user92578
Aight, it works now
 
user92578
 
user92578
1:03 PM
How do I pack my tool to one exe?
 
user92578
So publish or something?
 
its visible
Into one exe?
Ehm
No clue :)
Publish will just make a lame "ClickOnce" app from it
 
user92578
That might work if I can change the task bar icon for that
 
user92578
Aight, works now
 
Jon
1:41 PM
yeah its visible, i upvoted
 
f*ck, why is writing so hard
 
user92578
@Jon thanks
 

« first day (1535 days earlier)      last day (3475 days later) »