Questions tagged [animation]

For questions related to graphical animations. This includes, but is not limited to sliding, tweening, rotating and resizing of shapes.

Filter by
Sorted by
Tagged with
8
votes
2answers
507 views

Taking flight with JavaFX

Just another step in my educational Trek. I didn't know when/why I would use the transparent feature and in experimenting with it, I made this. This one was fun to behold once done. It's an animated ...
8
votes
1answer
622 views

JavaScript canvas sphere

I made a small demo in JavaScript using HTML5 canvas, which renders a rotating sphere. The sphere is generated by first creating a set amount of points (currently 50, represented by vectors) randomly, ...
8
votes
1answer
266 views

Sierpinski triangle html canvas Implementation

I wrote my Sierpinski Triangle fractal animation using HTML canvas with JavaScript: JsFiddle What do you think about it? How I can optimize it, if you see a need for that? Code: ...
7
votes
3answers
9k views

Simple random falling object animation in Java

I am new to programming but I tried to make my code as readable as possible! Hopefully you can see what it does before you run the program. I did not implement an ups or fps controller, the animation ...
7
votes
4answers
2k views

Animated scrolling when intra-page links are clicked

I have the following code to get the ID of a <a href="#ID"> </ a> and go to their respective div <div id="" />:...
7
votes
1answer
2k views

Optimizing very simple piece of “Game of Life” code by taking advantage of NumPy's functionality

Here is the code as it stands right now: ...
7
votes
2answers
438 views

jQuery plugin to cycle through text and “typewrite” it out

I have written a jQuery plugin (my first for a long time) that simply cycles through strings of text in a data attribute and uses setInterval to type it out - it's ...
7
votes
2answers
397 views

2D falling snow animation

