Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Simple graphics with simple functionality


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 rotatingroastedrat   Members   -  Reputation: 104

Like
0Likes
Like

Posted 31 July 2014 - 07:25 PM

Hi y'all!

 

First of all let me tell you a little something about my knowledge and skills and then I'll move on to what I want to do.

So, I know all the basics of c,c# and c++...if you'd pick up a book like, say, "thinking in c++", there would be virtually nothing that I haven't covered...except funnily enough I'm a bit shaky on virtual functions. Whatever...

I don't have that much experience with actually writing code and I guess most of you will think that it is a serious shortcoming if I claim to know alot.

Doesn't matter that much to me tho'. I feel like, as long as I'm hot on the theory, the practice won't be that tedious. I have read "code complete" and I am totally aware of all the things the author tries to express.

Anyway, what about math, which is important when it comes to graphics? My math understanding is very high - linear algebra and such? You needn't bother.

So let's move on then...what is it I want to do?

I don't know that much about DirectX programming. But I want to stress that my aim is not to make super-advanced graphics.

Look folks, all I want to do is make, eg., a dot that rotates in a visual path of an oval, maybe let's say, from the input of the keyboard. Let's add some plain vertical and horizontal movement of a few levers side-by-side that find their position according to the angle of the dot.

I dunno...why not throw in some explanatory mathematical functions that present themselves in a certain typefont and size in the upper right corner who describe the processes present?

You know what I'm saying? :D Nothing fancy-shmancy just pure old math. And basic directx functionality.

In time I want to move on to create the simplest, most stripped of game-engines.

Please give me your advice on this one. I have no clue where to start.

Some online tutorials maybe (I can't seem to find any that suit my purposes)? A book you can recommend?

Whatever enters your mind regarding this topic.

 

Thanks, be kind

 

/Mirza

 

 

 

 

 

 

 



Sponsor:

#2 Nik02   Crossbones+   -  Reputation: 2875

Like
1Likes
Like

Posted 01 August 2014 - 04:57 AM

Rotation of graphics in 2d is very easy to implement by using sin, cos and other trigonometry functions.

 

Consider that t is a parameter that goes from 0 to pi * 2.

 

x = cos (t) * radius

y = sin (t) * radius

 

Now, if you plot the x and y for every t, you get a full circle. An ellipse is just a scaled circle, so scale either the x or y by a constant factor to get an ellipse. If you want to move the said ellipse, just add constant scalars to x, y or both.

 

For slightly more advanced stuff, linear algebra could be your next destination. Vectors, matrices and such are very useful in graphics, and they are not very difficult to use once they "click" in your brain.


Niko Suni


#3 Nik02   Crossbones+   -  Reputation: 2875

Like
1Likes
Like

Posted 01 August 2014 - 05:02 AM

Regarding DirectX basics, have you read the tutorials on MSDN?

 

http://code.msdn.microsoft.com/windowsapps/Direct3D-Tutorial-Sample-08667fb0/view/SourceCode

 

Although this specific sample is for WinRT, the same basic concepts apply for C++/native dev (though in native, you have to do more work to establish the window and message loop).


Edited by Nik02, 01 August 2014 - 05:03 AM.

Niko Suni





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS