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 / Help with a somewhat complicated program

Author
Message
Emurider
13
Years of Service
User Offline
Joined: 1st Jun 2011
Location:
Posted: 2nd Jun 2011 02:41
Hello, I am new to the forum and I have come to ask for help. I need help writing a game in which you have control of a fish and you must eat smaller fish until you reach max size. Each smaller fish you eat increases your size by 3%, and if you attempt to eat a larger fish you lose the game. I am having trouble writing the code for this game, if anyone could help me out I would greatly appreciate it!
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 2nd Jun 2011 23:16
Thats a very broad request, you will get more help with specific questions.

Is your game 2D/3D, what do you have so far, and what are you having trouble with?

Lord_Migit
13
Years of Service
User Offline
Joined: 3rd Apr 2011
Location: Dundee, Scotland
Posted: 3rd Jun 2011 22:43 Edited at: 3rd Jun 2011 22:48
A good way to start is show us what you have already and better explain where the problem you are having resides.

Also what mite help you is to break the game down a little, into lots of smaller goals. So for your game idea, try achieving each of these first:

1: Make a window and Display a sprite. (simple DGDK commands.)
2: Be able to move the sprite with your keys. (simple DGDK commands.)
3: Have other static sprites, then make a small collision system. (reasonably easy, maths and DGDK commands)
4: Try sizeing your sprite up and down. (one way would be with dbScaleSprite().)
5: When you collide with a sprite, delete it and then rescale your own sprite to be about 3% bigger. (simple DGDK commands.)
6: Make a detection system to see weather the sprite you collide with is larger or smaller. (this can be done with classes and class attributes)


Never set out to make "Game X" in one big go. Think to yourself, what game x consists of, devide all its features into smaller portions and build them separately. It helps you build the game and it also means that we on the forums can help you when you run into a problem. If you know the rough area that is causing this problem then we can look at your code and track down errors or give tips on how you mite go about achieving certain parts of your program. As it is just now, there is no way we can respond to your post in any code based way. To do that would be to just build the game for you. And you wont learn anything like that... not to mention i doubt people have time or willingness to do so.

EDIT:: I should ammend this by saying if you have absolutly no idea where to start then start with the tutorials that come with Dark GDK. They are quite helpful and go into quite a bit of depth with regards to 2D games. It does assume however that you have some programming knowledge, and it would be good to have a good knowledge of object orientated C++. But that is quite simple, and i presume that seeing as you are using DGDK you have some if not all of that knowledge.

"Knowledge is Power"

Login to post a reply

Server time is: 2024-10-02 17:22:12
Your offset time is: 2024-10-02 17:22:12