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 / OOP w/ DarkGDK

Author
Message
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 8th Apr 2008 02:03 Edited at: 8th Apr 2008 02:04
Quote: "Referenced by name? Hmm. Wonders how this accomplished.. simply naming each class, an array index'ish lookup of name value pairs, a double linked list, hmmm...
"


Really simple, actually. Quickest example would be my sprite having a private variable

int spriteNumber;

in the public sector I have an overridden operator

operator int () {return spriteNumber;}

So if I have

Sprite mySprite;

int temp = mySprite;

has the named object "mySprite" returning the value I set for it.

Jobwise: My primary function isn't really programming. I'm the email administrator for Dallas County Community College District. Programming is something of a side-effect and a hobby. It allows me to parse out and analyze reports. In theory I can write interfaces directly to the mail system but all the other duties keep me from dedicating time to the learning curve. Twenty years there and I still haven't found the time.

In my previous job I did programming for a specific inventory, shipping and billing suite of programs. But that was only part of the responsibility of running the small IT department of the retail seller. I made a bit of money on the side by writing programs for the company that sold us our equipment. Otherwise, the only money I made was for a program I called AdMuse that generated a .ROL file for the AdLib card ( RIP.) I earned a whopping $85 shareware for that.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 8th Apr 2008 02:09
Hmmmm. Tried to edit the post and it argued with me. Home this isn't a repeat.

Quote: "Referenced by name? Hmm. Wonders how this accomplished.. simply naming each class, an array index\'ish lookup of name value pairs, a double linked list, hmmm...
"


Really simple, actually. Quickest example would be my sprite having a private variable

int spriteNumber;

in the public sector I have an overridden operator

operator int () {return spriteNumber;}

So if I have

Sprite mySprite;

int temp = mySprite;

has the named object \"mySprite\" returning the value I set for it.


Jobwise: My primary function isn\'t really programming. I\'m the email administrator for Dallas County Community College District. Programming is something of a side-effect and a hobby. It allows me to parse out and analyze reports. In theory I can write interfaces directly to the mail system but all the other duties keep me from dedicating time to the learning curve. Twenty years there and I still haven\'t found the time.

In my previous job I did programming for a specific inventory, shipping and billing suite of programs. But that was only part of the responsibility of running the small IT department of the retail seller. I made a bit of money on the side by writing programs for the company that sold us our equipment. Otherwise, the only money I made was for a program I called AdMuse that generated a .ROL file for the AdLib card ( RIP.) I earned a whopping $85 shareware for that.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 02:56
Wow - thanx for the response. I'm surprised you aren't a full time developer. I am glad its your hobby though

Personally - after that DarkGDK OOP release of mine Sunday - I'm kinda burnt - Tonight I'm finally free to code - and I just can't get into it. There are drawbacks to coding all day at work ... even if it is ALOT more fun to code game stuff. Sometimes - you see the word Microsoft and you want to run for your Brains serenity!

I'm RIGHT AT THE BEGINNING stage of writing a OOP GUI that I need to get to the Editor part of Iron Infantry - and my heart's just not in it today... but I think that code release I did has some cool stuff in it.

You should download it just to try out the "Big Terrain" test_*.cpp demo that's in there! (Just remove the GameClasses' project property->linker->additional dependancies: "DarkPhysics.Lib" if you don't have DarkPhysics, and you should be ok for a fly around in a rather large terrain based on USGS download of an island in hawaii... only slightly doctored to fill the whole "square" heightmap.

The GUI stuff is going to work via a virtual interface - so it'll be kind of complex to write. Basically, like your moouse class is a snapshot of the "mouse" of a point in time (when you poll it) This "Virtual Interface" is the same thing in someregards - its just that you either populate it from the mouose, or populate the info from another source. This way I SHOULD be able to pull off both 2d menu's and windows (Traditional) as well as 3d menu systems using the same code base.

Wish me luck

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 8th Apr 2008 03:32
I wish I could have ended up as a programmer. To me it's not about logic, it's about creativity and puzzle solving. The downside of my current environment is that we're not a programming house. I don't really have anyone here that I can do a give and take with. The guy across the hall from me is a VB .NET type so he's no help with C++/C#. We have a programming department but they write in a language specifically for our Colleague system.

