- Viewing Profile: Reputation: Zael
Community Stats
- Group Members
- Active Posts 91
- Profile Views 834
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
User Tools
Contacts
Zael hasn't added any contacts yet.
#4935872 Need some help and advice for creating my first game
Posted by Zael
on 29 April 2012 - 01:13 PM
C# and XNA are good for a beginner. You should probably be prepared to make your first several programs (games) text based stuff to get a feel for program flow and the art of programming. Visual Studio Express edition is free from Microsoft's website. I don't actually do much C# myself, so I can't really help as far as tutorials go.
Good luck!
#4933816 Help me please!
Posted by Zael
on 22 April 2012 - 11:17 AM
Example "Menu":
int choice = 0;
while(choice != 2)
{
std::cout << "What would you like to do?\n";
std::cout << "1) Start a new game\n";
std::cout << "2) Quit\n";
cin >> choice;
switch (choice)
{
case 1:
startGame();
break;
case 2:
return;
break:
}
}
Does that make sense or are you asking something else?
#4933814 C++ Exercise
Posted by Zael
on 22 April 2012 - 11:06 AM
#4932679 Need Help : SDL_FreeSurface doesn't work?
Posted by Zael
on 18 April 2012 - 09:53 PM
SDL_FreeSurface frees the image from memory, but it doesn't erase the image from other surfaces on which it has already been "painted".
Does that make sense?
#4930719 Am i learning too slow?
Posted by Zael
on 12 April 2012 - 04:15 PM
I would not jump into OpenGL. I would test the waters with SDL or SFML.
List of things I would tell somebody to know before starting 2D games are:
- Declaring and using variables
- Arithmetic operators +,-,*,/,%
- Implementing Functions
- Using if-else statements and familiarity with !, &&, and ||. Knowing the difference between = and ==
- Understanding loops
- Familiarity with at least part of the C++ standard library (std::string, std::vector, std::list, std::map come to mind first. Know how to delete and add to vectors and lists while iterating through them)
- Understanding Pointers and comfortable using them
- Comfortable writing your own classes complete with methods and member variables
- Preferably comfortable with polymorphism
Some things I am assuming you know if you know this list (like using parentheses), and I may be missing some things. If you know everything on this list (with the exception of polymorphism) I would say you are ready to try starting on 2D games. You can probably make small games without knowing any of the last 3 items (depending on the library you used for graphics). You will run into new challenges like draw order and path finding, but knowing the language won't help you with algorithms. For those you will have to be a problem solver and/or ask around.
#4930646 Guessing Game Problem
Posted by Zael
on 12 April 2012 - 01:15 PM
Line: 20
#4930639 Guessing Game Problem
Posted by Zael
on 12 April 2012 - 12:42 PM
int myNumber,;Should not have a comma unless you are declaring multiple ints on that line.
You are also missing a semi-colon on this line:
cout <<"\nYou chose "<<myNumber <<"as your number."
Also you should use an up-to-date IDE like MS Visual Studio Express or CodeBlocks.
#4929927 Minors' Game Dev. Association
Posted by Zael
on 10 April 2012 - 10:17 AM
Makuto, you may want to search the forums. I want to say somebody proposed the same exact thing just a few weeks back.
#4929606 I'm 15, i wanna start game development, Advice needed :)
Posted by Zael
on 09 April 2012 - 11:00 AM
#4929461 Creating a simple game, really simple !
Posted by Zael
on 08 April 2012 - 10:50 PM
#4925408 Basic game phyics problem
Posted by Zael
on 26 March 2012 - 11:33 AM
Your current initial velocity depends a lot on angle because you have a constant x velocity which the y velocity is based. If you want to better model projectile motion, you should have an initial velocity that does not depend on angle, and use that to calculate both x velocity and y velocity. By that I mean something similar to:
float initialVelocity = 50.0f; float deltaX = tempX - x; float deltaY = tempY - y; float distance = sqrt(detaX*deltaX + deltaY*deltaY); xVel = initialVelocity * deltaX/distance //deltaX/distance gets us the x component of a unit vector yVel = initialVelocity*deltaY/distance //deltaY/distance gets us the y component of a unit vector
As for really fast... right now your movement is totally dependent on how fast your frames per second. I would recommend:
unsigned int currentTime = SDL_GetTicks(); float elapsedTime = ((float)oldTime-currentTime)/1000.0f; // in seconds x += xVel * elapsedTime; //xvel is in pixels per second. y+= yVel * elapsedTime; oldTime = currentTime;
#4924682 Mingw g++ 4.6.2 crash
Posted by Zael
on 23 March 2012 - 10:46 AM
#4923639 Sprite Rotation
Posted by Zael
on 20 March 2012 - 09:22 AM
Might I recommend the following instead:
SDL_FreeSurface(image); image = rotation;
What this code does is frees the original image and sets the image SDL_Surface pointer to the address of the rotated image. My only worry with this code is the loss of image quality over multiple rotations (I am not positive that image quality would be lost, but it seems reasonable to me). It might instead be better to have something more like this:
if(oldRotation != newRotation)
{
if(displayImage != NULL && displayImage != original_Image) SDL_FreeSurface(displayImage);
displayImage = rotozoomSurface(original_Image, newRotation, 1, 1);
oldRotation = newRotation;
}
This code makes new rotation images based off the originally loaded image, and only does so when the rotation has changed.
#4922627 Just a noob that needs a little help :)
Posted by Zael
on 16 March 2012 - 11:40 AM
If so this is normally done via a library or system API. I don't know the libraries to do this with pure Java, but on Android there is an example program that may get you started in the right direction: http://developer.and...nder/index.html
Another example app on Android specifically is: http://developer.and...nake/index.html
If you need a faster frame rate than those will allow I recommend looking into AndEngine. I have used it, and found it to be a pretty good 2d library for Android backed by OpenGL ES.
Hopefully that helps.
P.S. I strongly recommend reading up on the Android Application life cycle before starting an Android game.
#4909350 Updating and Drawing Problem in C++ And SDL
Posted by Zael
on 03 February 2012 - 04:45 PM
- Home
- » Viewing Profile: Reputation: Zael

Find content