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.

DarkBASIC Discussion / TDPS - A Small Early Christmas Present For You...

Author
Message
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 5th Dec 2009 18:58 Edited at: 5th Dec 2009 19:09
Ever wished you had a program that would write DBC programs for you?

Ever thought that you spend far too much time writing the same code over and over again when you start a brand new project?

If you said yes to either of these questions, you might be interested in my latest WIP utility - TDPS (TDK's DB Project Starter).

More experienced users will probably have their own solutions for what this program does, but for beginners it might be invaluable...

Essentially, you run it when you start a new project. Select what you need from a range of options, save the file, hit the Generate button and a complete working skeleton .DBA file will be created. Simply load it into the DB editor and run it!

You simply add your own code into the sections left for you - ideal for the DBC challenges!

It currently allows you to create a working shell program with code already included to set:



...and more.

The shell program it creates is modular and correctly laid out style-wise and easily added to by just dropping in new subroutines and functions.

PLEASE NOTE: The program is only a prototype at the moment, so some options have not been added yet. But, that makes it a good time to suggest other features for it (if you have any).

I've not tested it with DBP, so if you use DBP, feel free to test TDPS out with it and let me know how you get on...

Download from: http://tdkman.com/downloads/dbc project starter.zip (174K).

[Edit] For some strange reason, the href tag won't work, so copy and paste the above link into the URL line of your browser.

TDK

Digger412
16
Years of Service
User Offline
Joined: 12th Jun 2007
Location:
Posted: 5th Dec 2009 20:01
Very nice TDK! I've said yes to #2 quite a lot (I actually have a general.dba file with a few functions that I use in nearly every program).

Will the user be able to add in their own personalized functions, too? Will it be expanded like that in the future?

Also, it does work in DBP, for the most part. I can't get the camera to turn left or right when using the 'Mouse Control' setup. It doesn't seem to matter, either, if it is set to fly or walk. Everything else seems to work so far, though.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 5th Dec 2009 21:17
Quote: "Will the user be able to add in their own personalized functions, too? Will it be expanded like that in the future?"


It already does that. Just place all your most-used function files (DBA's) in one location and then set that location in the Options.

You can then select any four of them in a new project.

Quote: "Also, it does work in DBP"


I don't know - that's why I asked for DBP users to try it. I don't have DBP set up on this system at the moment. It shouldn't be far out though...

Quote: "I can't get the camera to turn left or right when using the 'Mouse Control' setup"


I can't get it not to!

Quote: "It doesn't seem to matter, either, if it is set to fly or walk"


Just tested it again and that works too. Only difference between Fly and Walk mode is that in walk mode, you don't take off if you move while looking up.

Anyone else having these problems?

TDK

Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 5th Dec 2009 22:41 Edited at: 5th Dec 2009 22:42
Quote: "Also, it does work in DBP"


TDK: this was a statement not a question

The problems listed i think were only in dbp. I got the same problems in dbp. I couldn't figure why though.

I have some suggestions:


Maybe adding the ability to specify scancodes(or just pressing keys) for the camera movement
Also, if you are going to use mouse rotation then position the mouse at the center of the screen every loop(in dbp it is in windowed and when you click sometimes it's off the window)


Glitches(in DBC):

If you press wireframe it still trys to load the texture 'filename' which doesn't exist of course.

New Site! Check it out \/
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 5th Dec 2009 22:59
Quote: "TDK: this was a statement not a question"


I'm so sorry Digger412 - I misread it! I really must get my eyes tested lol!

Quote: "The problems listed i think were only in dbp"


Ah I see. Being on the DBC board I expected only DBC users to try it.

As I've not got it installed, unless someone gets the DBA file it outputs working in DBP and lets me know what they did, it will have to stay DBC only for now.

Later, (if anyone thinks it worth it), I'll sort out DBP compatibiility and start a thread on the WIP board.

Quote: "I have some suggestions:"


Yes - I think keyboard control should be included too. I'll look into that.

As for the mouse, my first thought was that fixing that should be in the DBP compatibility phase - as it works OK in DBC. Then I thought that as DBC also works in window mode, it should include window mode in the environment section - in which case I'd have come across the problem anyway and have to fix it. Leave it with me.

As for Wireframe mode - it's one of the options I've not programmed in yet. I only started the program yesterday - hence the 'prototype' stage it's currently in.

I'd like to know if anyone besides me would use it when it's finished?

TDK

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 5th Dec 2009 23:48 Edited at: 5th Dec 2009 23:50
@TDK
Very nice. Very cool idea! The only thing, and I don't know if you are aware of it or not, but DarkEDIT has a similar type of functionality already built in. If you use CTRL+J, a little menu will come up in DarkEDIT where you can choose from a series of predefined code blocks.

You can also add as many of your own blocks of code as you want in whatever way you want the text formatted (i.e. spaced and tabbed) to the menu selection.

I use it all the time. Here's a quick example of using CTRL+J to pull 3 blocks I previously added to the menu: the general program skeleton layout, a move_camera routine, and a modified version of Lee Bamber's matrix normal calculation



I don't want you to end up wasting your time when the functionality is available in DarkEDIT - CodeKeeper also. But you could make all of the source snippets available so users could use them in DarkEDIT.

The user would have to create a folder in the DarkEDIT156 folder labeled TEMPLATES. Each block of source code would be saved inside TEMPLATES with it's own name. Once in there, restart DarkEDIT, press CTRL+J, and then choose the block of code you want to add where ever the cursor is located.

In the blocks of code stored in TEMPLATES, add a pipe character '|' somwhere in the code and that is where the cursor will jump to when you add that block to DarkEDIT. Useful for adding titles or for position the cursor so you can add or change values.

For example, maybe you want to add data statments. You code block saved in templates might look like:



Where that little line after Data is the pipe character and the cursor will automatically jump to that point when the block is added using CTRL+J.

Enjoy your day.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 6th Dec 2009 04:48 Edited at: 6th Dec 2009 04:50
Are you going to integrate this with your IDE?

I use CTRL+J quite a lot. I used to put a whole program skeleton on it but because programs require different things I had to delete stuff nearly every time. Now I have little sections in the CTRL+J list and copy out the ones I need. I haven't downloaded this but if there is a control box where you can select what you want then that would be ideal.

You've gotten me thinking about this. What if you totally modularise the whole process. What if you wrote functions and subroutines in separate windows to the main loop, kept organised with tabs?
Could you make it so you could include a file and then on compile your tool would check which functions where actually used and copy them to the main program? Could it even tell you if there are functions or subroutines that are never called?

This tool could be something that makes DBC coding even quicker and even more fun
Wait, I haven't even tested it yet lol

"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
Digger412
16
Years of Service
User Offline
Joined: 12th Jun 2007
Location:
Posted: 6th Dec 2009 14:50
@TDK - Lol, it's no problem. I think that the problem resides in how DBP calculates the angles to turn the camera, but I'm not sure.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Dec 2009 15:00 Edited at: 6th Dec 2009 15:00
Latch:

Actually, I'd forgotten about CTRL+J in Dark Edit.

So, it looks like this little utility would only be of interest to those still using the built-in editor or don't know about/use CTRL+J in DE.

But, even for DE users, if they are new to programming, the code it produces is IMHO a good primer for program layout.

You do need to know what you are doing to use CTRL+J - Eg: how to write a function/subroutine and where to insert it, so I assume that a newcomer who does't know this would simply be using CTRL+J to create unstructured programs.

With this utility, no knowledge is required other than how to select an option with the mouse and type a value in.

Quote: "Are you going to integrate this with your IDE?"


It already does the same thing as CTRL-J... if I remember correctly!

Quote: "if there is a control box where you can select what you want"


You can select up to 4 files - each with as many functions as you want in them. They all become #Includes when you compile.

Should have posted a screenshot shouldn't I?...



TDK

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 6th Dec 2009 23:18
@TDK
That's exactly how I hoped it would be, even better laid out actually.

Quote: "So, it looks like this little utility would only be of interest to those still using the built-in editor or don't know about/use CTRL+J in DE."

I would use it. The trouble with CTRL+J is it's like having a clipboard with hundreds of pieces of paper attatched to it, it's not very organised and it takes a while to get everything pasted in the right place. This is a much neater way to set up a program and better for planning.

One suggestion: When testing I often want to print a few pieces of data on screen such as FPS and hidden variables.
I'm not sure if that would actually be useful to include, I'm just doing my routine of throwing a hundred balls in the air and seeing if any land in the hoop .

"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
seppgirty
FPSC Developer
14
Years of Service
User Offline
Joined: 3rd Jul 2009
Location: pittsburgh, pa.
Posted: 29th Jan 2010 19:28
it would be great if you add other camera controls like 3rd person view. fixed camera like in silent hill. and if you could ad level imports that were created in 3d modeling programs... i'm not sure if you can already do this or if it's a stupid idea... this is a great idea for new people like me. thanks for doing this.

gamer, lover, filmmaker
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 31st Jan 2010 03:52
Very cool. I love it!....................Reminds me of one of the things i failed to do.........but TDK never fails,right?

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 4th Feb 2010 07:03
Quote: "but TDK never fails,right?"


He probably just doesn't release things until he has already corrected his failures! he just found thousands of ways NOT to do it and showed us the one that worked

New Site! Check it out \/

Login to post a reply

Server time is: 2024-03-29 07:35:12
Your offset time is: 2024-03-29 07:35:12