Some basic artwork articles would be nice as well:
- How to make artwork using vectors
- Pixel art basics
- How to use colors to achieve certain emotions
Something like that ![]()
Male
kuramayoko10 hasn't added any contacts yet.
Posted by kuramayoko10
on 04 March 2013 - 08:59 AM
Some basic artwork articles would be nice as well:
- How to make artwork using vectors
- Pixel art basics
- How to use colors to achieve certain emotions
Something like that ![]()
Posted by kuramayoko10
on 28 February 2013 - 02:43 PM
Also, try setting the following flag on your Screen initialization: SDL_DOUBLEBUF
With that and SDL_HWSURFACE you will be able to use SDL_Flip() properly.
screen = SDL_SetVideoMode( 640, 480, 32, SDL_HWSURFACE | SDL_DOUBLEBUF );
Posted by kuramayoko10
on 25 February 2013 - 09:01 PM
Well, I was reading Patrick Wyatt's blog the past week and he cited an article from Gamasutra that list some Dirty Tricks that shipped some games.
I don't know how rude/good it is to post references to blogs here. But the things discussed there are pretty funny.
Worth sharing ![]()
On this topic I will share one experience of mine from college:
We had to create a game in Assembly (our own Assembly language btw
) and apply it to a processor we created using hardware description language and run it on a FPGA board.
Me and my friend were developing a Treasure Hunt kind of game. I remember it clearly... I wrote the moveLeft "method", labeled it and tested.
It worked pretty well, so lets just copy/paste it as moveRight, moveDown, moveUp.
As soon I did this, moveLeft stopped working.
We spent hours trying to debug (there was not much code to debug) and we couldnt find out the problem.
I then had a brilliant idea... lets just swap the code position of moveLeft to moveRight, moveUp or moveDown. Just doing that made moveRight/moveUp/moveDown would break.
We couldn't believe this, the code was breaking because of a specific line (or block). That line, a thousand something, was on strike.
The solution we found: we created a method moveFu** (sorry for the obscenity... college kids) This code didn't do anything and was never called, but we inserted it at the "broken line position". Just like that the movement was fixed.
Posted by kuramayoko10
on 19 December 2012 - 11:19 AM
This gets worse when you work on big projects. You can easily lose track of what each part of your code is responsible for and debugging becomes hell.I honestly don't see why I should ever bother worrying about whether or not a particular set of functions can "see" each other, or whether or not I can make two functions with the same name.
That is your job as programmer to tell. You are the one that decided if overloading a function is necessary and what they will execute. Who said that different implementations of a function should be completely different?Why would I ever want more code obfuscation like that -- two functions with identical names that can do two completely different operations? Why on earth would I ever want such a thing?
Posted by kuramayoko10
on 30 November 2012 - 08:08 PM
But for the printf to work doesn't it need the "format string" and then the stuff you want to print?His string class has a operator const char *() function which allows an implicit cast to const char *.
Posted by kuramayoko10
on 28 November 2012 - 06:01 PM
Posted by kuramayoko10
on 25 November 2012 - 08:23 PM
This article has an example of how one could implemet slopes. And he exemplifies with Megaman as well.How would I add slopes as tiles
Physics in games is something that needs polish, always.How much I would have to change my now lacking physics
You should work on your project until it is fun and you are still learning things. There is no use on battling against a project you don't like.Should I focus on something else or keep with the project trying to solve things I just can´t fathom?
Posted by kuramayoko10
on 20 November 2012 - 07:53 AM
Posted by kuramayoko10
on 18 November 2012 - 02:13 PM
Posted by kuramayoko10
on 16 November 2012 - 07:24 AM
Posted by kuramayoko10
on 15 November 2012 - 10:22 AM
Ha, that is what makes someone a good developer, and that every good developer is aiming.I have a hard time putting everything together to make a functional program.
Posted by kuramayoko10
on 25 October 2012 - 09:23 AM
Posted by kuramayoko10
on 08 October 2012 - 03:49 PM
Posted by kuramayoko10
on 08 October 2012 - 09:55 AM
Posted by kuramayoko10
on 07 October 2012 - 01:12 PM
A static method has access to all parts of the class. What it doesn't have is a `this' pointer, but if it handles any instances of the class, it has full access to those instances, not only through the public interface. Think of the `dot' example that Lauris posted above.
#include <cstdio>
#include <cstdlib>
class MyClass
{
private:
int var1;
static int var2;
public:
MyClass()
{
var1 = 1;
}
static void printVar()
{
printf("var1: %d\n", var1);
printf("var2: %d\n", var2);
}
};
int MyClass::var2 = 2;
int main(int argc, char *argv[])
{
MyClass::printVar();
return 0;
}
The first printf() inside the printVar static method refers to a non-static variable declared in the class.
Find content