• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
darcmagik

[java] Animating Sprites in Java Help

9 posts in this topic

Hey guys I need some help with a project from school were building a game engine to make side scrolling 2D games in java. well I'm working on figuring out how to animate Sprites from a Sprites page. I am using a buffered image to hold the sprites page and I was thinking about just pulling the individual sprites from the page and rendering them to the screen. Well the problem I'm having is how can I just draw a specific region of the Sprites Page to the screen. I got the sprites width and height but I cant figure out how to just draw a section from even just the top left corner to the width and height of the first sprite. Can anybody help me here???? I'm kinda new to java so please dont go to off into the wild blue yonder of java know how. LOL DarcMagik
0

Share this post


Link to post
Share on other sites
Quote:
Original post by darcmagik
Well the problem I'm having is how can I just draw a specific region of the Sprites Page to the screen.

Assuming - as you said - that you sprite sheet is stored in a BufferedImage, you can simply use the getSubimage method to return the image at the specified x and y coordinates. Then you'd draw the image to your screen (or backbuffer) as normal.

<edit :: I'm slow ;P
0

Share this post


Link to post
Share on other sites
Thats cool I appreciate the help. Just one more question though. Anybody wanna give me a hint as to how to actually animate it. At least being able to go from the begining of a row of sprites to the end of a row in the Sprite Page??? Also can anybody give me a link to some info about how I can store those tiles in an array? So that I can just loop through them. If this sounds like a stupid question, i'm sorry but my brain isnt working real well tonight.

DarcMagik
0

Share this post


Link to post
Share on other sites
Ok does anybody have a link to any tutorials on how to make side scrolling games? I need some help with the logic for it. As I am fairly new to java.

Darcmagik
0

Share this post


Link to post
Share on other sites
Hey man, first of all don't be ashamed to ask stupid questions. All of us were noobs at one time or another and we're here to help.

animation is not too tough, i had a counter to count the loops and id % it with the number of frames i were working thru (could be modded again if one image is on more frame).

As for physics etc., only help i have is a game called stickduel I wrote. I left it somewhere on the net, google for it, if you can't find me email me. I'l email it to you.

my email is 14584808 at sun dot ca dot za.

It's a platform based 2 player animated combat game, pretty fun.

HTH dude
0

Share this post


Link to post
Share on other sites
Hey Guys its me again. Does anybody have a link to a tutorial on making a side scroller. The part I'm interested in is the animation of sprites, and also loading in a map and displaying it to the screen. I've been working on a Sprites class trying to make somthing that I can add to an engine were building in school, but I think I'm going about this the wrong way and just want to see a tutorial to maybe point me in the right direction. Any help would be appreciated.

DarcMagik
0

Share this post


Link to post
Share on other sites
Ok folks I have done a LOT of research into 2D side scrolling and I can find some great information into how to load the map into a 2 Dimensional array and display it and then just move the graphics and display more. But there are a couple things I'm a little foggy on. How do you create thses maps? and more importantly how to you load in all of the images? do you just create an array of sprites to hold all the tiles? is there a way to load in a map that was already created? I read somthing about PCX (I hope I got that name right) maps and that you need a map reader and when I try to find one the sights are all gone and it doesnt exist any more.

So what I am looking for from somebody is either how do I bring in pre done map files and display them or how do I take a bunch of tiles in and display those. If I can figure that out I think figuring out how to do the character animation wont be that difficult.

Please, Please, PLEASE help me,

DarcMagik
0

Share this post


Link to post
Share on other sites
David Brackeen's book is impressive. There's a side scroller you can play at this link, through web start. All the book's code is available at the website as well.

I *REALLY* recommend you to buy this book.

Son Of Cain
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0