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.

Program Announcements / [DBP] Game Template Source

Author
Message
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 6th Feb 2011 04:14 Edited at: 19th Jul 2011 07:16
Game Template


Edit: NOW FREE! No longer for sale because of lack of interest.

NEW THREAD HERE: http://forum.thegamecreators.com/?m=forum_view&t=187007&b=10

Edit: I created a WIP for posting what updates I am working on for the Game Template. The Game Template is a finished product. This product will be updated with more classes and the code will be rewritten to make it easier to use.

The Game Template is a bunch of classes useful for Dark Basic Pro. Most programers write the same code again and again and spend a lot of unnessesary time on debugging, design, and writing the video game. This products goal is to reduce development time as much as possible.

After two months of development I have finally finished the Game Template! I put a hold on a few features and cut down the price to release it earlier. This is an expansion on a bunch of classes I wrote on one of my threads. What makes this different is I re-wrote and added on over 218 functions. Each class is designed to work with each over. An example would be Dynamic Resources using the File class to access the database of resources for loading and searching. I created the Game Template with several things in mind: Automation, Performance, Management, and ease of use.

Cost: FREE
Free Go here: http://forum.thegamecreators.com/?m=forum_view&t=187007&b=10

Function List: View List using Google Docs. Over 218 functions! For a full function list download the PDF file attached to this post!

Requirements: You must have the required plugins. If you do not have the Dark Data or Enhanced Animations plugin then comment out any functions that use Dark Data or Enhanced Animations.
- Matrix1Utils
- Dark Data (Optional)
- Enhanced Animations (Optional)
- Unity Or Barnski’s Lua

Terms of use:
- The work is sold "as-is"
- Can not resell
- Can not redistribute
- Can not take credit for this Game Template
- Can not share source code anywhere

The Game Template is copyrighted by MyFreeCopyright:
- Game Template: http://myfreecopyright.com/registered_mcn/CRNP2-GNV3Y-J9N9R
- Game Template Update 1.0: http://myfreecopyright.com/registered_mcn/CPW6Y-1XCDB-KSBQJ



Features


Resources

Indexes are hard to keep track of and you sometimes end up with a lot of empty indexes that you could recycle. The template assigns indexes, recycles indexes, and searches for indexes by name with ease. When the template starts a File Database is created for looking up resources and where they are located. You can load a resource just with a name and the index is returned. You can also lookup loaded resources to find that index.

Highlights:
- Store Resource names you loaded in Lua Arrays
- Plug into the File class to search for resources
- Load a Resource by name
- Manage Resources indexes and recycle unused ones
- The alternative to loading by name is by full path which can be hard when you have to manage many resources by Index
- Name your own resource indexes with NameResource and GetResource

Performance

Performance is also another major feature of the Game Template. The Performance code will run the loops at a constant rate of Loops Per Second. Threads are also run just like loops. You can set the rate of any performance loop or thread giving you control of how fast or slow you want everything to update. Whenever a loop isn't running it will use "Nice Wait" to return the unused time back to the processor. This means the CPU usage will be very small. As you use more CPU power the CPU usage will go up. This technique insures that the CPU usage will be minimal.

Highlights:
- Create a performance loop using "Loop_" function tag
- Run at an specific rate. (Loops Per Second)
- The Loops Per Second rate will reflect as the Frames Per Second rate because sync is being called the Loops Per Second Rate. Ex. A Loops Per Second Rate of 30 will yield 30 Frames Per Second.
- CPU usage is minimal because wasted time is calculated and returned back to the processor.

Performance Console: The values that are displayed here are used by my performance class to calculate the wait time and the loop rates for each loop.


Timing

You have two different types of timers: Normal game timers and event timers. Game timers just keep the games time. You can reset the timer at any time using ResetTimer(). An event timer is a countdown timer that calls a function when it reaches 0. It can run once or reset when it reaches 0.

Highlights:
- Create Game Timers
- Create Count-Down Timers
- Create Count-Down Timers with Events
- Reset any timer using ResetTimer(Index)
- Get Milli-Seconds, Seconds, Minutes, Hours from a Timer

File

The ScanFolder function will scan all the folders and sub folders and add all the files/folders to the array. The array can be saved via Dark Data database or .dat File.

Highlights:
- Stores every file in a database for easy access
- Load the database rather then searching.

Animation

