Jump to content
  • Advertisement
Sign in to follow this  
takumi naoya

Ask for Opinion

This topic is 2083 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i have some question

i already learn OOP and some basic programming languange and from 2 years ago interested with game programing and right now im learning Monogame XNA C# and this my question

1. how you read a statement "for" to a logic or human languange? example

for (int i = 1; i >= 10; i++)
{
   // execute
}

how to define a line of code above to human languange that i mean for question number 1

 

2. what difference a game programming and graphic programming?

3. in OOP i dont really understand or i still confused about when you use a class and when you use struct what a difference?

4. and if in software developer you can use flow diagram / UML to design a proper program and my  question how about game can i use UML / flow diagram to design it?

5. this my last question in software programming if you want to build a software you must specify what a problem can be solve with your software and what a method you use to solve the problem but if in game programming whether in the making of the game requires a method?

that all my question if my questiaon already have a answer somewhere in the forum sorry for repost it.im really want to know what your opinion from answer my question above.

thank for who reading my post and sorry for my grammar. 

 

Share this post


Link to post
Share on other sites
Advertisement


1. how you read a statement "for" to a logic or human languange? example

Starting from one, add one to i until i is equal to, or greater than, ten.

 


2. what difference a game programming and graphic programming?

 

Graphics programming is a part of game programming.

 


3. in OOP i dont really understand or i still confused about when you use a class and when you use struct what a difference?

 

Are you talking about OOP in general, or C++, because there is no 'struct' concept in OOP.  In C++, the only difference between the two is that struct members are public by default and class members are private by default (likewise with the way they are inherited).

 


4. and if in software developer you can use flow diagram / UML to design a proper program and my  question how about game can i use UML / flow diagram to design it?
 

 

Yes.  A game is no different from any other program.

 


5. this my last question in software programming if you want to build a software you must specify what a problem can be solve with your software and what a method you use to solve the problem but if in game programming whether in the making of the game requires a method?

 

To be honest, I'm not 100% sure what you're trying to ask, but again, writing a game is no different from writing any other piece of software.

Share this post


Link to post
Share on other sites

1. how you read a statement "for" to a logic or human languange? example

Starting from one, add one to i until i is equal to, or greater than, ten.

Actually, no. The loop as given will never run. It's "starting from one, while the value is greater than 9, increment by one".
Edit: actually, not sure about that anymore since I missed the C# part on the first pass.
 

2. what difference a game programming and graphic programming?

 
Graphics programming is a part of game programming.


Not really. A part of graphics programming is part of game programming. There are applications of graphics programming which have (for the time being) no intersection with game programming. Some examples are rendering techniques used for medical purposes or rendering techniques which are very, very far from real-time. Edited by BitMaster

Share this post


Link to post
Share on other sites


Actually, no. The loop as given will never run. It's "starting from one, while the value is greater than 9, increment by one".

 

Good catch.  I didn't even notice he had greater than instead of less than.

 

 


Not really. A part of graphics programming is part of game programming. There are applications of graphics programming which have (for the time being) no intersection with game programming. Some examples are rendering techniques used for medical purposes or rendering techniques which are very, very far from real-time.

 

I was trying to give a broad answer as the question was extremely vague.

Share this post


Link to post
Share on other sites

Actually, no. The loop as given will never run. It's "starting from one, while the value is greater than 9, increment by one".
Edit: actually, not sure about that anymore since I missed the C# part on the first pass.


Nope, you're perfectly right, the loop body will never be executed in this case (MSDN entry).

Share this post


Link to post
Share on other sites
Regarding the struct versus class question. Structs were originally part of "C" and classes were introduced with C++. There are quite some similarities, member data access for example is different (private, public, protected). You can do a search on the forum to look more up on this

Share this post


Link to post
Share on other sites

Regarding the struct versus class question. Structs were originally part of "C" and classes were introduced with C++. There are quite some similarities, member data access for example is different (private, public, protected). You can do a search on the forum to look more up on this

 

I had also missed that the OP was referring to C#.  In C#, structs are value types and classes are reference types.

Share this post


Link to post
Share on other sites

 

 

1. how you read a statement "for" to a logic or human languange? example

Starting from one, add one to i until i is equal to, or greater than, ten.

 

Actually, no. The loop as given will never run. It's "starting from one, while the value is greater than 9, increment by one".
Edit: actually, not sure about that anymore since I missed the C# part on the first pass.
 

 

2. what difference a game programming and graphic programming?

 
Graphics programming is a part of game programming.

 


Not really. A part of graphics programming is part of game programming. There are applications of graphics programming which have (for the time being) no intersection with game programming. Some examples are rendering techniques used for medical purposes or rendering techniques which are very, very far from real-time.

 

ohh you mean graphic programming like how to process a bad image to good image or forensic..
thank you for the answer i really understand now.

Share this post


Link to post
Share on other sites

The easiest way to understand a for loop is using BASIC syntax:

FOR i = 1 TO 10 STEP 1
    DoSomething( i )
NEXT

The variable i initially has a value of one. Each time through the loop, i is incremented by one (STEP 1). The loop continues while i is less than, or equal to, ten. So i will have the values of 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10 as the loop is run.

 

Alternatively:

FOR i = 4 TO 12 STEP 3
    DoSomething( i )
NEXT

In this case i will have the values of 4, 7 and 10 as the loop is run - because in the final test 10 + 3 = 13, which fails the test of less than or equal to 12.

 

These two loops can be written as:

for( int i = 1; i <= 10; i++ )
{
}

or

for( int i = 4; i <= 12; i += 3 )
{
}

Note that your loop will never run...

for( int i = 1; i >= 10; i++ )
{
}

...because you're saying while i is greater than or equal to 10 run the loop - but i starts out less than ten, so the loop terminates before any code within it is executed.

Edited by mark ds

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!