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 / Dark Matter models - pointing wrong direction

Author
Message
Commodore VIC 20
12
Years of Service
User Offline
Joined: 14th Feb 2012
Location:
Posted: 14th Feb 2012 22:38
Hi,

I have been working with the Dark Matter character models provided with DarkGDK.NET and am finding through trial and error that they are positioned incorrectly. In the case of the Ninja and the Knight, they both seem to move forward when I call .Move(-1) rather than .Move(1). Conversely, calling .Move(1) makes it look like they are moving backwards in the game.

It was not until I wrote a lot of wacky code that I realized they were oriented the wrong way. Various attempts to call/set FixPivot, RotationMode, SetOrientation, Rotate and Position did not seem to work, because whenever the Point method was called to make the character "walk" (via a call to LoopAnimation) toward another character in the game, it did not respond correctly unless the character was positioned as provided by the model, which looks backwards in the game.

Can anyone confirm that these models are provided this way in the DarkGDK.NET download? If so, what is the fix. Much thanks in advance.
jojoofu
15
Years of Service
User Offline
Joined: 23rd Feb 2009
Location: Where ever Carmen Sandiego is
Posted: 15th Feb 2012 02:48
Most of the models included the model packs are oriented with there backs facing down the Z axis. The simplest way to fix this is to open the model in the viewer and rotate it 180 degrees then save it or you can just rotate the model in code after each move. You could also rotate the models matrix in relationship to the world matrix.

" The best slaves are the ones who think they are free. "
Commodore VIC 20
12
Years of Service
User Offline
Joined: 14th Feb 2012
Location:
Posted: 15th Feb 2012 03:27
Yes, I've tried some of those approaches, but need to resolve everything so that I can Point() each the character at their opponent. I'll paste in my current code (and comments) below. Ideally, I'd like to go with your suggestion...
Quote: "The simplest way to fix this is to open the model in the viewer and rotate it 180 degrees then save it"

...and have been able to pull it off in Blender, but not with The Game Creators products, including the Character Shop and AC3D demos I just grabbed. Please advise on what "the viewer" is - that sounds like the tool for me. The only tool I have right now is VB.NET for VS 2008. Thanks very much for the speedy reply. Looking forward to getting these little guys turned around and fighting each other soon.

Commodore VIC 20
12
Years of Service
User Offline
Joined: 14th Feb 2012
Location:
Posted: 15th Feb 2012 03:50
...I think I've got it under control now with a deftly-placed Me.TurnLeft(180) at the end of the TakeTurn method above. I tried Rotate() in one place but the Characters didn't run in a straight line toward one another. Your reply made me try a few new tricks, and I think this one will work.

I would also be interested in a few lines of sample code to rotate the model/world matricies - I thought about this too and was unable to make it work with my DarkGDK.World.Terrain approach above. Thanks again!
jojoofu
15
Years of Service
User Offline
Joined: 23rd Feb 2009
Location: Where ever Carmen Sandiego is
Posted: 15th Feb 2012 07:33
This is the simplest way to do it.



Very simple point at the object. Then rotate your object along the Y axis 180 degrees from its current Y angle.

" The best slaves are the ones who think they are free. "
DennisW
15
Years of Service
User Offline
Joined: 15th Jun 2008
Location: Ohio
Posted: 15th Feb 2012 16:05
@ Commodore VIC 20
I haven't seen a vic 20 in a long time. That was my first. No I take that back it was the timex with 1K. Then the Vic 20 then the 64 and so on.

Dennis

Ham and Eggs Breakfast
The Chicken was involved the Pig was Committed
Commodore VIC 20
12
Years of Service
User Offline
Joined: 14th Feb 2012
Location:
Posted: 15th Feb 2012 17:49
Thanks jojoofu! I will plug that in and see how it goes.

Me either Dennis. It was my first too. I actually haven't programmed any games since I had it. I have been programming web sites and financial calculations for the last 15 years, and this is my first foray back into gaming. It sure has come a long way since back in the day, when I wrote a Kaboom game modeled after the Atari version. With 5K of RAM, I remember reprogramming the bitmaps on various keys so that they would look like the the characters in the game. When my mom bought me the 16K expander pack, it reallocated the memory and broke my mappings. Doh! Now that my son is the same age and showing some interest in the subject, I'm hoping I'll be able to hand off the above Character class to him and see what he can do with it. Should be interesting. Kids these days don't know how good they've got it.
xix psycho xix
15
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 19th Feb 2012 15:53
Haha better yet, after you introduce him to the Character class, you should throw him into writing a game of Pong by himself, and after that make him write you an assembly language 16-bit OS

Login to post a reply

Server time is: 2024-03-29 14:09:53
Your offset time is: 2024-03-29 14:09:53