I cataloged all the animation for: Character Shop, The Apocalyptic Pack, and Model Pack 10. It will automatically extract and write an animation list for every animation. You can also load an animation using the LoadAnimation() function. Any animations you load can be looked up the index using GetAnimation() function. You can provide the Objects Name and the Animations name to get the index. I formatted the File Name of the .anim file to be easy to parse. This makes searching and loading easier.

Highlights:
- Automatically searches for objects and if they exist then extract the animation files and an animation list.
- The File Class can handle the files and be loaded by name.

Flexibility

I make the game template flexible. You can decide what you want to use. There are two types of databases: File and Dark Data. You can use Unity if you bought Unity or Barnski's free Lua. If you don't have Dark Data then you can use a File Database. You can use Dark Data, Array, or Lua file resource searches. There are a lot of flags for controlling what you load or process. Everything is made for ease of use and to have many different choices of methods.
There are many other features. Check out the help file attached for a complete list of all the functions.

Alpha Features: Features I added, but they are still in the alpha stage.
- Multi-Threading: I haven't implemented mutexes fully. Variables being access by reading/writing from the new thread or the main thread still causes a crash.
- Mutexes: I am using Mutexes just for Thread performance. The Mutexes will be added in the next full update of the Game Template.
- Debugger: To make things easier to debug I created a basic debugger to catch errors, warnings, and messages and send them to the Command Center.
- Command Center: The Command Center displays errors and outputs messages and warnings to the console window if the console window is active. You can also pause the game using the Command Center.
- Performance + Threads: The thread's performance is handled by the main thread's UpdatePerformance() function. It would be easier to control the performance from the inside the thread. I will implement this next update.

How updates work:
- Free Updates are added when it is a small addition to one of the classes.
- Some updates cost money and are just a few dollars on top of the price of the Game Template.
- The Game Templates price will increase as I add more updates/classes to the Game Template.
- You can buy the Game Template anytime. I keep track of what version you have and calculate the cost of updating to the newest version. It would only be a few dollars normally to update to the newest version.
- Updates are distributed via a link sent to your email. The link will expire once you download the update.

Other Features:
- Separate Classes with examples
- Separate Builds for each plugin. Just load the Build based on which plugins you own
- Complete Help File: Contains documentation for every function and important variables
- Competition Game Code: Below is a preview for the first mini-competition. The game code is completed and shipped out with the Game Template. It is code for a Ball Game included free with the Game Template.

Free Updates: Will be released soon!
- Tutorial version: Full documentation. The difference between the help file is that the game template will be completely broken down and explained where the help file explains how to use the template and each function. I will release this after the competition.
- Examples: Examples showing how to use each class. I will release this after the competition.
- Bug Fixes: If there are any bugs then I will fix then and release the bug fixes free.
- Competition Game Code: Some basic template for a video game that you will base your game off of.

Notices:
- At game startup and game resume there is a lag. That is due to the performance catching up. Sync has this same behavior so it can't be fixed. It doesn't affect the game templates performance after the initial game startup. I noticed this behavior is the same as the Sync command with starting at a high fps then jumping to the set fps.
- Multi-Threading: Variables being access by reading/writing from the new thread or the main thread still causes a crash. Mutexs should fix that issue. This is how Multi-Threading is designed. If you do something incorrectly it could result in a crash. I will post fixes via Mutexs soon.

Possible Updates: These are just ideas of what to include in future updates.
- Animation: Parses and processes FPS Creator Model Packs and generates the anim files and animation lists automatically.
- Sound Packs: I might hire someone to make some sound packs for basic video game sounds. The sounds are mostly for character and walking sounds for every surface. I also want to get a class for automatically adjusting the efx sounds depending on the surface and room.
- Other Features: I added the other features I plan to add on my blog and on my WIP thread.

Help Wanted


I am looking for help with development of the Game Template. Progress is slow and I need the extra help. You would get a fair portion of the profits. If you are interested then email me. My email is under my account info.

Updates are posted on my blog:
http://digitalfuryblog.tumblr.com/

Let me know of any Thoughts, Questions, Comments, Ideas, or bugs.

DigitalFury

Help File Attached

Donate to the Game Template!

Attachments

Login to view attachments
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 6th Feb 2011 04:19 Edited at: 19th Feb 2011 02:43
Tutorials + Examples


Here are some tutorials and examples showing a few features of the Game Template. I will post new examples here whenever I finish them.

Coroutines


Google Doc: Click Here To View

Example:


Example 2:



Multi-Threading


Google Docs: Click Here To View

Example:




More Examples Coming soon.

For more tutorials view my thread: Tutorials + Code Snippets For All

I will post the performance demo here soon. Check back.