I was hoping that someone could review this code. My main concern is that the contents of main() are difficult to read. I thought about extracting some segments of code into functions (to aid ...
7
votes
1answer
169 views

Upgrading animation code

I understand that this animation code is outdated: ...
7
votes
2answers
301 views

Cleaning up and commenting on my code for Pong game

This post is a follow-up to Simple Pong game I took the some advice from the previous post and I'm almost done with cleaning up the code. I didn't make any wrapper classes, because my game is already ...
7
votes
2answers
553 views

Animating a block of HTML on scroll

I'm pretty new to client side scripting and I'm still learning. I've written this JS plugin which animates blocks of HTML (fade-in from left/top/right/bottom) as you scroll down the page. Everything ...
7
votes
2answers
31k views

Check image dimensions, calculate aspect ratio, set image dimensions, resize

I have created a set of functions to calculate the aspect ratio of an image, set a height/width on document.ready and on ...
7
votes
1answer
296 views

A partially overlapping sequence of jQuery animations

I know this is a mess! How can I write this code better? ...
7
votes
1answer
277 views

Time delay indication bar for a text game

For a game I am writing in Python 3.6.5, I made a text-based animation to indicate the passage of time (when chopping a tree or mining a rock, etc). I did a lot of trial and error to get the output ...
7
votes
2answers
2k views

Sprite animation for a game

I'm just getting started with XNA and game development in general. I followed these instructions to create a basic game, then this article to get sprite animations working. Now, I'm trying to ...
7
votes
1answer
1k views

Algorithm simulator (bubble and selection sorts)

I am concerned where it can be improved. Main concerns are coding style. Any other improvements are welcome too. Priority is on JavaScript, review for HTML/CSS are welcome too. What it does: ...
7
votes
1answer
324 views

Runner 1-bit game in Python like the offline chrome dino

I made this little game to test if my Nokia 5110 screen can handle games. As in handle many frames per second/game loops. I am using a library made for this screen called Adafruit_Nokia_LCD These ...
7
votes
1answer
2k views

Scroll animations - setInterval vs. setInterval & requestAnimationFrame

I've recently made a slightly similar question with respect to the rendering performance, however my question this time is a bit different and with respect to which kind of JavaScript approach is the "...
7
votes
1answer
114 views

Animating a 2D particle “web”

I have written a small class to generate and animate one of those trendy particle webs. I plan to use this as the main background of my personal website, so naturally I'm concerned about the ...
6
votes
3answers
1k views

Bouncing ball simulation

I was fooling around with some maths and realized that I could use a parabola to represent a bouncing ball. So, naturally, I decided to make it in code. ...
6
votes
2answers
1k views

Animation of java.awt.Polygons

I made a class capable of moving Polygons around on a Polygon in a mostly smooth manner. Disclaimer: this was part of a school project (thus the use of Polygon rather than Image), but this code is ...
6
votes
2answers
172 views

Java game development image animation

I was wondering if someone could look at my animation for me to see if I am doing it correctly. I am currently programming a basic game in Java, nothing fancy though, and I just want to get the ...
6
votes
3answers
1k views

“Group” animation events in jQuery

I have a number of jQuery animation effects applied to certain elements on the page: ...
6
votes
3answers
693 views

Rotating 3D wireframe

This code consumes a lot of CPU. Could you tell me where it is possible to improve the code or change the way rendering? Or it is possible to reduce the overhead of calculations? If you are using ...
6
votes
2answers
226 views

pydoro - terminal tomato timer

I've recently created a tomato timer for terminal. It's hosted in github. My concerns are how Pythonic my code is? Is the way I'm handling state transitions good? Which areas of the text user ...
6
votes
1answer
4k views

UIButton subclass with animated 'shimmer' effect

In earlier versions of iOS the lock screen had a 'slide to unlock' element which I'm referencing as a 'shimmer' effect. The effect I'm looking for is simpler: Button starts with single color (e.g. ...
6
votes
1answer
221 views

Golf Physics “Game”

Continuation of this post I wrote a program in pygame that basically acts as a physics engine for a ball. You can hit the ball around and your strokes are counted, as well as an extra stroke for ...
6
votes
1answer
59 views

Analyzing spoke overlaps during rotation

For a personal project that I've recently started I have to analyze the rotation of two shapes with sets of spokes, where the spokes are evenly-spaced, and split into a given number. That is, if I ...
6
votes
2answers
495 views

2D SDL Asteroids-like game

I am writing an Asteroids clone in SDL2 using in C. I have written a game loop function that seems to work with no stutter, however I would just like to ensure my game loop will be fast and efficient ...
6
votes
1answer
109 views

Optimizing rendering with a lot of transformations and save/restore

I have implemented a renderer for shapes described with a L-System grammar. Implementation of that is not important. Basically you feed it an angle and some rules, and it spits out a string of ...
6
votes
2answers
457 views

Particles moving around a Perlin Noise field

I made this sketch in Processing (basically Java) that consists of a bunch of particles moving around a Perlin Noise field. Each particle is aware of the position of one other particle and this ...
6
votes
1answer
689 views

JavaScript Breakout Game

I'm a novice programmer who is very new to JavaScript, and animation/graphics, and I have this breakout game on my flask website. I tried to do as much as I could from scratch, and I'm unsure if my ...
6
votes
1answer
2k views

Performance optimization on Box2D with libgdx

A few days ago I decided that I wanted to get involved with libgdx. So far I'm blown away by how simple it is to get something on the screen to work with. I'm trying to make a very simple tech demo ...
6
votes
2answers
95 views

Reducing code for animation of expanding menus

I wonder if I can reduce the code to optimize it better? ...
6
votes
1answer
3k views

Java snow animation

I was inspired by this to write a graphic snow animation in Java/Processing. It works great, but it has some design issues. The full project is here on github; ...
6
votes
1answer
2k views

Grid with images in RecyclerView

I've created a Grid with a RecyclerView similar to the GoogleIO 2014's generic media player one. GoogleIO generic music player Mine The thing is that the images ...
6
votes
1answer
84 views

Pong Game in JS

I am new to game development and took on the task to create a Pong replica due to my curiosity and interest in the field. I decided to write it in JavaScript because the game is not too labor ...
6
votes
1answer
731 views

Sample Python dodger game

I got my game working for so far, however, I would like the game to run faster. It's running at approximately 26 FPS when most of the blocks come in; my FPS goal would be about 60 FPS. ...
6
votes
1answer
258 views

Rotating background using Swing: performance issues

In a jPanel, I'm displaying a 1203x1203 background that I rotate every 30ms. Problem is, Swing is known to be a slow library, and I assume rotating a huge picture at a quick rate would be quite ...
6
votes
0answers
104 views

Chart Based Animations In Excel VBA

I've been working on re-writing comfortablydrei's answer to this PPCG Question regarding creating a illusion animation in pure Excel VBA. So far, I've been able to rewrite the code to function in VBA, ...
6
votes
0answers
539 views

Laminar flow in a pipe animation using Tkinter

I wrote this simple particle flow animation with Tkinter. I wanted to ask if there is some major improvements you can think of regarding the animation motor or the documentation of my code? I noticed ...
6
votes
0answers
104 views

Android component animatable on its height

I'd like to have a code review for a component which is supposed to be animatable on its height. It's supposed to be a transitioning element. I find it quite laggy on my phone. ...
5
votes
3answers
162 views

RPG game using XNA

I know this code needs some organization like classes, enums, methods, arrays or something but I just want to know if I could have created a character movement script, thereby shortening the code ...
5
votes
3answers
9k views

Multiple random falling objects animation in Java

I am new to programming but I tried to make my code as readable as possible! Hopefully you can see what it does before you run the program. I did not implement a ups or fps controller, the animation ...
5
votes
2answers
12k views

Python tkinter bouncing ball animation

In the current code, the animation is very unclear, and not "polished" (it doesn't run smooth). Can I make the animation smoother? And/or, why it doesn't run smooth? ...
5
votes
2answers
61 views

Sparking animation for Button

I just came through a GitHub repo, which has an amazing animation for Button in Android. So, I thought why not make that for web buttons too. And I started ...
5
votes
1answer
2k views

Bouncing square in a box

I wrote my first animation in Java FX and would like a code review. I created StackPane with Rectangle. ...
5
votes
2answers
255 views

Animating Coloured Cogs

The script is for rotating 5 different coloured gears (tandwiel) on my site. I think the code can be improved and improved performance. 5x var paper isn't that smart for speed? Getting the current ...
5
votes
1answer
121 views

Game sprite animation

This code animates my main game sprite by increasing the animation frame. First I check if the character is moving, then I increase the animation counter until it reaches the desired speed, and then ...
5
votes
1answer
1k views

Parallax animation, running well on Chrome but slow on Safari

I have the following script to create a parallax effect on the page using request animation frame, it runs well on Chrome, but on Safari is lagging, I think because I run too many calculations on each ...

1
2
3 4 5
8