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 / Some General Questions About DBP

Author
Message
clakes707
12
Years of Service
User Offline
Joined: 2nd Feb 2012
Location:
Posted: 3rd Feb 2012 05:37
First off, thanks for taking the time to view this thread, I really appreciate it. Anyways,..

I am pretty new to DBP, but I have created games in other language/programs, mostly using Game Maker(GM) by YoYoGames. The jump from Game Maker to DBP hasn't really been that hard, as the syntax for DBP is pretty straightforward. However, not having Game Maker's interface has made parts somewhat confusing for me, so I have a few questions:

1. (I'm not sure how to word this question, so bare with me)...
OK, so in my project I have my main Do..Loop. In this project, I have code for the menu. Should the code for this menu be placed under the main Do...Loop, along with the rest of the code for the game play itself? Or should I have separate loops for each section of the game(the menu, the game play, etc)?

2. Is the Indigo editor free? Under help it has the option to enter an Activation Key, and it gives a date on which it expires. However, on the Indigo website I saw no mention of a price involved or anything telling me I was downloading a demo version.

Again, thanks for your time and help. I really do appreciate it. I have plenty of more specific questions, but I know how annoying it can be to have some question how to do something, when they have not worked on their own solution, so I will refrain from doing so. However, you can be sure to expect a lot of future posts from me, as DBP really has me hooked now.
nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 3rd Feb 2012 10:53
Okay...

Quote: "OK, so in my project I have my main Do..Loop. In this project, I have code for the menu. Should the code for this menu be placed under the main Do...Loop, along with the rest of the code for the game play itself? Or should I have separate loops for each section of the game(the menu, the game play, etc)?"


There's no right or wrong answer really, depends on your preference intimately. I guess you could put your menu code in the main loop, but I'd personally suggest placing it in a FUNCTION. Reason being is your main loop should be as minimalistic and neat as possible, ie:

Along those lines. You can even compact it further. Also you might decide to go the dynamic route with your menus (allows movement etc. in the background so you could call the menu while the intro was playing and the intro would keep play - like Final Fantasy XII) - but that's up to you.
Ultimately though, the more flow your program has the better. The main loop is really more of a place to "run things from", sorta like corporate HQ. Ultimately, things become more manageable if everything is placed in a function and calls are made to that function when necessary. GLOBAL flags can be used by your main function to determine what to do next so far as calling other menus, FMVs, overlays, etc - the sky's the limit as far as how to do something's concerned but there are consequences for untidiness and bloated or clogged-up code such as debugging nightmares and even poor performance.

Quote: "Is the Indigo editor free? Under help it has the option to enter an Activation Key, and it gives a date on which it expires. However, on the Indigo website I saw no mention of a price involved or anything telling me I was downloading a demo version."

Dunno much about Indigo, sound familiar. If it asks you for a key and gives you an expiry date then it must obviously not be free. I use the old DBPro editor with the new DBPro compiler (fixed all my bugs). Yes it ain't flashy and it doesn't have all the awesome project browsing thingies and helpers [and ponies?] that the new DBPro editor or all the alternative editors have but it works and it's stable and that's all I care about. If you don't wanna go traditional and you don't wanna pay for Indigo, there's one called CodeSurge (was free last time I checked). CodeSurge is a pretty decent editor and it has all those robust features that everyone goes crazy over. There's a new version on the way too it seems. Here be the link:

http://forum.thegamecreators.com/?m=forum_view&t=161819&b=8

Hope this helps and enjoy using DBPro

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 3rd Feb 2012 11:22
Hi and welcome to the forums... your new second home (I feel like I am on repeat lol)

nonZero pizza made my day...

Yeah as he says keep it tidy and create habits like the most important of all COMMENTING YOUR CODE... Also pay no attention to his mention of Ponies... no animals were harmed in the creation of this forum (at least non that we know of) its a folley to lure you in...

I do not know where people find the various editors... linky?

Umm have you looked at the Hands On Dark Basic books? Theyre unmissable...

Again welcome

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 3rd Feb 2012 12:06
I'm pretty sure Indigo's free, unless they've introduced a price. I haven't updated Indigo for a while though (still stuck on V 1.2.1 or something) but the activation code may actually let you activate the full version of DBP using that IDE. I'm not 100% sure about this though...

clakes707
12
Years of Service
User Offline
Joined: 2nd Feb 2012
Location:
Posted: 3rd Feb 2012 17:48
@nonZero & MrValentine: Thanks, that cleared some things up I think. I think what I really need to do is just look at a lot of source code for other games/projects, and learn from there.

And MrValentine, below I put the links to a few alternative editors you can check out. I've only used Indigo, and so far it seems really great. Judging from posts on the forums, the other two seem pretty good too, so I imagine its just a personal preference.

http://www.thegamecreators.com/?m=view_product&id=2000&page=codesurge
http://indigo.mapmasterz.com/
http://forum.thegamecreators.com/?m=forum_view&t=188786&b=8

@Hodgey: That does make sense, about activating Darkbasic through the IDE. I guess I'll just have to wait for the expiration date to find out, haha.

Thanks for all your help though, everyone.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 3rd Feb 2012 18:07
^^ cheers

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 3rd Feb 2012 23:12 Edited at: 3rd Feb 2012 23:14
clakes707

On your question of having more than one loop for different parts of your game, another suggestion is to use "game states".
If you download and test our IDE there is a template "Game States" project included.
When you start a new project just pick the game state template and the new project will be created
with the game state example code, which is commented to explain how it works.
To run the Game States example you will need Matrix1's dlls which are free.
In our opinion Game States are a good method.
You can use the code even if you don't use our IDE.
Click the banner to download.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Millenium7
19
Years of Service
User Offline
Joined: 13th Dec 2004
Location:
Posted: 4th Feb 2012 11:50
to expand on nonzero's post
I'd suggest placing 'everything' in your main loop, but very little other than calling functions. I.E.



This is my preferred method of doing things for several reasons
1) it keeps everything CLEAN and compact
2) it's all catagorised, so if you have any problems with the chat window for instance, go to the relevant section in the function
3) anything can be done at any point in time. You don't need to write seperate code to display the chat window ingame, or in the lobby screen for instance. All you need to do is set a variable/boolean to tell your program whether it should or shouldn't be visible right now
4) gets you into the habit of writing more dynamic functions, I like to call a menu function even when I don't intend on showing a menu. The function itself will determine what should or shouldn't be displayed at any point in time, and NOT my main code. For instance the chat window in my game can be displayed at 2 different points, either ingame or at the lobby screen. Now when i'm at the lobby screen the chat window is much larger, holds more text and doesn't disappear. Ingame it's smaller, in a different position and disappears 7 seconds after the last message was received. I don't run a seperate function, instead the function checks to see where I am and alters everything accordingly by itself
5) it's much easier to expand on your game later on. If done correctly you shouldn't need to rewrite a whole bunch of code just to add in an extra menu, support different resolutions, have more enemies running around and so on

Login to post a reply

Server time is: 2024-11-22 06:59:31
Your offset time is: 2024-11-22 06:59:31