Sign in to follow this  
jlubeck

How can I program this?

Recommended Posts

jlubeck    104
Hi everybody, this is my first post here, I didn't know where to get help and this looks like the right place.
I have experience programming some basic things in ActionScript3. But I never really made a proper game. Just very basic ones like a pong, a puzzle, and I've been lately following the series Staring with Starling from [color=#666666]Hemanth Sharma at [/color]http://www.hsharma.com/tutorials/.
He's teaching to make some sort of platformer, (you can see where I'm at with it at http://testing.fyrastudio.com/lab/starling/2012-07-01/) and I'm getting some nice game programming concepts from there, but until he releases the next one, I want to start making my own.
I already have the assets and it involves several concepts in the same game... but let's begin with one...
The idea is for an athlete to be running forward. The "camera" is like a first person. I say "camera" because it's 2D. I'm attaching a still so you can all get a better idea.

Now, the problem is that I don't know how to start... or how the logic would work... I'm not asking for anyone to code anything for me, just to help me turn my head around this to understand the logic that I would have to make in order for the character to be advancing forward, the obstacles coming up once in a while, and coming to a finish line...

I hope I could make myself clear, and that this is placed in the right forum with the right title. If any moderator seems it should be placed or named otherwise, just do it...

Thanks a lot and I hope anyone can help me, and that this post may be of help to anyone in the future...

Cheers!!

Share this post


Link to post
Share on other sites
BeerNutts    4400
For a beginner's topic, you've picked a fairly complex situation. Moving into the screen for a 2D game isn't the easiest thing to program, even for an advanced programmer.

As with any game, you will be recording the world location of your runner within your track. So, if you use up to start the runner forward, he would move whtin your world. however, you need to represent the world, as the runner moves into the screen. How to do that?

Good question. A simple method would be to have a static background (like the track in the picture, without the hurdle), but have hurdles scale up into the scene as you get closer to them.

If you want the background to change (ie, the runner gets closer to the stadium), you'll need multiple background images, or smartly scale the image you have to make it appear the runner is getting closer to the stadium.

That's just my initial thoughts on doing something like that. Good Luck!

Share this post


Link to post
Share on other sites
laztrezort    1058
[quote name='BeerNutts' timestamp='1341377478' post='4955518']
Moving into the screen for a 2D game isn't the easiest thing to program, even for an advanced programmer.
[/quote]

QFT, my memories of the "good ol' days" of trying to get pseudo-3d to look right seem to be of frustration. Be prepared for a lot of iteration of slight changes to the artwork and scaling/moving code. In this case, you will also need to time the animation of the running and jumping and timing of pseudo-collision detection.

My advice (just my opinion, feel free to ignore of course): for your first attempt, make it a side-scrolling game instead. It can still look good (given good art), and have a cool retro feel if you add multiple layers of parallax scrolling or something.

Share this post


Link to post
Share on other sites
jlubeck    104
Hey guys, thanks for your recommendatios! Maybe I placed the thread in the wrong forum?
I already know how to make side-scrollers, I have some experience coding basic games, you can have a look at them here:
[url="https://apps.facebook.com/nanotak/"]https://apps.facebook.com/nanotak/[/url]
[url="http://www.fyrastudio.com/projects/wirall/cartoon/GAME_MyLittlePony_ColoringBook/"]http://www.fyrastudi...y_ColoringBook/[/url]
[url="http://www.fyrastudio.com/projects/wirall/cartoon/GAME_AventuraFrutifantastica/"]http://www.fyrastudi...rutifantastica/[/url]
[url="http://www.fyrastudio.com/projects/wirall/cartoon/GAME_Bakugan_SlidingPuzzle/"]http://www.fyrastudi..._SlidingPuzzle/[/url]
[url="http://www.fyrastudio.com/projects/adMotion/ycar/"]http://www.fyrastudi.../adMotion/ycar/[/url]

But I still consider myself a beginner because I can't seem to get my head around more complex things like this...

Although this quote kinda gave me some ideas:
[quote name='BeerNutts' timestamp='1341377478' post='4955518']
As with any game, you will be recording the world location of your runner within your track. So, if you use up to start the runner forward, he would move whtin your world. however, you need to represent the world, as the runner moves into the screen.
[/quote]
The idea would be think more abstractly right? The track is a constant Number of X units. Lets suppose I want the user to run with the forward button, everytime he presses that, the runner would increment its number. Once he reaches the X he reached the finish line... For the obstacles, its just a matter of placing them in various points throughout the X. I just program it like that, and then I think of a way of showing that with my assets...
Is that the right way to go???

Thanks!!

Share this post


Link to post
Share on other sites
BeerNutts    4400
[quote name='jlubeck' timestamp='1341412892' post='4955632']
Hey guys, thanks for your recommendatios! Maybe I placed the thread in the wrong forum?
I already know how to make side-scrollers, I have some experience coding basic games, you can have a look at them here:
[url="https://apps.facebook.com/nanotak/"]https://apps.facebook.com/nanotak/[/url]
[url="http://www.fyrastudio.com/projects/wirall/cartoon/GAME_MyLittlePony_ColoringBook/"]http://www.fyrastudi...y_ColoringBook/[/url]
[url="http://www.fyrastudio.com/projects/wirall/cartoon/GAME_AventuraFrutifantastica/"]http://www.fyrastudi...rutifantastica/[/url]
[url="http://www.fyrastudio.com/projects/wirall/cartoon/GAME_Bakugan_SlidingPuzzle/"]http://www.fyrastudi..._SlidingPuzzle/[/url]
[url="http://www.fyrastudio.com/projects/adMotion/ycar/"]http://www.fyrastudi.../adMotion/ycar/[/url]

But I still consider myself a beginner because I can't seem to get my head around more complex things like this...

Although this quote kinda gave me some ideas:
[quote name='BeerNutts' timestamp='1341377478' post='4955518']
As with any game, you will be recording the world location of your runner within your track. So, if you use up to start the runner forward, he would move whtin your world. however, you need to represent the world, as the runner moves into the screen.
[/quote]
The idea would be think more abstractly right? The track is a constant Number of X units. Lets suppose I want the user to run with the forward button, everytime he presses that, the runner would increment its number. Once he reaches the X he reached the finish line... For the obstacles, its just a matter of placing them in various points throughout the X. I just program it like that, and then I think of a way of showing that with my assets...
Is that the right way to go???

Thanks!!
[/quote]

From your quote:
[quote]
But I never really made a proper game. Just very basic ones like a pong, a puzzle
[/quote]
[left][background=rgb(250, 251, 252)]it sounded like you've only done very simple games.[/background][/left]


[left][font=helvetica, arial, verdana, tahoma, sans-serif][size=2][color=#282828]In general, yes, as the player holds up, he is constantly increasing his location in the world in units. but, you need to make it look like he is, so the objects will have to scale towards him (and past him for some background objects). [/color][/size][/font][/left] Edited by BeerNutts

Share this post


Link to post
Share on other sites
jlubeck    104
Ok, since I'm encountering some problems, and some of you seem to think this is not very Beginner, I started another thread with the specific problem:

[url="http://www.gamedev.net/topic/627525-problem-with-running-and-jumping-at-the-same-time/"]http://www.gamedev.net/topic/627525-problem-with-running-and-jumping-at-the-same-time/[/url]

Thanks!!

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