I understand about having the heart. That's why I have to put things aside for a while. But I'm constantly thinking on the problems even if I don't commit it to silicon. Quite bizarre the thoughts going through my head while I spent a day at the local Renaissance faire.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 03:36
LOL - you are So cool. Sux about work though. Surprised when I hear about .net people not understanding C++. I don't REALLY see how they can be that good at .Net without understanding stuff closer to what's really going on. I wonder about this stuff myself.. and renaissane faires are cool.

Yeah - my blogging here is kinda of a reprieve really from the heads down coding stuff. Note - I think its creativity and logic wrapped together - I call it "ART"

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 8th Apr 2008 03:41
My roommate probably knows more languages in general than I do. He was the one one who tried to get me interested in C#. But I ignored him until XNA became available. Now I think I out do him in the C* arena. But he knows more about VB, Python and Lua. And since I know next to nothing about them.......

So there you go, the next big language.... C* (pronounced see-star.)

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 03:46
Cee Star? Should O google this? This is another prog language? (Or are you pulling my leg and I fell for it hook line and sinker?)

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 8th Apr 2008 04:14
Not so much a prank as a joke. With each evolution of the C tree we use a new symbol. The * should cover everything.

Come to think about it, in Unix language that would be C Splat. Maybe not so propitious.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 04:37
LOL - so - question - Lilith - think you'll ever check out that demo program I told you about? I'd be curious to hear what you thought of it.

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 8th Apr 2008 05:02
Quote: "LOL - so - question - Lilith - think you'll ever check out that demo program I told you about? I'd be curious to hear what you thought of it."

I intend to. I just need to find a bit of space. My roomie picked up a used Mac this evening so he can be more familiar with the brand for his new job and I'm spending a lot of time listening to him extol the virtues of his new(er) possession.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 05:14
Ghthor
16
Years of Service
User Offline
Joined: 5th Apr 2008
Location:
Posted: 9th Apr 2008 02:11
I Tried to Post the Thread Wrapper I'm using on here but I don't think it ever got posted.

Taco Justice
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 9th Apr 2008 02:13
Try Again or email me - I'll make it happen I want that puppy.

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 12th Apr 2008 03:56
I'm sorry I haven't posted in awhile -- I'm still working on it, but have been busy lately. I'll post some updates later once I get my mouse working.

90% of statistics are completely inaccurate.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Apr 2008 16:51
@AndrewT - Ok Man, keep us posted.

@Lilith - I Got your email and responded to you. Brilliant Project BTW!

@Everyone - I haven't heard much feedback about the latest distribution of my FREE OOP library. I don't have a real name for it. It's located here: http://code.google.com/p/darkgdkoop/

I've been real busy with my day job - I'm a programmer in real life too - and every so often there are so many projects on the table - I have to burn the midnight oil - and that means I'm not working on my hobby projects.

As of late, I'm working on a GUI - and its slow going. Because it's difficult for me? Nope. I code a few miutes, and step away, and play a game like BattleField Vietnam - (Which is very similiar to where I want Iron Infantry to be). I play the game to motivate me - then I go back to coding some more.

Why the lack of enthusiasm? Writing GUI's stinks! I've done it many times, and each one I've done got antiquaited and it bugs me. They are A LOT OF WORK for a good one! I made one for CharCell - windows - sizing, buttons, edits, controls, etc. Looked better than Borlands! But it was a pain to write - took forever.

Now this one is a grphics one - which is harder. Harder still is the fact that I need to make it pleasantly coexist in front of (or be part of in a secondary rendering method) the 3D "world" that exists "behind it".

The design is Object oriented, and something that is nice about FreePascal and C++ is that you can actually STORE the ADDRESS of a FUNCTION in a pointer, and then CALL that function via the pointer!
This makes it possible for very flexible "Event Procedures" - so that you can write the GUI... and if an event is fired - AND that Event's "Procedure/Function" Pointer - if not NULL - simply gets fired.

Now this is all swell - but the problem with GUI development is that they are not exactly linear. There needs to be a messaging system, and the "gui engine" needs to both generate and process these messages.

