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.

Dark GDK / Space Invaders Attempt

Author
Message
uk_dan2k
16
Years of Service
User Offline
Joined: 19th Aug 2008
Location:
Posted: 20th Aug 2008 01:28
I just tried a space invaders attempt based on the tutorial but i cut out some of it like some of the animations to keep it basic.

1 problem i found was the more aliens i kill, the faster they move,
I've only done one level and havn't included anything to increase their speed.

Some how its going faster because of less code to go through, is there a way to keep the movement constant?

also there seems to be a buffer overrun when i close the program, dunno whats causing it.

I've attached a rar'd up version of my game

Attachments

Login to view attachments
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 20th Aug 2008 05:41
The increase in speed is probably due to the system having one less sprite to track and draw if you're deleting the sprite. To keep things constant you almost have to adjust the movement using floating point positioning based on the number of ticks that pass.

I have a program that uses up to 180 sprites on the screen some of which are hidden much of the time. No movement. When I added them there was a significant drop in my frame rate.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
uk_dan2k
16
Years of Service
User Offline
Joined: 19th Aug 2008
Location:
Posted: 20th Aug 2008 12:59
i'll try hiding them instead of deleting them after they've been hit.

Also on this buffer overflow after i have when i close the program, i had alook around but couldn't find much on it.
Most tutorials and help files just mention strings causing the problem but i don't use any apart for the dbLoadImage (image filename).
Also it was there before i used a string to put up the score at the end of the program.

What else could be causing buffer overflows?

thanks for any help.
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 20th Aug 2008 21:53
if the speed is a change in FPS, you could try my technique which keeps games running at the right speed on even the worst PCs, instead of having set speeds, move an object by a speed divided by the fps. so the higher the fps, the less they travel per frame.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 20th Aug 2008 22:19
And you can use my ESP technique for determining what that method is. Oh, that's right. I don't have ESP.

Care to elucidate. I'm sure you posted it somewhere but without ESP I can't determine where.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 20th Aug 2008 23:16
Quote: "instead of having set speeds, move an object by a speed divided by the fps."


I believe that is the method. Divide your speed by the FPS.

Windows Vista Home Premium Intel Pentium Dual-Core 1.6 Ghz 1GB DDR2 RAM GeForce 8600GT Twin Turbo
uk_dan2k
16
Years of Service
User Offline
Joined: 19th Aug 2008
Location:
Posted: 21st Aug 2008 01:29
got the speed timing correct now, used to timers and looped program until every 100milisec, then it would dbSync() etc.

I'm still concerned about this buffer overflow when i end program debuggin. Havn't got a clue whats causing it.

also i've tried using the font.png to display the score at the end. havn't got a clue how it works, just some parts i know.
Anyway i tried dbText(...) and nothing shows up on the screen, i was wondering how to get normal text appear on the screen i.e. "GAME OVER!!" in the middle of the screen.

thanks for the help as always
uk_dan2k
16
Years of Service
User Offline
Joined: 19th Aug 2008
Location:
Posted: 21st Aug 2008 20:27
how do you run the game outside of visual studio debugging?

I've got a .exe in the debug folder but when i try running that a window with a black screen comes up.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 21st Aug 2008 20:35 Edited at: 21st Aug 2008 20:40
Quote: "I've got a .exe in the debug folder but when i try running that a window with a black screen comes up."


Look for similar threads. Most likely your media isn't where the program expects to find it.

Also, try generating a Release version.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 21st Aug 2008 20:48
Change the drop down on the toolbar from "Debug" to "Release".

Windows Vista Home Premium Intel Pentium Dual-Core 1.6 Ghz 1GB DDR2 RAM GeForce 8600GT Twin Turbo
uk_dan2k
16
Years of Service
User Offline
Joined: 19th Aug 2008
Location:
Posted: 22nd Aug 2008 03:59
got it to work now, copied all the image files used for the program into the same release folder to go with the .exe and it all works now.

thanks again.

Login to post a reply

Server time is: 2024-09-30 05:39:22
Your offset time is: 2024-09-30 05:39:22