Jump to content
  • Advertisement
Sign in to follow this  
imaginos

Total beginner 1st level for 2D platformer- jpeg background question

This topic is 3584 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. Since English is not my native tongue and also due to my total lack of any experience in game making (and very limited experience in 3D design) I'm not really sure if I formulated the question clearly but here it is. I somehow feel there must be a simple answer to my question but since I'm pretty much total beginner in game design and 3D I'm little bit confused about what should I be doing. I started working with 3D art about 2 months ago and I already made some nice looking renders but now I can't figure out how to use them in side scrolling platform game. Initially I just wanted to make some 3D art but some of my friends asked me to create a levels for 2D side scrolling game. I'm looking at one 2D side scrolling platform game and I notice that same patterns are repeating instead of using just one long continuous level. What I mean is this. I'm looking at main character moving forward but the same terrain is just being repeated again and again, same rocks, same plants and so on. There are only new animated items and enemies as level progresses. The same things is with backgrounds and sky. There is just short stretch that is pasted during the whole level which takes around 5-10 minutes to finish. So what do I do once I export my jpeg render which is for an example road with trees and plants etc? Should I make several different jpeg renders of longer stretches of my 3D road taken from camera side perspective in VUE or should I just repeat this one picture? In both cases how do I make them blend seamlessly and naturally, in other words how do I make natural "looped" picture so that it wouldn't look like it was glued at wrong place and which application should I be using for this purpose? I find making simple 3D maps pretty straightforward job but this 2D side scrolling perspective is something new and confusing for me although I heard people saying it should actually be easier to make 2D platform level. I would really be thankful if somebody with experience in 2D platformers can give me some insight or point me where I could find some good info or buy tutorial on internet in which these particular graphical design issues are being explained.

Share this post


Link to post
Share on other sites
Advertisement
Using Pygame, an SDL wrapper for Python, I would create a large background scene (about 3x the length of your program's window), then just scroll that repeatedly. One of the easiest methods is to create one scene the size of your window (for example, 800x600), create another on that's a bit different, then tack on the first one.


----> Player direction
_____ _____ _____
| | | |
| A | B | A |
|_____|_____|_____|

<---- Background direction


When the right side of the background scene gets to the right side of the screen, it'll reset. Having the 1st and 3rd parts of the bacground the same will make the repeat smoother.


if background.rect.right >= screen.get_width():
background.rect.left == screen.get_width()


Share this post


Link to post
Share on other sites
Quote:
Original post by Esys
Using Pygame, an SDL wrapper for Python, I would create a large background scene (about 3x the length of your program's window), then just scroll that repeatedly. One of the easiest methods is to create one scene the size of your window (for example, 800x600), create another on that's a bit different, then tack on the first one.


----> Player direction
_____ _____ _____
| | | |
| A | B | A |
|_____|_____|_____|

<---- Background direction


When the right side of the background scene gets to the right side of the screen, it'll reset. Having the 1st and 3rd parts of the bacground the same will make the repeat smoother.

*** Source Snippet Removed ***


Thanks Esys, that's really useful info, especially for the guys working on programming the game.
I have one more question regarding foreground where the character is moving. The problem with this game project is that the guys mentioned above didn't really provided me with any guidelines ( and I'm not sure if they are even familiar with some important aspects of the game making yet) about how am I supposed to deliver the backgrounds and foregrounds. They just seen some of my 3D scenes I created in Vue and found them nice enough to include in their game but since it is also their first projects I 'm basically left on my own for now to figure out the design things while they are figuring animation and programming.

Now , when I looked at the data/images folder of one python-ogre side scrolling game to see how the files are organized, instead of single bmp or jpeg scene image with trees, foliage , rocks etc like the scene I make in Vue and export as bmp or jpeg ( or like scenes in some point & click adventure game I played) I found png files, each one containing several elements of foreground and background .

What I mean is that one single png file for example contains three different segments of foreground road, flowers, plants, rocks. They are all there as separated elements within this png file and the single foreground file like the scenes I usually make in Vue is nowhere to be found.
Does that mean that I should take different approach when designing game level and instead of exporting finished complete scene from Vue as single large foreground image containing trees foliage etc I will have to export terrain, plants, and objects separately.

So is there more then one way to deal with these issues in python-ogre based games?
I'm probaly asking too much question since I only learned so far to work with 3D art and some basic object modelling but this is at the moment most important issue since I don't know if any of my complete Vue scenes can actually be used in python-ogre based game as foreground or I'll have to "dismantle" them and send the guys terrain, and at least some of the objects and plants which are now integrated in my Vue scene as separate files?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!