Updates


Update 1.0:
Separated out classes, make some small examples showing how to use each class separately, finished up the competition starter code, and fixed the bugs listed below.

Modular version:
- Separated Classes and created examples for every possible combination of classes.
- Created several Game Template builds for: with Dark Data Database or without Dark Data Database and with Unity or with Barnski's Lua.

Other additions:
- Added the Competition starter code

Bug Fixes:
- ShutDown Flag for Command Center wasn't working both ways. Fixed by closing via the Executable's Handle.
- Other various bug fixes with Animation and File were fixed and updated before the Game Template sold one copy.
- Instead of Closing the thread using CloseThread I found a better command ExitThread for shutting down the thread correctly.

Update 1.0 Patched:
- Database string from size 99 or 199 to 499 for extra long strings. Fixed folder problem.
- Lua_GetFile to Lua_FileGet And Lua_AddFile to Lua_FileAdd for barnski's lua.
- Removed end from GetFolder function. Re-wrote the function in the last update and left that command.

Game Template Update 1.0 Patch 2.0: Update 2.0 Pre-Release
- Ball Game Example
- Documentation: Performance, Coroutines, Multi-Threading
- Input: No Key / Any Key function tags
- More additions to the Examples
- Bug Fixes listed below

Bugs Fixed:
- Resource Search: Fixed Less then 0, Equal to -1, Equal to 0 = Index not found.
- FileGet/FileAdd: Changed Index to 1 instead of 0 so it can determine if the index was found or not.
- Load Resource Functions: Had to correct some code to make sure and index is returned and the type is correct.
- File: Some remaining code from the GetFolder re-write. When database is created it is closed. Have to load the database after creation. (Dark Data)
- FileAdd/FileGet – Some commented out code isn’t correct. Updated.
- Multi-Threading: Load time is different depending on what you are doing with your game. Instead of waiting 750 milliseconds I am waiting for the CanRun flag to equal 1.

Game Template Update 2.0:
- Ball Game Example
- Documentation: Performance, Coroutines, Multi-Threading
- Input: No Key / Any Key function tags
- Test everything and compile all executables.

Ball Game Example: Included in latest build of the Game Template!







Competition:
- Will update competition rules and post competition later. I want to finish updates and release it before hosting this Competition.

DigitalFury


Game Template: Everything you need to develop your games. Command List

Attachments

Login to view attachments
Wyldhunt
14
Years of Service
User Offline
Joined: 27th Sep 2009
Location: The Dark Side
Posted: 9th Feb 2011 11:59
SOLD!
At least, you will have a sale as soon as I get home from work.
You've always had amazing code and tutorials.
For the price, there's no way this could be a bad thing.

Thank you for all of your work,DigitalFury.
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 9th Feb 2011 21:27 Edited at: 10th Feb 2011 02:45
@Wyldhunt - I am just wrapping up new additions this week to the Game Template. This includes: Some Basic Examples, Separate Classes, and the Competition Starter code. I just finished the updates and it will be available when you buy the Game Template.

Thanks,

DigitalFury


Game Template: Everything you need to develop your games.
Wyldhunt
14
Years of Service
User Offline
Joined: 27th Sep 2009
Location: The Dark Side
Posted: 10th Feb 2011 05:26
I haven't had enough time to really put the template to work yet, but a quick read through the help files and the code impressed me. This is a solid game setup and your planned updates all sound good too.

I hope you're selling more of these. I don't have a lot of time to spare for a ball game, but the competition would be fun.
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 12th Feb 2011 05:06
@Wyldhunt - Thanks for your Input here and on the WIP.

I added Google Checkout to the payment options. I might look into more payment options if needed.

The next update for the Game Template will be released soon.

DigitalFury


Game Template: Everything you need to develop your games. Command List
Hockeykid
DBPro Tool Maker
16
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 13th Feb 2011 23:33
Purchased,
How long should we expect the files to take to be emailed, or whatever?

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 14th Feb 2011 00:39
@hockeykid - Within 24 Hrs. Finishing next update. Testing everything. Should be done by the end of the day. Want to make sure u get the newest code.

DigitalFury


Game Template: Everything you need to develop your games. Command List
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 17th Feb 2011 05:14 Edited at: 17th Feb 2011 05:14
Going to post some demos soon to show off the features of the Game Template. The problem is that the Game Template is completely non-visual. It is the background framework that helps game developers with all the technical stuff and leaves the designing to the developer.

Hopefully I have the demos posted here before this weekend.

