• What are you working on? November 2011 Edition
    3,673 replies, posted
[url=http://dl.dropbox.com/u/4093439/garryfixer.user.js]Userscript to change the videos back to a sane method.[/url] Videos no longer autoplay, loop, do the really annoying mouse-over-to-hear-audio thing, and they have controls. Only tested in Chrome.
[QUOTE=Hypershadsy;33310556]Under Linux? Under cmd? Under bash.exe for Windows?[/QUOTE] Yes. I only saw it on bash.exe, so probably that.
So I was thinking of how to do animations and this is what I came up with. So animations are simply a list of textures. Any class can extend an Animatable class, and the animatable class has methods for controlling the base animation. To load animations, they're simple text files that simply give a list of textures, and delays in-between frames. Y/N
[QUOTE=Yogurt;33311232]So I was thinking of how to do animations and this is what I came up with. So animations are simply a list of textures. Any class can extend an Animatable class, and the animatable class has methods for controlling the base animation. To load animations, they're simple text files that simply give a list of textures, and delays in-between frames. Y/N[/QUOTE] This is a good way to do it, though may I recommend to save time in the future developing a tool that packs a list of textures into some other format and loading that?
[QUOTE=somescripter;33311353]This is a good way to do it, though may I recommend to save time in the future developing a tool that packs a list of textures into some other format and loading that?[/QUOTE] Could you restate that?
It can get quite messy for a project to have a bunch of textures for an animation. Instead of having: [i]textures/myanimation/frame1.jpg[/i] [i]textures/myanimation/frame2.jpg[/i] [i]textures/myanimation/frame3.jpg[/i] and so forth, you could perform the following steps: • Write a tool that zips up frames into a file such as myanimation.anim • In your code, when loading the animation, load them from the zip (myanimation.anim) Instead of having the individual frames and a text file too. Just how I'd do it, personally.
[QUOTE=somescripter;33311392]It can get quite messy for a project to have a bunch of textures for an animation. Instead of having: [i]textures/myanimation/frame1.jpg[/i] [i]textures/myanimation/frame2.jpg[/i] [i]textures/myanimation/frame3.jpg[/i] and so forth, you could perform the following steps: • Write a tool that zips up frames into a file such as myanimation.anim • In your code, when loading the animation, load them from the zip (myanimation.anim) Instead of having the individual frames and a text file too. Just how I'd do it, personally.[/QUOTE] I like it.
Yogurt, your userscript doesn't seem to work in Firefox, any clue why?
[QUOTE=somescripter;33311433]Yogurt, your userscript doesn't seem to work in Firefox, any clue why?[/QUOTE] Probably because I wrote it to chrome specifications. Or maybe firefox doesn't support @match. [editline]17th November 2011[/editline] Okay, try downloading it again?
How are you so fast, do you have some thread ajax auto-shit? [editline]17th November 2011[/editline] Still doesn't work, mate.
Try [url=http://userscripts.org/scripts/show/118092]this[/url]. First result for "facepunch" on userscripts.org, works a treat.
According to this: [url]http://bacongamejam.org/statistics[/url] I am winning the bacon game jam! That makes me incredibly proud, I will participate in the next Ludum Dare, and win that aswell!
[QUOTE=TheCoast47;33295917]-rigid body physics stuff-[/QUOTE] I know I'm a bit late, but just a note. In case you start working on it again, don't use Euler integration, it's not very accurate. [url=http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods]RK4[/url] is not much harder to implement and is much more accurate and usually more effective. For a sample implementation and more details on Euler vs. RK4, check [url=http://gafferongames.com/game-physics/integration-basics/]this page[/url]. e: Actually, I'm not really sure. RK4 is probably an overkill for what you're doing and might not really benefit you.
[QUOTE=raBBish;33312952]I know I'm a bit late, but just a note. In case you start working on it again, don't use Euler integration, it's not very accurate. [url=http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods]RK4[/url] is not much harder to implement and is much more accurate. For a sample implementation and more details on Euler vs. RK4, check [url=http://gafferongames.com/game-physics/integration-basics/]this page[/url].[/QUOTE] I thought this was the programming thread, not the rocket science thread
[QUOTE=DrLuke2;33312981]I thought this was the programming thread, not the rocket science thread[/QUOTE] Did you even look at the link for RK4? It's very simple. If you find that "rocket science" then you can't be much good at anything maths-y in programming.
[QUOTE=Chris220;33313407]Did you even look at the link for RK4? It's very simple. If you find that "rocket science" then you can't be much good at anything maths-y in programming.[/QUOTE] To be fair, wikipedia makes math look harder than it is.
[QUOTE=raBBish;33312952]I know I'm a bit late, but just a note. In case you start working on it again, don't use Euler integration, it's not very accurate. [url=http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods]RK4[/url] is not much harder to implement and is much more accurate and usually more effective. For a sample implementation and more details on Euler vs. RK4, check [url=http://gafferongames.com/game-physics/integration-basics/]this page[/url]. e: Actually, I'm not really sure. RK4 is probably an overkill for what you're doing and might not really benefit you.[/QUOTE] I saw a comparison of the different integration methods somewhere and the results from RK4 were pretty disappointing. In the time it took to run through RK4, you could do several iterations of Euler (smaller timestep) and get better results. [url=http://codeflow.org/entries/2010/aug/28/integration-by-example-euler-vs-verlet-vs-runge-kutta/]This was the page I was thinking of[/url]
still the same frame rate but every sprite has a tintcolor now [img]http://dl.dropbox.com/u/28308500/Pics/vbotest.png[/img]
Got bored and made a pathfinding program since I've never done that before. [t]http://puu.sh/8Pbi[/t] [t]http://puu.sh/8Pbp[/t] [t]http://puu.sh/8Pbw[/t]
[QUOTE=Chris220;33315139]Got bored and made a pathfinding program since I've never done that before. -snap, imgs-[/QUOTE] Algorithm?
[QUOTE=Perl;33315244]Algorithm?[/QUOTE] BFS for now, gonna add a heuristic later on to make it faster and more accurate. [editline]17th November 2011[/editline] Although it's pretty fast already, which surprised me a little. Based on the algorithm, I was expecting it to not run in real time like it does.
[QUOTE=Chris220;33315295]BFS for now, gonna add a heuristic later on to make it faster and more accurate. [editline]17th November 2011[/editline] Although it's pretty fast already, which surprised me a little. Based on the algorithm, I was expecting it to not run in real time like it does.[/QUOTE] Considering the apparent size of the structure, I'm not surprised it seems fast. The differences between the algorithms build up quite rapidly as you increase the scale of things, though.
[QUOTE=Chris220;33315295]BFS for now, gonna add a heuristic later on to make it faster and more accurate. [editline]17th November 2011[/editline] Although it's pretty fast already, which surprised me a little. Based on the algorithm, I was expecting it to not run in real time like it does.[/QUOTE] And you're not going to get more accuracy with heuristics. BFS will always find the best solution.
What would be the best algorithm for pathfinding when you want it to be fast to run(work in real time without noticeable framedrops) and relatively easy to implement?
[QUOTE=Richy19;33316239]What would be the best algorithm for pathfinding when you want it to be fast to run(work in real time without noticeable framedrops) and relatively easy to implement?[/QUOTE] Progressive A*. The use of a heuristic function makes it viable in even the most demanding situations. Unfortunately, it doesn't work well with portal-style systems, if that's a requirement.
Hm, I was under the wrong impression of what a heuristic would improve upon :P Thanks for the advice, guys. I appreciate it! @Richy: It may not be the fastest in big situations but BFS is ridiculously easy to implement. I recommend giving it a go, since you can easily build upon it afterwards to make other algorithms.
[img]http://i.imgur.com/Poz4u.png[/img] Weapons can be equipped once again. Rewrote lots of stuff so I don't have anything new to show. Going to work on some interesting stuff this weekend.
I'm dedicating my 2000th post to this thread because programming is just [I]awesome[/I].
[QUOTE=Mr.T;33316959]I'm dedicating my 2000th post to this thread because programming is just [I]awesome[/I].[/QUOTE] You're welcome :)
Desura's build system doesn't impress me.
Sorry, you need to Log In to post a reply to this thread.