Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Kani
18
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 24th May 2006 12:41
Hi everybody. New to DB, new to programming (mostly).

I've always wanted to make games, but I gave up a long time ago when I found out how difficult coding was. I tried and tried, but all I got was a mountain of frustration. I heard of people all over starting to code games in their early teens or younger, and that made me sort of think that if you couldn't do it from a young age, you just weren't built for it.

But recently I've been finding that I can do all kinds of stuff I never dreamed of doing before. 3D modelling, playing guitar, making little animated movies, and, programming. I guess I finally just calmed down and matured to the point where I could sit still and pay attention long enough to actually learn stuff. And that's why I bought DB Pro

It's still extremely frustrating and confusing, but I think I'm making a little progress. I've read tons of tutorials, but they don't really help, either because they aren't explained well or because I can't figure out how to apply the stuff I learned to an actual game.

So, because of not being able to find a good tutorial for a 2D platformer, I decided I would just go and do it my own way with the commands I understood already. Four hours of racking my brain and testing different things over and over, and here I am.. and I did it! I guess it's a tiny piece of code for so much work, but it's a big deal to me, and I'm really happy with it So I just wanted to show it to some people and there's my introduction to the forums too
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 24th May 2006 15:06
Alas, being such a new user, the source code box won't work for you - better to use the code tags. [ code ] and [ /code ] without spaces.

Well done though - coding is really rewarding and I too have just started to learn guitar.
Kani
18
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 24th May 2006 18:10
Oh, whoops, and I went to bed right after I posted that. Thanks for telling me. Here's the code



The two images can just be any old 32x32 images if you wanted to actually run it. Player falls, player hits block, player doesn't get stuck on top of block (that was the hardest and most confusing part), and, "gravity" can be anything because of the really long if statement
Kani
18
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 25th May 2006 20:10
What, no pat on the back? No, "Good job Kani,"? No, "Here's a little suggestion for you,"? Hmph
Kani
18
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 29th May 2006 09:44
With the help of TDK_Man's tutorials to explain arrays to me, and Zenassem's idea of using them to manage tiles, even though I didn't really get it because his tutorial isn't finished, I got it working on multiple tiles, and now I can have a whole screen full of tiles Now my next step is figuring out how to move the "camera" and move around maps bigger than the screen. I know from Zenassem's tutorial that it's not actually a camera moving, but the world moving around the player. But then I can't really think how you would handle enemies that move around on their own plus move relative to the player. Anyway, here's the code if anyone cares:



Though I have this unshakable feeling that there must be a more efficient way to do collisions. Can anyone give me some suggestions?

Login to post a reply

Server time is: 2024-09-24 23:27:07
Your offset time is: 2024-09-24 23:27:07