DigitalFury


Game Template: Everything you need to develop your games. Command List
Wyldhunt
14
Years of Service
User Offline
Joined: 27th Sep 2009
Location: The Dark Side
Posted: 17th Feb 2011 06:25 Edited at: 17th Feb 2011 09:58
I work 6 days per week, and 10 hours per day. So I don't have as much time to script as I would like (A few hours per week)...

However, I'm working on converting Evolved's Advanced Lighting system with their terrain editor in to this template as practice so that I can get the hang of all the new functions and how it's set up.

When I finish, it may make a good before/after comparison to see how much this template can speed it up. Given, most of the lag from Evolved's ter gen comes from the huge list of shaders running, so I don't expect a huge speed boost. I'm curious to see what I can thread or at least run as a co-routine in the template though.

I'll post my version here when I get it stable.
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 17th Feb 2011 23:47 Edited at: 20th Feb 2011 22:36
Start my job this Monday. Game Template development should slow down a bit, but not by much. I still should have 3 hrs a day to work on the Game Template. I am working on releasing the next update.

DigitalFury


Game Template: Everything you need to develop your games. Command List
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 24th Feb 2011 19:39 Edited at: 27th Feb 2011 04:52
Sorry for the delay in updates. I worked out all the concepts I just haven't had the time because I am still adjusting to my new job. Hopefully I will start up everything next week. There may be an even further delay due to the major changes in my life.

These updates are going to make the Game Template a lot more flexible and easier to use. I am working on making every class truly modular. I also am going to add a complete game demo showing how to make games using my Game Template. Later I might add some more complete games to the Game Template.

DigitalFury


Game Template: Everything you need to develop your games. Command List
Stormwire
13
Years of Service
User Offline
Joined: 3rd Sep 2010
Location:
Posted: 11th May 2011 05:25
Please kill the jumping monkey Please! Looks like a good idea. May have a better look later when I have time. Also kill the monkey
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 13th May 2011 05:18
ik right. I put that there so people would be annoyed :p I've been busy as hell but the potential is a very very stable game development suite of tools.


Game Template: Everything you need to develop your games. Command List
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th May 2011 09:16 Edited at: 16th May 2011 09:16
Quote: "Most programers write the same code again and again and spend a lot of unnessesary time on debugging, design, and writing the video game"

Not if they've been programming for a few years at least, we reuse code a lot.

Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 20th May 2011 08:47
Quote: "unnessesary time on debugging, design, and writing the video game"


Wow really?! Learnt something...

Your template is looking good, but more a engine other than a template. Keep it up!

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 9th Jul 2011 23:23 Edited at: 11th Jul 2011 06:33
Been busy lately that I haven't had much time to work on the template. I'm working on some new features at the moment:

- UV Mapping with Editor to control object materials
- Animation with parser for loading FPS Creator files
- Full 2D and 3D Editor for real-time editing
- Terrain editor with Fractals, Thermal Erosion, Perlin Noise, and Diamond Star for generating terrain.
- Built in and real-time editing of evolves shader pack
- AI behavior lib
- Bone Structure for rag dolls and animation translation

I have been researching and working in terrain algorithms. I have a few algorithms done. I'm working on optimizing them. I have been working on the animation parser and it has been working out quite well. Working more on the 2D editor. I am also working on GUI.

Need some help with: (I spent a lot of time looking for the algorithm lol)
- 2D To 3D Point conversion: Point of a polygon to 2d triangle. You have point x, y, z from the polygon to triangle point x, y. I know that the z will affect the x and the y.

Anyone good with math? Could use the help. If I figure it out I can finish up one of the major features I'm working on.

Thanks,

DigitalFury


Game Template: Everything you need to develop your games. Command List
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 11th Jul 2011 06:07
Quote: "2D To 3D Point conversion"

I believe the command 'pick screen' is what you're looking for. Although you have to provide a distance value, but you'd have to do that anyways no matter what you use.


DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 11th Jul 2011 06:30 Edited at: 11th Jul 2011 06:32
@Dar13 - Should have been more detailed in my problem:

Polygon has x3 points. Each point is 3d. I need to convert each point to a 2d triangle so I can use my data for my algorithm. Pick screen wouldn't help cuz this is all math. lol

You have point x, y, z from the polygon to triangle point x, y. I know that the z will affect the x and the y.

Thanks


Game Template: Everything you need to develop your games. Command List

Login to post a reply

Server time is: 2024-04-19 03:54:33
Your offset time is: 2024-04-19 03:54:33