What are these messages? Well.. think about when you have two windows on the screen, and you click on the window that is NOT IN FOCUS. This generates a message to give the window Focus (If its enabled, nothing MODEL (MODE+ELL not model) on the screen preventing this. Ok - So skipping all the mouse move messages from zipping the mouse over whatever windows and control widgets - You not only have to generate the "message window got focus" you need to FIRST post to the window that had focus that it LOST focus. This ensures events fire properly you might have hooked on the lost focus deal.

So in short - It's time consuming, takes awhile - and debugging is a pain for me anyways. Once you get it though - its pure harmony.

I know there are other guys doing this same thing - and what's neat about GUI development - is regardless of the skins - (or lack of skins - just colors or whatever) and customizations to whatever - EACH GUI in my opinion has its own "Style" so for all those touting "Just use the DirectX one" - don't feel like it. Just use So-and-so's GUI - Naaaa...

For no other reason than to keep my skills honed, have my own look-feel and most importantly - STYLE!

Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 13th Apr 2008 17:16
Hi Jason ... couldn't agree more. I'm in the middle of writing my own one too for just those same reasons. I don't want to be tied in to someone else's look and feel plus it’s a great exercise in OO programming.

It's currently based on using sprites as they seemed the easiest way of ensuring it all floats over the 3D background. So I have an overall GUI Screen Manager class in there controlling it all and a Bitmap Manager class which is called when resource is required by the Windows class and any of its derivatives. So far I have most of the framework mapped out and I'm starting to put the flesh on the bones.

I have movable windows with transparency up and running which will soon be able to take on any background image allowing them to be highly configurable to suit gaming themes etc.

Like you say ... a lot of work but hopefully worth it in the end.

I'm hoping to then go on and integrate true 3D Font support too allowing some interesting special effects for text under the control of the GUI Screen Manager.

No matter how good your code is, someone will improve on it
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Apr 2008 17:51
Awesome!

BTW - I'm doing the sprite thing first also - ALL I've done to "put the marker in the sand" as it were for the 3d menu things - is this:

I have a class called "JGC_PIXELGRID" - It's just a class that wraps a memblock. The format of this memblock is that same as the GDK function "dbMakeMemblockFromImage()" command. (though I only use 32bit).

anyways - this class has a bunch of functions to set individual pixels - by color channels/alpha and whatever - I have a few fill box routines in it etc.

Basically this class adds up to the following:

1: Microsoft Paint in a class - that works on my Memblock
2: I can take the "MEMBLOCK IMAGE" and Naturally make an Imagefrommemblock.


By having this be my core of each window - then my Paint Method just checks if the window is flagged to "Paint to Sprite" or not. If not, It'll render to a plain.

Additionally - the routine I have that checks the mouse stuff and whatever - is done according to the render target (Sprite or 3d plain).

If the render target is sprite - then mouse coordinates are taken at face value.

If the render target is a PLANE in 3d or whatever - then the "MOUSE COORDS" come from match based on center of the screen, look vector, raycast, normal, and hopefully some sort of either hotspot list (Like a web javascript area map) or better still - somehow I convert the look vector (raycast from camera center) to "where" it smacks the menu plane - so I can use math to generate "Virtual mouse" coordinates.

Again - like you - I'm going for the sprites first - HOWEVER - I'm hoping this is easy to make 3d in the future.

You could try this too. Because if you're rendering your sprite - its an image at the core - and then could be applied to an object or a sprite. I'm sure you've already tossed this around if I know you at ALL

Jason

Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 13th Apr 2008 18:33
Quote: "I'm sure you've already tossed this around if I know you at ALL "


Yeah .. pretty much! You could probably exchange my Bitmap Manager for your JGC_PIXELGRID class too by the sounds of it although I really like your idea of using the memblock as opposed to a straight off screen Bitmap (although I'm guessing behind the scenes the two are the same anyhow, you probably just have more direct control over it).

Quote: "if you're rendering your sprite - its an image at the core"


Precisely... the output from my Bitmap Manager is an image

Well nice to see similar ideas in action either side of the Atlantic

Keep up the good work Jason!

No matter how good your code is, someone will improve on it
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 14th Apr 2008 03:47
Quote: "What are these messages? Well.. think about when you have two windows on the screen, and you click on the window that is NOT IN FOCUS. This generates a message to give the window Focus (If its enabled, nothing MODEL (MODE+ELL not model) on the screen preventing this. Ok - So skipping all the mouse move messages from zipping the mouse over whatever windows and control widgets - You not only have to generate the "message window got focus" you need to FIRST post to the window that had focus that it LOST focus. This ensures events fire properly you might have hooked on the lost focus deal."


First a quick note to say I think you meant "modal" not "model."

What I think you're doing is pretty much what I did with a DOS program years ago to implement some primitive menuing and what I think Windows programs do, roughly. I never had the ambition to dig into the compiler specifics but there's essentially a table that gets built out of macros that specifies which function to call or at least which object to send a message to. But that's mostly taken care of by the IDE. It would be interesting if someone could design a pre-processor for the GDK (note I'm not raising my hand) that could take care of placing things in a "form" and generating the code to gather the events and "distribute" them.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 14th Apr 2008 04:59 Edited at: 21st Apr 2008 23:01
Quote: "First a quick note to say I think you meant "modal" not "model." "
Oops - Yup - I meant Modal - that's for sure....

Well the whole macro thing is one way to skin the cat.

(BTW - you get my email back? I responded to it... Brillant was the basic thoughts about your project Lilith).

As for what you're saying would be Cool for auto-magically writing code - like C# does in the IDE etc... I'm hoping to get there eventually... but my first goal is just an editor like vb6, .Net forms, Sales Logic, Microsoft Access, FreePascal Lazarus, and Delphi... But I doubt I'm going to make 50 widgets - more like radio, check boxes, text boxes, labels, MAYBE a tree Control, Combo-box and list control.

I don't want to "Raise My Hand" either because I know how involved all this is - and frankly - like I said - it's not the most fun kind of coding there is. I can't wait to get back into the game stuff again

Jason

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 14th Apr 2008 05:24
@Jason

Yes, I got you email but this has been a long and strenuous weekend so I haven't had time to put my response in binary. I'll get back to you tomorrow between naps at the office.

There are some rewards to doing the workhorse coding but I only get to that when the need arises. And if something like that comes out of me it will certainly be a day late and a dollar short with regards to where the industry is by the time I finish it. And if it reached a lot of other people there's the documentation and training to have to deal with. Another generation wasted.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th Apr 2008 20:10
@jason
You don't HAVE to have a messaging system ViewGUI works perfectly fine without one You can safely assume that there is only one mouse, and so you can use global variables for things like that.

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 15th Apr 2008 20:13
Actually I have two mouses and two keyboards hooked up at home. But they act like Siamese twins controlling the same body.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 16th Apr 2008 02:04
@Diggsey - You're right. I Could go with global mouse - however I'm not sure how else to handle cascading events without messages. Though - everybody misses stuff here and there - so I just might not envision what you mean.

I know I could make a simple menu system - even a multi windowed gui without messages - but I'm trying to emulate the whole shebang as it were - so I can write applications and game guis all with one code base.

The whole 3d menu versus 2d menu thing isn't as far a jump as it seems - so I'm still coding 2d more or less - but keeping things ready for the 3d jump when I get that far.

How would you handle cascading events without messages? Or would you just not cascade and use a context sensitive "reaction" to user input. Which BTW is perfectly acceptable - I'm just not sure if I want to go this route simply because of reasons I stated above.

@Lilith - 2 Mice - One Body? Sounds Sci-Fi.

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 16th Apr 2008 02:36
Quote: "@Lilith - 2 Mice - One Body? Sounds Sci-Fi."


Oh!! Then word of my next project has leaked out?


DAMN!!!

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 18th Apr 2008 15:54 Edited at: 18th Apr 2008 16:05
jason p, long time no talk. I see you won the battle of OOP wrappers. LOL I remember the 20+ page of properly handling ID's with me you mike kbessa and others.. Anyways nice to see there is one in circulation now. I always though it would be best to combined our efforts and use one global wrapper. Anyways I have not grabbed your code yet and will in time. I just got Maya to export a good X model. man was that a bitc....asterd. So I'm back on GDK for now. I was about to just ship and go Irrlicht till I found a solution. My wrapper has some pretty cool stuff, like an animation and joystick(isUp, IsDown, wasPreseed) class. If you like we can compare notes and maybe you can adopt some of my code.


Also , are you planning on making a doc HTML ref? I know itelsence is nice but its always good to have reference.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th Apr 2008 02:21
WOW - Good to see you old friend! Sounds like a plan. Glad you're around! Yeah - Irrlicht is nice too - I kinda like GDK though - familiar with it - know its demons etc.

I'm glad we have/had those threads about the right ways and just different ways we all do stuff - always great reads!

We have a new power user... Lilith! (Plus all the other die hard reg's)

I have only gotten around mouse for a UI class so far. Will be interesting to peruse each others code.

Lately - I'm tackling GUI - and going slow - purposely - (not my favorite thing to code) So I'm alternating with playing/buying games in the similiar genre of Iron Infantry and JUST PLAYING - ... Though its not for fun (yeah right) its just Research! LOL

Tried ArmA (I guess sorta like Call of duty 4 - which I haven't played yet) and ArmA needs a POWERFUL PC. Sweet - Almost to complex and to gfx heavy. I just downloaded 2 oldies - Gunship! and Dangerous Waters, and I just finished Apache Assault.

It's funny - playing Apache Air Assault gave me a lot of ideas - even though these games I'm looking at are dated. I'm looking at how Older games got along with less, and how the newer games are using the new stuff. Just taking it all in. SO MUCH to making the kind of game I want to make! Physics, missiles, guns, Melee, houses, terrain, frustrum, digital "dashboards", the lists go on as you know!

Well.. I digress...sorry - good to see ya back!
Jason P Sage

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 20th Apr 2008 18:46
This is just a work in progress... But Scope It Out... Its the GUI I'm working on ... so Far.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 20th Apr 2008 18:47
This is just a work in progress... But Scope It Out... Its the GUI I'm working on ... so Far.

Picture Attached

Attachments

Login to view attachments
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 21st Apr 2008 14:10 Edited at: 21st Apr 2008 14:43
Nice, a GUI is something much needed around here. I did like that rotation menu you had bundled in. I'm deep in Maya bliss right now, but will be programming soon. Look forward to integrating your wrapper. Looks like our code is similar enough I can just drop my functions in. Your gong to love the 3rd person mario64 like camera stuff I have. If you could use that, that is.. I also just got the phys and shader pieces. Should be able to get my game off ground.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 21st Apr 2008 18:17
I'm always into adding new code that helps things Thanx for the GUI comments... Still working on it. Ran into a snag with it - sorta. Not the GUI itself is a problem, but DarkGDK has a small limit on # of memblocks you can have, and my pixelgrid (memblock image manipulation) class is used one per "Window" and so, if my application for any reason hits the memblock 257 maximum, stuff starts breaking. So if I have 50 memblocks here, and then 20 there, and another 100 somewhere else, then I have to make sure the GUI stays below 3-4 windows. This is a hypothetical.

Last night I saw things start breaking at the 100+ windows mark. Now who needs 100 Windows? Never know... but I'm considering making MY OWN "MEMBLOCK" class more or less.. but I need to figure out the MEMBLOCK to IMAGE, IMAGE to MEMBLOCK deal without to much overhead lost in moving bytes/dwords whatever.

I also might make it so that I FREE invisible Window's Pixel Class until they need to be seen again. This Might just be the Occum's Razor of it all.

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 21st Apr 2008 18:42
Quote: "but I need to figure out the MEMBLOCK to IMAGE, IMAGE to MEMBLOCK deal without to much overhead lost in moving bytes/dwords whatever."


You might take a look at

void * memcpy ( void * destination, const void * source, size_t num );

You may not be able to copy a complete block over at one time if the width vs. pitch difference is an issue, but you should be able to copy entire rows of data within a loop.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 21st Apr 2008 18:47
I think I'm going to go that route. I know that's probably the fastest way... and the freedom of not being limited by # of memblocks is worth some rewriting. Thank You!

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 22nd Apr 2008 03:17
Genius. I wish I could do something like that.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 22nd Apr 2008 05:28
For what it's worth, I got a book on 2D in Direct 3D environment. I'm going slowly with it but it's beginning to look like the image data is definitely 32 bit as stored even if it's not displayed that way. I need to find out if the texture data is maintained that way too. If it is then we've got some avenues open to us.

The one problem is that so far the attack is from the POV of setting up a window for display. Pretty straight forward but there are so many options as to direction to take. What would be helpful is to work backward so you know what a texture width and height is that's already in memory for you. Hopefully that's further down the pages.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 23rd Apr 2008 06:06
Lilith PLEASE keep us informed. That MIGHT be Critical and frankly more efficient than other "avenues" that I'm personally using so far. David W. has made a lot of DirectX + Ageia Progress and if I asked him I'm sure he might shed some light there.

@Zuka - IF you're referring to the GUI - THANKYOU very much - and I think if you couldn't do it today - you can if you try a lot of times. I've tried many times making gui's. They get very BIG and COMPLEX very fast. You have to work in each tiny tiny detail one at a time or else it gets away from you REALLY Easily.

SOMETIMES.. it's almost better to scrap and start again with what you learned than bandaided buggy stuff.

Thank you for the compliment (again - I don't know for sure if you were sending it my way or not) but Thank you

Yesterday, this morning before work, and after work - probably 6-8 hours was spent just geting the ZORDER right for the windows, and the basic mechanics of Changing focus when you click a window (and not making the window in the BACK get focus UNLESS you clicked specifically on it)... also, making the "DRAGWINDOW" and "GOTFOCUS" type functions all working together seamlessly

Lots of work. It doesn't look much different from that screen shot above a few posts - but it does more. I still have A TON to do too! Sizing Windows, Fixed and Sizable Window Frames, making the keyboard or mouse driven menu pull down and keyboard options to move window, restore, minimize, make the actual buttons ACTUALLY register the mouse and react... like the "X", the minimize button, the maximize button, Not to mention the ALT+SPACE invoke of that menu that lets you use keyboard arrows to move around (if I didn't mention it).

Then once that BASIC navigation stuff is done... then I need to finish that default "Button" control's appearance, and start writing all HOMEMADE "Widgets" to put on the windows... I'm just getting started.

<sigh> Can't wait to get to the Level editor when this GUI is 100%

unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 24th Apr 2008 17:41
level editor? how did i over read that, who is working on a level editor, and how can i help. Will it import objects and objects, do environments and phys?
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Apr 2008 19:55
LOL I am working on a level editor, but its more than a level editor. Its going to be a game engine "world" manipulator

Physics, Models, static, dynamic, grass, terrain, trees, designing tree clusters, all of which get's worked into the frustrum culling system that you can control dynamically or default to quad or octtree, but I'm making even this editable.. so you can not only make a level, but can optimize HOW the level is culled. In threory its a combination quadtree/portal system kinda. That code is all written.. need a gui so I can interact with the "user" to basically "Program" how the game will load up. It's literally going to be a ton of edtors rolled into one.... with the "Level" being the "BIG MERGE" of everything. Sounds, trigger spots, etc.

I think I'll need some form of scripting eventually also.

unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 26th Apr 2008 22:28
DO NOT hesitate to ask for help...
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 26th Apr 2008 23:35
How Kind It's hard to ask for help - for me anyway - for a couple of reasons - some of which I'm embarrassed to say LOL.

1: Hard to stay in sync, and not having ownership on a file when I want to change it is rought.

2: I'm working on the "Whole Library" at once in many ways. Example: Had some routines in my File class all using filehandle 1. No Conflict - because they were "complete" functions (Have routines to dump EVERY CHECKLIST to a text file for debugging reasons.) So I am needing a way to debug Gui.. specifically I decide I want a log of messages. So I need a "FreeFile"(handle) function - because the STD lib linking plaque got me - so I stayed with native GDK file IO. So I make the freefile routine, then implement it to all those functions that had a hardcoded filehandle. then I eventually made my Message log for the gui, then moved on. If those files were locked... it would of been frustrating.

3: I don't know the RIGHT way to do everything - no one does - but I at least understand what I did, all the parts, what uses what etc. I don't suffer from "NIH" (Not Invented Here) Syndrome at work, but... in GDK land, I'm a bit more particular. Reasons? For teams - you need source code control and versioning, you need to adopt HOW the core stuff will be, etc.. basically you need to meld multiple programming styles into at least a programming paradigm that everyone agrees on.

4: Ownership. Once another player is in the mix, if you want to sell your work.. how do you split the $$? 50/50? How do you gague whats fair if someone comes on and writes an AI module and you wrote the other 95%? Will your partners even allow it to be sold? Will they bicker about it being open source or not?

5: And the most selfish reasons of - I just want the satisfaction of "I wrote this and it Works Finally" - I love feeling of accomplishment. Also, each challenge I face in game making is 10 times harder than the algorythms required for work. Work is complicated for other reasons HOWEVER - keeping my skills honed is easier when everyday I'm faced with some unique abstract problem that you just don't find making a business systems.... unless you are designing one from scratch - which I find almost as enjoyable as game making... well.. its up there - not that close

So - there are all my reasons for not asking for help - yet I also know if I wanted to get this done in my life time I should ask for help - but as strange as this sounds... I don't care if I finish. Yes I WANT to finish.. but I AM enjoying the journey.

Now, I'm not just selfish - many will back me when I say that I'm often avbailable for help and I do give out a pretty fair share of source code to the community ... in fact... I venture to say I'm one of the few that gives alot of source versus some compiled dll or something where the source isn't shared.

Unitech, if I had a company that was in the business of making games - it would be different.. but its a hobby. I'd rather whine about how much there is to do, and fight and grumble and secretly smile through all of it. Twisted... I know!

I REALLY appreciate the hinted offer, Thank You. I also know you are a great coder. I also think there are some seriously talented people perusing these forums... I'm just a coding hermit or something.

One of the reasons I like making games is simply why so many people (some just for money but I don't mean those people) like to try to make a MMORPG... Because everyone else says its impossible!

Boot Up and Conquer! LOL

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 27th Apr 2008 02:27
Ugh, my computer crashed and I lost everything on my HDD.

Luckily I had just copied everything in 'My Documents' to my iPod, which includes my OOP wrapper. So I can start working on it once I've installed Visual Studio, DirectX SDK, DarkGDK, and copied my files back onto the computer.

90% of statistics are completely inaccurate.
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 27th Apr 2008 07:05
Good lord jason, a simple thx but its too complicate for help right now..

Ah well good luck, when do you expect a release?
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 27th Apr 2008 07:43
That really sucks, AndrewT.

I AM THE ALL MIGHTY CORNHOLIO! Do you have TP for my bunghole?
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 27th Apr 2008 16:01
Quote: "Good lord jason, a simple thx but its too complicate for help right now..
"
LOL... My apologies - Its just Yourself, and others ask me to "join Teams" and offer to help me, and I just don't want to 1 commit when I know I can't and I also thought an explaination was in order because you and others I hold is high esteem - and I don't want to hurt any bodies feeling. Programmers are a fickle bunch.

LOL - Sorry for the discertation - the next release of the library I'm working is going to be awhile - as I'm working on this GUI and then hopefully a designer for it... and I'm not sure what I'm going to do with that - that might be a commercial piece.

I'll tell you what though - I'll need some "SMART" testers who can give insight to where they suspects a bug is coming happening etc... and that, if you're willing is something I may definately ask for help with. Of course any testers for it would have their own copy for free, and if I go commercial there will be a small number of testers - and you'd definately be one of the people I ask, along with David W, Visigoth, Lilith, AndrewT, and others who I now know more by thier real name than alias and forgot their alias' so I won't mention LOL. (One of which like the Mako Darkmatter model which never acts right LOL )

Oh... Andrew T - that does stink - and BTW - someone else tested my oop lib on Vista and IT DID work, there wasn't an issue with the memblock commands.

Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 27th Apr 2008 23:26
@jason - DO NOT hesitate to ask for testing

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine (thanks kBessa): www.tales-of-the-realms.com
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 27th Apr 2008 23:43
Thanx Niels!!

@Unitech - Does that go for you too?

I'm curious what both of you guys are working on!

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th Apr 2008 04:03
Hey, I made alot of progress on that GUI this weekend. Alof of bugs ironed out, code retooled to be simply cleaner and more efficient...

It's not perfect, but its pretty solid so far. I never realized how hard a Cascade Windows routine is! I started one - I'll have to get back to it. Trickier than it looks, though I do have the minimize windows thing where they stack at the bottom as you minimize windows.

I now have all the .net window modes - no border, fixed3d, sizable, toolwindow, sizabletoolwindow, sizable dialog, and dialog.... here is a SCREENIE ... I'm trying to model plain vanilla windows as the "Spec" but the design is such that you can take over each little part of the paint procedure... to draw your own captions, forms "middle" borders.. whatever... So.. this is the "STOCK" scenario.

Here is a screenie ... like like class (JGC_GUI.CPP) alone is 2200 lines so far!

See Attached:

Attachments

Login to view attachments
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 28th Apr 2008 15:10
@jason - will it be possible to change style/design of windows?

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine (thanks kBessa): www.tales-of-the-realms.com
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 28th Apr 2008 15:45
When my importing whoas are over.. and i'm back in the to code 100% I plan to implement you system. IF all goes well , trust me it will get tested..
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th Apr 2008 18:35
@UniTech - AWESOME! (I'm glad you're back around!)

@Neils - Absolutely <--Short Answer

Long answer?
The "GUI" has a lot of default values... for things like how big the "frame" is for a specific "WindowBorderStyle" ... It's frame TOP, frame Left, frame Right, frame Bottom thickness, and depending on widow style, the drawable CaptionSize, if a borderstyle that has captions, is configurable also. Also, there is a GUI "Global" Minimized Height, and Minimized Width (this width is calculated when you start the GUI class so that they can evenly fit across the display without gaps )

Caption size controls the "drag" area where the mouse works for dragging. Frame Size, on sizable windows, effects the "mouse sizing" "Grab" regions. (8 per form, sides and corners)

But you can override the defaults, change the fonts, where the fonts show up, originate font from top/left coord you specify, or top/right (drawing to left) if you want...

The thing I'm going to do that kind of neat I think - (if anyone thinks it a bad idea - tell me) is that.

Normally in windows you get a paint even for the "Form" "user region" (the area in the form) and if you want, when controls are drawn.

I'm making events you can capture for "Each" piece of the drawing process, so you can "Wedge in" your own "Draw Caption" routine entirely! Or your own frame draw routine... entirely, or the background fill.. (that actually happens first) entirely... I keep saying entirely, because if you wish to "Consume the event" ... like drawing the caption area, you set the message type to ZERO after you are done drawing, then the GUI won't BOTHER to overwrite your work with its idea of how it should be because you effectively told it "I'm DRAWING IT MY WAY". I tried to make the properties for each "Drawing Element easy" to use and follow.

Here I use my JGC_TBLR (four values and width/height functions)to specify how "thick" each frame side is.


here I use the same base JGC_TBLR class to describe the actual coordinates of the "CAPTION DRAWING/DRAG AREA" So its Easy to Draw on the paint event for this "Drawing Element" because in theory - you have the exact pixels describing your chalk board - so to speak.


Also, don't forget, you can stay as close to stock as you want, or get really out there... its a gui engine of sorts made to be flexible with regards to display.

there of course has to be some rules... like everything needs to be drawn in the confines of the window Paintsize, but drawing "Out of bounds" doesn't cause an error (Pixel Grid handles that) But due to transparency, you can get nuts and make windows with a drag area thats floating above the window.. (in appearance) and you can let your imagination run wild.

MY goal is to provide a STANDARD reckognizable GUI interface - that WORKS... (So you have a solid starting point) with the ability to tweak to customize to taste.

After I finish the Cascade and Tile routines (I have an idea for cascade that should be more efficient than what I have working now... and it will behave hopefully pretty SPOT ON to how micrsoft does it (I look at Excel, with a ton of open "WorkBooks" to see how it does it. I like how it does it, and I want to mimic this)

Tiling Horizontal and Vertical I haven't even taken a stab at... but NEXT... Is some MODEL DIALOGS like Windows "Message Box" and I'm thinking about making them work like functions like they do normally in windows however I'd prefer to have it so the dialog can be on screen, modal, BUT... aloow your game engine to continue if you want... so animated models keep animating, and other stuff still seems to work "Behind" the dialog if that's what the "developer" wants it to do. (This doesn't at first glance seem to jive with a simple function call... I'lll figure something out.. maybe a system of hooks you can capture while the disloag is on screen - to snag its "user response" while your main loop keeps plugging away!

So... yeah, this gui should be very pliable. And the ULTIMATE CONTROL and redefinition of many rules Would be possible if I made a Hook to the "CalculateDimensions" routine that happens JUST BEFORE the actual under the hood PAINT routines, this way you could let the GUI "RULES" make their decisions, and then you could override them before the painting gets underway.

Thanx for asking. Boy, the designer is going to hard to make.... but it will be worth it I think!

Login to post a reply

Server time is: 2024-09-29 23:31:38
Your offset time is: 2024-09-29 23:31:38