• Programming - WAYWO - V.37
    1,000 replies, posted
[QUOTE=ThePuska;40244052]Not exactly. You can locally approximate the function [img]http://latex.codecogs.com/gif.latex?f(x)%20=%201%20-%20\exp(-cx)[/img] with some linear function [img]http://latex.codecogs.com/gif.latex?p(x)%20=%20ax%20+%20b[/img], so if the variance in the time variable remains really small, you can get away with it. Expanding the f(x) to a Taylor series centered around zero and taking only the linear and constant terms, you get the linear function that best approximates it around x=0: [img]http://latex.codecogs.com/gif.latex?p(x)%20=%20cx[/img] So the equivalent linear approximation for the code [cpp]double d = 1.0 - exp(dt * log(k)/t); // log(k)/t is constant LastPos = Vector3.Lerp(LastPos, To, d);[/cpp] would then be [cpp]double d = (-log(k)/t) * dt; // (-log(k)/t) is constant LastPos = Vector3.Lerp(LastPos, To, d);[/cpp] But this is a good approximation only for dt very close to zero.[/QUOTE] Hey. I'd just like to say that you were one of the reasons why I decided to study math. Thanks.
To help improve performance and also to make it easier to port my game away from flash later I've been working on a system that generates sprite sheets from Flash MovieClip animations. Adobe Flash CS6 comes with some sprite sheet generation but the animations I have in my game are very dynamic (holstered weapons show on the character's back, hats, etc) and generic sprite sheet generation just wouldn't work for them. This also allows me to easily export sprite sheets for larger resolutions (as the graphics were already drawn for a small flash window). [IMG]http://i.imgur.com/Tz1GJfo.pngp[/IMG] It goes through all of the exported MovieClips and generates a sprite sheet for each, taking note of all nodes (such as bullet spawn point nodes on weapons) and special animation "nodes" (such as the head and weapons), their position/rotation/depth each frame and makes sprites sheets for them as well. The screenshot above shows the application that let's me go through all the generated sheets. I have registration points (blue dots), nodes (green dots and green tinted sprites) and grey boxes turned on so I can tell if they were generated properly. [IMG]http://i.imgur.com/UI326GU.png[/IMG] With a press of a button all the sprite sheets are saved in directories based on their names (eg: the image below is located in sprites/characters/rupert). [IMG]http://i.imgur.com/3y1CNrB.png[/IMG] Now I need to make it export an xml file for each sprite sheet.
Very good idea. Haven't really found anything that can match flash in terms of the clean animation/style you can get.
Ugh I'm trying to make a Julia fractal generator run on several CPUs parallel to each other. Yeah it's running on separate threads now. But the generated image? [IMG]http://i.imgur.com/pdDC8Fx.png[/IMG]
[QUOTE=Swebonny;40246355]Ugh I'm trying to make a Julia fractal generator run on several CPUs parallel to each other. Yeah it's running on separate threads now. But the generated image? [IMG]http://i.imgur.com/pdDC8Fx.png[/IMG][/QUOTE] Bitcoin price graph.
[QUOTE=mlbfan560;40246444]Bitcoin price graph.[/QUOTE] My heartrate.
[QUOTE=HubmaN;40242919]Oh god, love.filesystem's sandboxing makes my blood boil. Emasculate io and os in your boot code, or don't bother at all.[/QUOTE] I haven't worked with LOVE, what about it is annoying you?
[thumb]http://i.imgur.com/ESwuEPV.png[/thumb] Man I suck at this. Now I've divided it into chunks. But it only renders up to a certain part. Probably easily fixable.
We moved into a new office today. Much smaller than the one before. The new place is an open shared space. Were as before we had the floor of a small building to ourselves. I should get pictures of the old office before its demolished. Until we hire more people. Really a single office room is enough. If it gets too cramped one of us can move out into one of those desks in the open area. [t]http://i.imgur.com/xu2FiT5.jpg[/t] [t]http://i.imgur.com/dNxEHdF.jpg[/t] [t]http://i.imgur.com/7AnC3KB.jpg[/t]
I made some particles today, fairly proud with how they turned out. [video=youtube;dYBxaYWeOoQ]http://www.youtube.com/watch?v=dYBxaYWeOoQ[/video]
[QUOTE=garry;40243867]Got my unity scene save system working! PICTURES You add a member to your class and init it.. PICTURES And then add the functions.. PICTURES Instead of writing some keyname system I decided to do it in pure ordered binary and add versions. I'm not totally happy with the actual usage of it - so I'm gonna have a fiddle with that to see if I can make it a bit friendlier. I like defining specifically which values to save and load, I just don't like all the initialization bullshit. One downside is that this doesn't save/restore any entities that aren't part of the map. But I don't need it to. (yet anyway).[/QUOTE] You should use the proper C# inline documentation when documenting functions, then it shows in intellisense. GhostDoc will insert an autogenerated comment if you hit Ctrl+D, which is easier than typing it out by hand normally. [CODE]/// <summary> /// Called when saving /// </summary> /// <returns> /// 1 when successful; 0 otherwise. /// </returns> int DoSave() { if(saveLoad == null) return 0; saveload.WriteGameObject(currentNode); return 1; }[/CODE]
[QUOTE=HubmaN;40242919]Oh god, love.filesystem's sandboxing makes my blood boil. Emasculate io and os in your boot code, or don't bother at all.[/QUOTE] I don't get why love does any sandboxing at all.
[QUOTE=Map in a box;40248391]I don't get why love does any sandboxing at all.[/QUOTE] Why shouldn't it? Games only need to write save files, screenshots, and settings - all of which go in a specific OS-dependent folder. There are not many "kosher" program-writable directories on modern operating systems. LÖVE's filesystem sandboxing has the dual purpose of standardizing file paths and locations written in the Lua code, while also making sure accidents don't happen where files end up being written to or read from all the wrong places.
[QUOTE=Jimmylaw;40248182]I made some particles today, fairly proud with how they turned out. -video-[/QUOTE] Damn it that Skype message alert. Made me look even though Skype isn't even on. :v:
Refact0red saving/loading code. Went from this: [img]http://i.imgur.com/ovKVmL7.png[/img] to this: [img]http://i.imgur.com/p8sZHFc.png[/img] [editline]12th April 2013[/editline] ack god, sorry for dpi settings.
garry don't you know how to use the code tags on your own forum
code tags zuck
[QUOTE=ShaunOfTheLive;40249566]garry don't you know how to use the code tags on your own forum[/QUOTE] code tags are for casuals.
we should all post our code in instagram-style edit: stop disagreeing with me
[QUOTE=garry;40249490] -huge screenshot- [/QUOTE] Wow. What resolution is your monitor?
[img]http://x2048.com/screenshots/macgame.png[/img] Manatees Against Cards 2.0 finally finished! Added loads of stuff: - Server list - Game Options (Point cap, seconds per turn, decks to use) - /kick, /mute, /unmute commands added - Loads of polish - Many, many bug fixes - Other stuff I forgot about It's uploaded here: [url]http://x2048.com/project.php?id=6[/url] (Now to promote it...)
Who wants to play a game then?
[QUOTE=slime73;40248838]Why shouldn't it? Games only need to write save files, screenshots, and settings - all of which go in a specific OS-dependent folder. There are not many "kosher" program-writable directories on modern operating systems. LÖVE's filesystem sandboxing has the dual purpose of standardizing file paths and locations written in the Lua code, while also making sure accidents don't happen where files end up being written to or read from all the wrong places.[/QUOTE] Because it removes usefulness if you have to use other directories.
[QUOTE=Map in a box;40249892]Because it removes usefulness if you have to use other directories.[/QUOTE] What other directories would those be? Would they be used in the sort of situations LÖVE was designed to be used in (multi-platform games)? Do they even exist on all platforms? Would the API still be nice and consistent if they were easily accessible? Can sandboxed environments (iOS, Android, Mac App Store, Windows 8 store) access those directories?
[QUOTE=garry;40249588]code tags zuck[/QUOTE] Then make them better :v:
[thumb]http://i.imgur.com/nHFVeeq.png[/thumb] One last picture. I've divided the rendering into small squares as you see on the picture. Each square is calculated by separate threads. Thought it was pretty cool.
[QUOTE=slime73;40249970]What other directories would those be? Would they be used in the sort of situations LÖVE was designed to be used in (multi-platform games)? Do they even exist on all platforms? Would the API still be nice and consistent if they were easily accessible? Can sandboxed environments (iOS, Android, Mac App Store, Windows 8 store) access those directories?[/QUOTE] All yes. What if you want to access a file in the OS directory? Maybe program files? Anything a LOVE application would want to use. LOVE should be removing restrictions, not adding them
[QUOTE=slime73;40249970]Would they be used in the sort of situations LÖVE was designed to be used in (multi-platform games)? Do they even exist on all platforms? Can sandboxed environments (iOS, Android, Mac App Store, Windows 8 store) access those directories?[/QUOTE] [QUOTE=Map in a box;40250595]All yes.[/QUOTE] [QUOTE=Map in a box;40250595]program files[/QUOTE] What. Program files only partially exists on OS X, is several different places at once in Linux, is two separate places in Windows depending on OS and architecture, and is not available for access at all on iOS. In any case, you're free to fork LÖVE and make that fork suit your needs, but that particular need is not something that integrates well at all with LÖVE's philosophies.
It was just an example. Don't single out one thing to prove me wrong, because the uses are unlimited. Why is there a filesystem in the first place if you can't read files created by other programs?
What the fuck? Flow Player's page is streaming a full length movie for me. (Buffalo Soldiers) [url]http://flash.flowplayer.org/plugins/streaming/rtmp.html[/url]
Sorry, you need to Log In to post a reply to this thread.