Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by MilkX5 · Sep 28, 2012 at 01:26 AM · animationspritejavaoffset

How can I animate a sprite sheet in Java

I have a REALLY big kirby sprite sheet for a game I'm making for my friend. I'm not sure how to animate one line at a time when i press certain buttons like "up,down,left,right,z..." etc. Any tips? alt text

bombkirby.png (100.0 kB)
Comment
Add comment · Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlucardJay · Sep 28, 2012 at 01:28 AM 1
Share

http://wiki.unity3d.com/index.php/Animating_Tiled_texture

avatar image shaderop · Sep 28, 2012 at 01:33 AM 0
Share

Don't you mean "JavaScript"? That's an entirely different language from Java.

avatar image MilkX5 · Sep 29, 2012 at 01:39 AM 0
Share

@Fattie I'd love to get it, but I'm broke :P That's why I make games But thanks for the suggestion. I just need a simple code sheet that I can use with all sprites of different sizes

avatar image MilkX5 · Sep 29, 2012 at 02:10 AM 0
Share

@alucardj Thanks I've tried that too but it plays all the sprites. I just want it to cycle through certain rows when i press certain buttons

avatar image AlucardJay · Sep 30, 2012 at 02:24 PM 0
Share

Hi, the reason you're not getting a solid answer is to do what you ask involves writing a state engine to control what portions of the sprite sheet are played (using my previous link for example). If the characters are to be reversed then it is double the work and time. I have in fact thought of doing it myself but it is time I havn't had recently.

What is the full size of the sheet, and what is the size of each individual sprite ?

I would also suggest following the video's in Chobi77's answer.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Chobi77 · Sep 30, 2012 at 01:50 PM

Have a look at Walkerboystudio

Scroll down to the section with the heading "Unity Tool Development Project 3 - in HD" and have a look at part 14 to part 31.

That should be what you are looking for.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MilkX5 · Sep 30, 2012 at 05:07 PM 0
Share

The WalkerBoysStudio tutorial is what I originally used for making sprites in standalone games. However, when I use the same script in flash, I get at least 7 errors. I'm looking for an alternative script that I can use that will still give me the same result and work in flash. Thank you for your answer by the way :)

avatar image AlucardJay · Oct 01, 2012 at 12:48 AM 0
Share

when I use the same script in flash ... do you mean publish in Flash, or port the code to ActionScript? Swapping the UV's or texture offset is completely different to setting up a $$anonymous$$C and telling it to gotoAndPlay(frame);

avatar image MilkX5 · Oct 11, 2012 at 12:36 AM 0
Share

@alucardj publish in flash. Sorry if I wasn't clear

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Sprite Editor/Pack Atlas Question for 2D Animating 0 Answers

How to do you import Spriter animations into Unity? 1 Answer

How to animate a sprite mask? 0 Answers

Any reason to use Unity's GUI paradigm if I'm working with sprite sheets and don't need GUI button presses? 1 Answer

Sprite animation 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges