[QUOTE=Tangara;30301644]heh[/QUOTE]
I think I've use Flash MX 2004 a few times.
It's decent.
[QUOTE=amazer97;30299586]Does anyone have any good tutorials on making a GUI?[/QUOTE]
Writing a GUI system from scratch? Or using an existing library to make a GUI?
I'm using [cpp]system("cls");[/cpp] to clear the screen, but that is Windows-only. How do I clear the screen in a way that would work anywhere. Preferably in C, not C++.
Depends if you're willing to use a library for it or not :v:
[QUOTE=DeadKiller987;30304209]I'm using [cpp]system("cls");[/cpp] to clear the screen, but that is Windows-only. How do I clear the screen in a way that would work anywhere. Preferably in C, not C++.[/QUOTE]
If you're making a game in terminal-space, you really should look into using a curses-library.
In C++ what would be better to use float or double?
I know float has some problems in C# but i think they dont affect C++
The numbers it will be holding are Pi, Pi/2 Pi*2...
[QUOTE=Richy19;30304501]In C++ what would be better to use float or double?
I know float has some problems in C# but i think they dont affect C++
The numbers it will be holding are Pi, Pi/2 Pi*2...[/QUOTE]
Double, unless you need extra performance/memory if you're storing many floats, then use float.
[editline]7th June 2011[/editline]
[QUOTE=thelinx;30304427]If you're making a game in terminal-space, you really should look into using a curses-library.[/QUOTE]
Will it compile on my iPhone? I have a problem where I can't find C++ headers that work with iphone-gcc, hence I'm trying C. I'm porting my game from Windows C++ into Cross-platform C and removing all Windows-specific crap.
[QUOTE=Richy19;30304501]In C++ what would be better to use float or double?
I know float has some problems in C# but i think they dont affect C++
The numbers it will be holding are Pi, Pi/2 Pi*2...[/QUOTE]
I'm pretty sure the floats are fine, wasn't it just the rounding functions or something that assumed perfect precision (which you can't get of course)
Fixin' page 8. I figured out that I had all my headers all along. Bloody Cydia intstalled them in the wrong folder :argh: . Also, turns out I have NCurses on my iPhone already.
[editline]7th June 2011[/editline]
Sorry for being such a dummy, but how do I use gcc? I do [code]gcc main.c draw.c[/code] and it gives me [code]ld: library not found for -lSystem
collect2: ld returned 1 exit status[/code]
You either want to do gcc main.c draw.c -o <output binary> or first compile both source files (gcc -c main.c && gcc -c draw.c)
[editline]7th June 2011[/editline]
Err, and then compile them into the output binary (gcc main.o draw.o -o <output binary>)
[QUOTE=esalaka;30306256]You either want to do gcc main.c draw.c -o <output binary> or first compile both source files (gcc -c main.c && gcc -c draw.c)
[editline]7th June 2011[/editline]
Err, and then compile them into the output binary (gcc main.o draw.o -o <output binary>)[/QUOTE]
I tried that. Same error.
[QUOTE=DeadKiller987;30307050]I tried that. Same error.[/QUOTE]
well, unless im horribly wrong (which happens), its a linking error, and judging by the looks of the error you are missing a library of some description
which is a little weird as you havent actually specified linking anything :ohdear:
[editline]7th June 2011[/editline]
[QUOTE=ief014;30264810]If you're simply using a mask, I don't think you can. You're probably going to have to use images without antialiasing.[/QUOTE]
Well, the mask is the same for every image, so i think ill just parse the image when i load it and turn all the purple to transparent
[QUOTE=Chris220;30301865]Writing a GUI system from scratch? Or using an existing library to make a GUI?[/QUOTE]
Writing one from scratch. The only library I'm using is SFML right now.
Hey guys, unsure of which way to go.
1) Stay with LOVE2D and Lua which i kinda know (ish)
2) Go to SFML and learn C++ (i know abit of C++ but hardly any, i know pointers thats about it)
3) Same as 2 but with Polycode
[QUOTE=Bambo.;30309072]Hey guys, unsure of which way to go.
1) Stay with LOVE2D and Lua which i kinda know (ish)
2) Go to SFML and learn C++ (i know abit of C++ but hardly any, i know pointers thats about it)
3) Same as 2 but with Polycode[/QUOTE]
If you do go with C++ then stick with SFML, that said the hardest thing you will find with C++ is probably pointers so if you already know it then go ahead and try c++
[QUOTE=Icedshot;30308658]well, unless im horribly wrong (which happens), its a linking error, and judging by the looks of the error you are missing a library of some description
which is a little weird as you havent actually specified linking anything :ohdear:
[/QUOTE]
Man fuck Cydia. First I find two different include folders. Now about 5 lib folders :argh: Fuck this shit.
Can anybody recommend a good online book for C#?
[QUOTE=DeadKiller987;30307050]I tried that. Same error.[/QUOTE]
Wait.
You installed all the libraries required to build this stuff, right? Sounds like your device doesn't have a dynamically linked libc or something
[editline]7th June 2011[/editline]
[QUOTE=DeadKiller987;30310361]Man fuck Cydia. First I find two different include folders. Now about 5 lib folders :argh: Fuck this shit.[/QUOTE]
Add everything to ld search path
-L<libdir> -L<another> or alternatively <waitamin>
[editline]7th June 2011[/editline]
How did you get such a fucked up install in the first place?
Could someone that uses directX 9 have a look at this and tell me if its worht the buy?
[url]http://www.microsoft.com/mspress/books/5871.aspx[/url]
I mainly want to use the vertex buffer/shader approach, not the old depreciated methods.
[QUOTE=Tangara;30301644]heh[/QUOTE]
Yeah, I know, I'd rather not, but it's all we have in school and I'm taking a comp sci class, and I just want to be able to work on my stuff in and out of school. I plan on moving to cs5 as soon as school's out. Can anyone actually help me? Need more information?
Alright, I have the following situation(using C#): I'm making a library, my design works like that: You create a object of type Core, inside the Core class there is this method: AddElement(object) this will add the object to a generic List that will be looped and updated by the Core. The problem is: I want to have a local object and then add that to that List, but when I change that local object the changes must be reflected on the object that the Core keeps track of. I'd use a pointer in C++, but in C# you can't have managed objects pointers, what would be the best method to achieve that?
EDIT: Nevermind, seems like classes are passed by reference in .NET
I'm curious about how I can stop my makefile to compile things after I use make clean. When I have make clean do it's job and there's a file in the source code that's changed since the last compile, it will compile it into the object file, then remove it. Here's an example of a makefile that I have that does that:
[code]
USE = -lsfml-system -lsfml-window -lGLU -lGL
OBJECTS = main.o Gen.o Graphics.o
maze : $(OBJECTS)
g++ -o maze $(OBJECTS) $(USE)
main.o Gen.o : Gen.h
Gen.o Graphics.o : Graphics.h
.PHONY : clean
clean : $(OBJECTS)
rm -f maze $(OBJECTS)
[/code]
On a side note: I couldn't use tab indenting for the script since Chromium doesn't seem to let me. Is there a way to get the tab button to indent instead of leave the text box?
Don't make the "clean" target depend on $(OBJECTS). That dependency tells make that all the $(OBJECTS) must be built and up-to-date before the "clean" target's command runs.
[QUOTE=Wyzard;30322114]Don't make the "clean" target depend on $(OBJECTS). That dependency tells make that all the $(OBJECTS) must be built and up-to-date before the "clean" target's command runs.[/QUOTE]
I see, thanks. I'm still fairly new with makefiles and just know how to bring out basic ones.
Anyone knows how i could grab sf::Vector2f from Points.begin()?
I have tried doing something like this:
[code]sf::Vector2f *v = Points.begin()->pos;[/code]
But it obviously does not work.
Inside header file:
[code]struct SnakePart
{
sf::Vector2f pos;
sf::Shape line;
};
typedef iQueue<SnakePart *> pList;
class Snake
{
private:
pList Points;
...[/code]
P.S. iQueue is std::queue with iterator.
[QUOTE=Muffinz!;30323547]Anyone knows how i could grab sf::Vector2f from Points.begin()?
I have tried doing something like this:
[code]sf::Vector2f *v = Points.begin()->pos;[/code]
[b]But it obviously does not work.[/b]
Inside header file:
[code]struct SnakePart
{
sf::Vector2f pos;
sf::Shape line;
};
typedef iQueue<SnakePart *> pList;
class Snake
{
private:
pList Points;
...[/code]
P.S. iQueue is std::queue with iterator.[/QUOTE]
What doesn't work? Where is the problem?
EDIT:
Mabye this does:
[code]sf::Vector2f *v = &(Points.begin()->pos);[/code]
[QUOTE=sim642;30324221]Mabye this does:
[code]sf::Vector2f *v = &(Points.begin()->pos);[/code][/QUOTE]
This is my problem:
[img]http://i.imgur.com/r1uy3.png[/img]
[editline]8th June 2011[/editline]
Problem solved, thanks to Chris220.
It had to be: [quote]sf::Vector2f v = (*Points.begin())->pos;[/quote]
How would I go about applying gravity to a sprite in XNA?
I have my sprite ricochet off walls like this:
[url]http://dl.dropbox.com/u/3655315/Bounce%20is.png[/url]
But I want to get it to bounce like this:
[url]http://dl.dropbox.com/u/3655315/Bounce%20want.png[/url]
Here's the code.
[code]
namespace BouncingBall
{
class Ball
{
Vector2 Position;
Texture2D Texture;
int StageWidth, StageHeight;
int velX = 5;
int velY = 7;
public Ball(Texture2D balltex, Vector2 ballpos, int bstageWidth, int bstageHeight)
{
Position = ballpos;
Texture = balltex;
StageWidth = bstageWidth;
StageHeight = bstageHeight;
}
public void Update(GameTime gameTime)
{
Position.X += velX;
Position.Y += velY;
if (Position.X + Texture.Width >= StageWidth)
{
velX = -velX;
}
else if(Position.X <= 0)
{
velX = -velX;
}
if (Position.Y + Texture.Height >= StageHeight)
{
velY = -velY;
}
else if (Position.Y <= 0)
{
velY = -velY;
}[/code]
You could try:
Change velocities to floats (or doubles if you want)
[code]float velX = 5f;
float velY = 7f;[/code]
Then inside update function add:
[code]velY += 0.9f;[/code]
I'm not sure how it will look like, but it should work.
It works but then the sprite starts glitching out and flying up :v:. Thanks a lot, I'll work on fixing this thing.
Sorry, you need to Log In to post a reply to this thread.