• What do you need help with? V. 3.0
    4,884 replies, posted
[QUOTE=eXiv2;30264041]I seem to be following these SDL tutorials perfectly, and I understand every little bit they write, but I just can't seem to remember it. If you would ask me to recreate what I learned, I couldn't. Does anyone else have this? Should I just continue with the tutorials?[/QUOTE] Reposted in the hope I can get someone's opinion.
[QUOTE=Darwin226;30275483]One GL.Uniform* call isn't expensive enough that you would ned to worry about it. Just set the uniforms before you render and you're set. You should try to have as little rendering calls as possible. I don't think a few API calls per render would make that much of a difference. [editline]6th June 2011[/editline] [url]http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml[/url] You can scroll down to the description. I think it answers your question.[/QUOTE] that helps a lot, thanks. According to the link, uniforms are retained until you decided to delete the program or link new shaders to it. Now I can feed most of my uniforms in from the constructor or even when I'm linking shaders together to make a program. This makes things a lot simpler than what I thought they would have to be.
I created a blank project in VC++2010 as I alsways do, but this time I want to use it as a library. How would I set it up as a library?
I believe you just change .exe to .lib/.dll, there's more on msdn if you do a google.
[QUOTE=Elffie;30277159]I believe you just change .exe to .lib/.dll, there's more on msdn if you do a google.[/QUOTE] The only info I could find for making a library in msdn was to choose it as your project type, but i couldnt find anything about setting it up yourself from a blank project
Go to your project properties then search through (the linker options most likely) for the output format/type and change it from .exe to .lib or .dll, whichever you want to use.
[QUOTE=eXiv2;30276145]Reposted in the hope I can get someone's opinion.[/QUOTE] When i do something new, i tend to write a test program which tests everything new that ive learnt, so if i want to go and see how something works, i can just reference the program i wrote
[QUOTE=Richy19;30277334]The only info I could find for making a library in msdn was to choose it as your project type, but i couldnt find anything about setting it up yourself from a blank project[/QUOTE] [url=http://msdn.microsoft.com/en-us/library/ms235627.aspx]Static[/url] [url=http://msdn.microsoft.com/en-us/library/ms235636.aspx]Dynamic[/url]
[QUOTE=Dragonblz;30240736]In c#, how can I simply toggle the affinity of a certain core? I can manually set the mask with Process.ProcessorAffinity, but all I want to do is make the process use all cores except core 0. I'm not sure how manually setting the mask to use 1-7 would work on a quad core machine, and it would semi-break on a 12 core box since it has more cores.[/QUOTE]
Thanks guys :buddy: [sp]Does anyone know how to make it allow you to choose what type to build? Like how when you try to build SFML you can choose Debug static, debug dynamic, release static, release dynamic...[/sp] Doesnt matter just saw you need to create a new build configuration Also Is it possible to turn off the cache or what ever it is that creates the database files? Their usually around 50mb for a 500kb project :(
I don't really know if this is the place to ask, however I didn't feel like cluttering up the forum with another thread. I have some previous experience with Ruby, however I feel like I want to move to a language in which I might be able to, at some point, make some basic 2D platformer games. My question is this, is it a good idea to start out with C# and use XNA (mind that I don't really know anything about the subject, I've just seen other people mentioning it, so I might've worded that completely wrong), or would it be wiser to start with another language (or for example use C# with Unity etc.)
[QUOTE=Zeraux;30282268]My question is this, is it a good idea to start out with C# and use XNA (mind that I don't really know anything about the subject, I've just seen other people mentioning it, so I might've worded that completely wrong)[/QUOTE] Sure it is! I have never used XNA, but from what I hear, it's a great tool to teach yourself the structure of games. I don't think you'll have any trouble going beyond XNA once you feel like you want to move up to the next level.
[QUOTE=Zeraux;30282268]I don't really know if this is the place to ask, however I didn't feel like cluttering up the forum with another thread. I have some previous experience with Ruby, however I feel like I want to move to a language in which I might be able to, at some point, make some basic 2D platformer games. My question is this, is it a good idea to start out with C# and use XNA (mind that I don't really know anything about the subject, I've just seen other people mentioning it, so I might've worded that completely wrong), or would it be wiser to start with another language (or for example use C# with Unity etc.)[/QUOTE] XNA is awesome and is generally pretty user friendly However if your used to using ruby then maybe lua + love would be better.
[QUOTE=Zeraux;30282268] I have some previous experience with Ruby, however I feel like I want to move to a language in which I might be able to, at some point, make some basic 2D platformer games.[/QUOTE] You can do that in Ruby just fine.
I actually didn't know that, however I would like to use a language that's more 'built' for it.
No language is built for a 2D platformer.
Perhaps I worded it wrong. I'll just let it sit there so that I won't get my words tangled.
It is a good idea to try C# and XNA! I do recommend it. I'm just saying that even XNA, a game library, isn't built tor 2D platformers.
[b]built[/b]
What? What are you taking about? :D
You can really use any language you want, so I suggest using what you're most comfortable with. Once you've chosen a language, we can help you find a decent graphics library or whatever if you want that
Is it possible to embed a PowerPoint presentation in a winforms app? All the searching I've done just gives guidance on creating, opening and automating the running of them in C# but I want to embed them in the form itself and have it just run without having to open PowerPoint at any point. If possible only requiring the PowerPoint viewer but if that's not possible then I can cope with requiring a full Office installation. This has got me really annoyed because I can't find anything like what I want apart from M$ support pages that don't exist any more :saddowns:
I have some questions regarding C++, .NET, and XNA. I'm currently learning Python right now so this is only for future reference and because I want to figure out a bit of this stuff before hand. C++ is often described around Facepunch as a language that may take a bit more to write, but gives you more control over things. What is an example of something that C++ would allow me to change that another language would not? What exactly is the .NET framework for? I've glanced at the Wikipedia page but my new-to-programming mind is looking for slightly more down to earth definition about the tasks it would simplify for the languages it supports. My question about XNA is essentially the same as the .NET question. What tasks does it simplify/do for me?
[QUOTE=SourBree;30290246]I have some questions regarding C++, .NET, and XNA. I'm currently learning Python right now so this is only for future reference and because I want to figure out a bit of this stuff before hand. C++ is often described around Facepunch as a language that may take a bit more to write, but gives you more control over things.[b] What is an example of something that C++ would allow me to change that another language would not?[/b] [b] What exactly is the .NET framework for? I've glanced at the Wikipedia page but my new-to-programming mind is looking for slightly more down to earth definition about the tasks it would simplify for the languages it supports. [/b][b] My question about XNA is essentially the same as the .NET question. What tasks does it simplify/do for me?[/b][/QUOTE] The easiest example would be a driver for your hardware, higher level languages cand be used for this as they dont have the kind of access you need, but languagees like C, C++, Assembly do have this access. .Net is just a framework that microsoft provides you with, it has loads of classes and functions in it. You could essenially re-write all the functions yourself (kind of what mono did allowing multiplatform availability of .Net) but it would just be re-inventing the wheel If you have ever used C# or VB then chances are you have used .Net XNA is just a game library, it manages things such as graphics, sound, user input... It uses DirectX 9 under the hood (or atleast XNA 3.1 did not sure about 4) so its windows only
Where is the best place to find tutorials for the Slick Library
So I've decided to go ahead with learning C# and hopefully using XNA later on. I already happen to have a book about C#, however I was wondering if someone has some especially good super guide online on C# (or potentially XNA)?
Im trying to code my first tile engine, but im having a lot of problems to load from a text file and rendering it. Here is my horrible code :( [code] TileEngine::TileEngine() { TILE_X = 16; TILE_Y = 16; //ctor } TileEngine::~TileEngine() { //dtor } void TileEngine::Init(int height, int width) { TileSet.LoadFromFile("gfx/tilesets/tileset1.bmp"); TileSet.SetSmooth(false); TileSet.CreateMaskFromColor(sf::Color::Color(255,0,255,255)); TileSetS.SetImage(TileSet); TileSetS.SetPosition(0,0); LoadMap(); } void TileEngine::Draw() { sf::IntRect irect; for(int x=1; x < TILE_X+1; x++){ for(int y=1; y < TILE_Y+1; y++) { TileSetS.SetPosition((x-1)*32,(y-1)*32); irect.Bottom = 32 * tilemap.MyTiles[x][y].layer1.tileSetY; irect.Top = 32 * ( tilemap.MyTiles[x][y].layer1.tileSetY -1); irect.Left = 32 * ( tilemap.MyTiles[x][y].layer1.tileSetX -1); irect.Right = 32 * tilemap.MyTiles[x][y].layer1.tileSetX; TileSetS.SetSubRect(irect); RenderW->Draw(TileSetS); } } } void TileEngine::LoadMap() { using namespace std; int map_tiles[TILE_X][TILE_Y]; Tile tl; int x; int y; int id; //storing map data in map_tiles ifstream reader("maps/map1.txt"); if (!reader) cerr << "Error opening file"; else { for (int i = 0; i < TILE_X; i++) { for (int j = 0, n = 0; j < TILE_Y; j ++) { reader >> map_tiles[i][j]; reader.ignore(); id = map_tiles[i][j]; cout << id <<","; TileID(id,&x,&y); //cout << "(X:" << x << ") (Y:" << y <<")"; tl.layer1.tileSetX = x; tl.layer1.tileSetY = y; tilemap.MyTiles[i][j] = tl; n++; if (n == TILE_X) cout << "\n"; } } } } //This function is to transfomr a number into a x and y in the tileset. It works well, but here is not the problem i think void TileEngine::TileID(int id,int*x,int*y) { for(int z=1; z < 17; z++) { if(id > (z-1)*16 && id < z*16 ) { *x = id - (z-1)*16; *y = z; } } } [/code] [code] 32,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 15,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 32,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5 [/code] As you can see, in the cmd the map is load properly, but when rendering : [img]http://f.anyhub.net/33Vz[/img] Thanks you.
Ok, so I'm using Macromedia Flash MX 2004, which uses actionscript 2.0, and I've ran into a problem with duplicating movie clips. See, I've got enemies spawning off-screen by duplicating a template and moving the copy, which works, but when I have more than one spawner going and enemies are supposed to spawn while there's another on-screen, it deletes the already on-screen enemy [i]then[/i] spawns the new enemy. So being unable to find a solution I've been adding to the game whilst ignoring that particular problem. However, now I've got the enemies shooting at me, an incredibly simple process in which the enemy duplicates a "missile" from a template and moves the copy to itself, at which time the code on the actual missile kicks in and it flies forward. But now, when the missile is duplicated, the enemy that fired it (the only one on screen because of the problem mentioned above) is deleted when the missile is created. I just tried having the template move to the enemy before duplicating so that the missile would spawn at the enemy, which worked, but the enemy is still deleted. So basically, the overall problem seems to be that I can only have one duplicated movie clip on the screen at once. Anyone know a reason for this? Or like if this is supposed to happen and I need a new method of enemies spawning/shooting? If anyone wants I can post a download for the whole program, it looks like shit and is probably terribly coded so I'm not too afraid of anyone stealing it. Thanks in advance for any help.
Does anyone have any good tutorials on making a GUI?
[QUOTE=laharlsblade;30298688]Macromedia Flash MX 2004[/QUOTE] heh
Sorry, you need to Log In to post a reply to this thread.