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.

Newcomers DBPro Corner / Program Issues

Author
Message
Sharlenwar
15
Years of Service
User Offline
Joined: 4th Mar 2009
Location:
Posted: 17th Dec 2010 01:39 Edited at: 17th Dec 2010 01:43
Yeah, I've been sitting around the past bit here working with DBP. It is amazing and I got something working, somewhat.

It seems to be operating, I had it at one point displaying to me all of the images in the map_tiles.bmp file that I have. What is happening, is when it is drawing the map, everything seems to go down the drain. My FPS is killed and it seems like it is frozen. When you comment out the "draw_map()" from the main loop, the program works as it should.

Any ideas as to why it all freezes on me?

I have been using the Pac-Man tutorial found here. Graphics are thanks to David Gervais in the 2D Graphics Buffet post. The player character is something that has been sitting on my HDD.



Attachments

Login to view attachments
Sharlenwar
15
Years of Service
User Offline
Joined: 4th Mar 2009
Location:
Posted: 17th Dec 2010 04:30 Edited at: 17th Dec 2010 06:02
Okay, after messing around with this since I posted. I found out that if I change the "draw_map()" function to the following:



Then it seems to draw the map and thus allows me to keep the program working. Strange. I have now added in where you can select tiles on the map, and when you right click, it provides you the map coords of that space.

If any of you see anything that I could improve upon, please let me know as I'm here to learn. I think I'm confident now to tackle a relatively simple game I'm going to make out of this.

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Dec 2010 14:56
I only took a quick look but it seems you have a pretty good grasp of DBP.

Your code is fairly neat and well organised and you understand the use of functions.

Quote: "I think I'm confident now to tackle a relatively simple game I'm going to make out of this."

Definitely, give it a go. I wouldn't worry about posting questions on the DBP forum rather as well as here either if I were you.

Sharlenwar
15
Years of Service
User Offline
Joined: 4th Mar 2009
Location:
Posted: 21st Dec 2010 18:00
Alright, should be good. I'll be asking away for sure. I'm just surprised so few answered. But I'm glad at least you did. Awesome.

Login to post a reply

Server time is: 2024-09-29 00:28:29
Your offset time is: 2024-09-29 00:28:29