Jump to content

  • Log In with Google      Sign In   
  • Create Account

markypooch

Member Since 26 Mar 2013
Offline Last Active Today, 09:07 AM

Posts I've Made

In Topic: Platform On A Pedastle Rotation

18 July 2016 - 08:58 AM

I'm using D3D11 for the Rendering API, and more relevant the DirectXMath header. Which i'm almost certain provides the helper functions for building, and manipulating quaternions for the sake of rotations.

 

 

presumably you are building a transform matrix from it all?

 

Yep, I have a simple setup so far. WorldMatrix is passed directly to the shader (simplifies for me at least a lot of calculations that require a worldspace transformation without having to undo a cpu side concatenation) and the view, and projection matrix I concatenate together, and send in separately.

 

I knew of quaternions, however, only in the realm of skeletal animation as using very little space, and being very efficient. The only reason I've never used them is due to me finding other means of mesh animation (vertex interpolation), and just not ever tackling them. But, i'll change that. Once I get the euler angle version working, i'll tackle the quanternion version.

 

Marcus Hansen


In Topic: Platform On A Pedastle Rotation

18 July 2016 - 07:17 AM

Your right on the Money! I did some follow up notebook paper math, and if my memory/skill serves me, this will work perfectly.

The axis would be a vector from my players up vector, and his current direction (As gauged by his position in the world, relative/subtracted by the center of the "platform").

 

length would scale my maximum allowable angle, and be divided by the radius.

 

 

Is it only euler angles you have access too?

 

It's what i'm using due to familiarity. (I had to google what you meant tbh, to realize you were referring to what I refer to as (perhaps incorrectly) 3d Cartesian rotation) What would be the other option quaternions?

 

Not trying to sound like a layman. It's been awhile since I have done anything outside of subnet math. Heck, my vector algebra may be slipping again :P

 

Marcus Hansen


In Topic: Starting my new game JS HTML

13 July 2016 - 04:42 PM

It's a start.

 

Insofar as your language choice, c/c++ isn't a prerequisite for game development at all, so don't feel pressured to learn something you don't feel your ready to undertake. Javascript is an excellent choice for browser based games, and to my knowledge that most used one for interfacing with Browser Based 3D API's such as WebGL.

 

Also no matter what language you choose usually the same schematics are employed for a Games underlying structure. That is, the game loop. The game loop is a conditional loop that performs all of the games necessary functions until a condition is met that ends the application lifecycle.

 

Kinda like this:

While (GameState != APP_CLOSE) do
    doStuffForInput()
    doStuffForDrawingToScreen()
    doStuffForAudio()
    andSoOn()

Marcus Hansen


In Topic: Yet another 'Best engine' topic

07 July 2016 - 01:44 PM

While I will concede that for a majority of indie titles, ready-bake engines are completely permissible, and viable options (And in this case I do indeed recommend you use an engine for your game). I don't think however, we should be so swift to refer to DIY engines as, "Reinventing the wheel." Because with all honesty it only takes one with enough intelligence, and ingenuity to realize it can always be done better, and sure enough we'll never be able to fathom on how we made do with the wheel ;)

 

Besides, starting from the API level will give you much better perspective as to how many subsystems that make up a game works under the hood which could serve as valuable knowledge that you can take with you to higher level engines, and frameworks.

 

Also, making a game at the API level is not synonymous with making an entire engine from scratch. Nowhere close. 

 

Marcus Hansen


In Topic: Browser Based Games: Back-end for battles

06 July 2016 - 02:45 PM

Well I'm certainly no expert when it comes to structuring a RTS game, but why every minute? 

 

I would imagine you would organize all of your empires in some kind of construct, and iterate through them. Instead of having a pre-allocated job run once every minute, empires should attack at any time their AI determines that they have enough soldiers, artillery, and morale based upon the correct (or incorrect) information gathered from their scout unit. 

while (true)
{
    for (int i = 0; i < empires.size(); i++)
        empires.at(i).update(/*some delta value, and other necessary arguments*/); 
}

I could be misunderstanding the question. But, if your saying what I think your saying; it would seem odd to limit offensives from enemy empires based upon some arbitrary one minute delimiter. 

 
Marcus Hansen

PARTNERS