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 .NET / DarkGDK.Net && C#

Author
Message
vapor
13
Years of Service
User Offline
Joined: 27th May 2009
Location:
Posted: 20th Aug 2012 18:39
It's been a while *long while* since I've browsed the TGC forums. I have a long on/off history with DBPro (anyone remember the old Lee Bamber developer blogs detailing his snooker outtings?) -- and a few years back I made an impulse decision to purchase DarkGDK .Net (although I never used it at all).

After messing around with HTML5 'canvas' based games for a bit -- I've decided to start a new RTSesque project... and am currently evaluating DarkGDK .Net (using C#) for a potential fit to my purpose.

So... only a total of 332 threads on the TGC forum for DGDK .Net, and many those speak to the trials and tribulations of those who have come before.

Just wanted to start a series of posts related to my test cases -- to share what I find...

I'll post back soon, right now my first unit tests are in regards to general UI (running with gdk control embedded in window form) and with Sprite animation performance.
vapor
13
Years of Service
User Offline
Joined: 27th May 2009
Location:
Posted: 20th Aug 2012 22:00
I created a working C# Winform app (no sweat) and started with my first unit test (sprite animation). My intent was to compare the performance of a 2D AnimatedSprite vs. texture swapping on a 3D Plane.

...but...

Problems right off the bat. No matter what variance I tried, the result was always the same (blank screen, no errors). Checked the forum (sprite animation) and found several posts, all complaining of broken functionality--all ending with no resolution.

Does anyone have a working example of sprite animation using Basic2D.AnimatedSprite?



I've tried positioning and playing the sprite inside and outside of the game loop, however it never shows.

I can use the attached sprite sheet and simply paste it on the screen as an image (so no format issues)... however it does not display as animated sprite.

On to the testing of texture swapping on a 3D plane.

Attachments

Login to view attachments
vapor
13
Years of Service
User Offline
Joined: 27th May 2009
Location:
Posted: 22nd Aug 2012 23:00
I had fairly good results swapping textures on a 3D plane (a POC to see if animating sprite sheets or individual sprite frames would work ok).

My next test was to create a simple tile map based on 3D planes, also testing the MousePick() which proved easy to find a given tile onclick. For my purposes, I placed a camera always looking Top/Down... and x-rotated the planes by -90 to place them flat. I tested tile maps up to 100x100 still running around 60fps (granted, my laptop is i7 w/ NVIDIA Quadro 2000M -- but not top notch by any means).

Here is the source for the Application class I'm using for testing:


Next test will be multiple layers (for tile map) as well as animated characters (texture swapped planes) to get an idea of where the perf is on legit scene.
APEXnow
Retired Moderator
19
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 5th Sep 2012 11:25
I like the idea of what you've decided to do here to show the shortfalls or advantages of using C# to develope DarkGDK.NET applications. The main problem which has been an issue in general, is the lack of good tutorials. Although it does come with a small set of samples, unless people are generally familiar with the structure of an application, it can be difficult to understand what is really going on.

Other problems which I have never been able to resolve, is of course, the mouse event and general input issues associated with a WinForms application. Fullscreen applications work a treat because you can totally rely on the engine for most of the work.

I'll keep popping by and lending any support if needed, but at work most of the day so forum visits usually happen in the evening and weekends.

Paul.

vapor
13
Years of Service
User Offline
Joined: 27th May 2009
Location:
Posted: 18th Sep 2012 16:20
Been a while since my previous post. I decided to move forward with using the DarkGDK .NET as my display engine (I’ll explain in the following paragraphs) and had some key plumbing issues to work out in other areas of my game (again as small proof of concepts while assembling the tools I wanted for the project). Let me preclude the following paragraphs by saying that I will be posting a complete VS2012 project that will provide a starting point for your own adventures using the DarkGDK .Net libraries complete with some basic abstraction of key concepts to help you out based on my work and exploration. This however, is not the post containing that code, but I will be uploading within the next day or so.

Starting a game project (even a small one), as many of you know, is a fairly monumental effort. How many times have you (or someone you know) just trudged right in and started coding the game—only to find a few weeks into it that you missed some really big chunks that end up making it fairly pointless to go on (or greatly compromising your overall vision). The great example (a pitfall of mine on several occasions over the course of my DarkBasic history) is deciding that I would simply code up the next MMORPG using DarkBasic (and this is back in the day before the gdk, basic networking, or DLL support was included). Needless to say… Fail.

What I’ve learned over the years in software development, is that the devil really is in the details—meaning there are numerous things you typically push off until later (authentication, scene management, network support [if any], etc…) while focusing on the things that are the most fun and visual (as that is where the satisfaction typically is, the sweet spot so to speak). This works great for short projects, general learning (by trial and error), and functional prototyping to vet ideas… but things get out of control quickly when you want to start trying to figure all the details out later.

Let’s face it, if you were a professional game developer, you aren’t using DarkBasic to build the next blockbuster… but that doesn’t mean you can’t build a great game (and make some scratch if that truly is your goal) using the DarkBasic tools available. If you decide to go with the DarkGDK .NET route – then I think you have some really good options considering you can leverage all of the .NET stack to build up game components outside of DarkBasic. There are many DirectX wrappers out there – but I think the simplicity of DarkBasic has always been a key differentiator.

All that being said (yes, it was too long) – I decided to make my next post a working VS2010 project that is a good starting point for any type of project you might want to start that requires a basic game shell, networking, and code abstraction (in case you decide to change a core component like the network approach or the actual display engine itself). I’ll also be posting some additional updates along the way, and although they [future posts] will derive from the shell in my next post, they will be more specific to the project I’m actually working on (a top-down multi-player RTS game called CardCraft). The intended audience is for those already familiar with the .net stack (specifically C#) but needing a jump start with some of the actual tooling and mechanics of starting a DarkGDK .Net game.

Login to post a reply

Server time is: 2022-08-07 17:25:22
Your offset time is: 2022-08-07 17:25:22