Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About snowfell

  • Rank
  1. snowfell

    ubuntu C++ game programming

    Well I use eclipse for java, so I do have some expedience with it. Never really considered it as a C++ IDE. But now after giving it a try, I really love it! Compiling takes a little bit longer, but that is well worth a very clean and smooth editor. Allegro works flawlessly with this IDE and I think I will we well set for my software development tasks. Thanks a lot for all the suggestions.
  2. So I'm new to linux, but I love Ubuntu. I am running Ubuntu 9.10 on my Acer netbook and it works great. Now that I'm ready to start doing some software development on it, I need a smooth IDE to go with it. When using windows I would use IDEs like dev c++ and Code::Blocks. Currently have Code::Blocks installed. Well on my netbook, Code::Blocks editor works great but runs very slowly when there is a lot of text on a page (ex. in a large 2d array holding map data). Is there anyway I can make the Code::Blocks editor smoother (maybe from disabling certain unneeded features) and if not is there another IDE that would be more ideal? Any advise would be greatly appreciated, thanks!
  3. snowfell

    [c++/linux] 2d array conflicts

    your right, looking back that is the right approach. thanks alot for the notice.
  4. Hey guys, could use some advise right now. I have been working on a c++ project and stumbled upon some problems I could use help with. Right now I'm trying to create a function that will transfer the content of one 2d array to another. The code below is my attempt at that. The strange thing is that this exact code worked in a completely different project. But now when I try and use this function I get an "invalid conversion from ‘int’ to ‘int (*)[32]’". Any advise on how I can fix this? Thanks a lot! void vTransferArray(int iArray1[MAX_MAP_H][MAX_MAP_W], int iArray2[MAX_MAP_H][MAX_MAP_W]) { for(int v = 0; v < MAX_MAP_H; v++) { for(int h = 0; h < MAX_MAP_W; h++) { iArray1[v][h] = iArray2[v][h]; } } } int iMapArray[MAX_MAP_H][MAX_MAP_W]; int iMap1[MAX_MAP_H][MAX_MAP_W] = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} }; vTransferArray(iMapArray[MAX_MAP_H][MAX_MAP_W], iMap1[MAX_MAP_H][MAX_MAP_W]);
  5. snowfell

    Intermediate Programming Setup

    Well its just that I would like to eventually be a programmer in a Source Engine mod (which is programmed in C++ and uses DirectX). I was hoping that I could at least give the basics of DirectX a try before I settle on a API. Trust me I know what jumping from one thing to another can cause to production...
  6. snowfell

    Intermediate Programming Setup

    Sorry if I gave the impression that I thought DirectX was more serious or powerful than Opengl. I just figured that before I choose which API to focus on that I try both. And I have a massive 1700 page text book for using DirectX for games (unfortunately this book is slightly out of date causing the SDK and other resources not to work with vista).
  7. Hey guys, could use some personal advise for taking programming more seriously. Over the last year I have been working with C++ and loosely with other things such as Allegro and Opengl. I would like to make the leap from sorta messing around with the material to a more serious approach. First on my list is to switch from CodeBlocks to Visual Studios. I just downloaded the express version but plan on getting the full thing soon. On my first pass through Visual Studios, things just seem very overwhelming. Is that to be expected? Any advise on mastering Visual Studios? I would like to give game programming a more serious attempt as well. Unfortunately setting up DirectX in Visual Studios is much harder than setting up Opengl in CodeBlocks(one devpac away...). What resources and things to download would I need to start working with DirectX 9.0? Thanks for all the advise and sorry for the noobish post, but my last unguided attempt at these things didn't end up well.
  8. snowfell

    [c++] cpu raycasting

    Even with all the downfalls to raycasting, I still plan on following through on this project. Its not like I'm trying to create a game for the commercial market or anything, just trying to learn as much as I can before I go off to college in the fall. Hey if I can really program this graphic engine in pure win32 with GDI, that's what I will just have to try and do. For all the advise and info I thank you all, now I feel a bit more confident coding this project. Edit: oh and phresnel, that looks pretty sweet.
  9. snowfell

    [c++] cpu raycasting

    Well I don't really want to take anyone elses work for the graphical engine. If all possible I would like to code the whole thing myself. Pixel-based access huh? How does this compare to something like what Opengl uses? Would it be possible to make a raycasting program using solely c++ and win32? Would that include GDI or something else? I ask this because I have a massive text book I bought a while back on win32 (well over 1000 pages) and could prove to be the best option for me. Also does anyone have any useful books to recommend dedicated to raycasting. Thanks for all the help so far, this is a lot more information than what I was able to find myself.
  10. snowfell

    [c++] cpu raycasting

    Hi, if you know anything about raycasting I could probably use your help. I am trying to design a graphical program that uses raycasting to render a pseudo 3d world (probably used for a game, you know like the classic Doom games and Star Wars Dark Forces). To do this I plan on using c++ to design for a windows platform without Opengl, SDL, or Direct X. I have spent the last week or so trying to find any useful information on this outdated topic. After reading what I found, I believe I have a pretty solid understanding for the concepts behind raycasting but I am struggling quite a bit putting it to code. Unfortunately because raycasting is so outdated now I can only find resources dating back to 1995 (still using VGA and everything). Are there any more recent tutorials or guides to raycasting? My main purpose of this topic was to get a better understand of what I should expect in the future and any useful tips to get me started. My understandings in trig are only basic, are there any areas I should study before hand? I could also use some advise for how I am going to render my program in a more modern technique. Thanks a lot, this project really means something to me.
  11. snowfell

    [c++] Effective Rendering

    See I love programming also, that's why I plan going to college for computer engineering. This project that I am currently working is also meant to be the beginning to a long term game project. I just was hoping the get the game to be as impressive as possible (haha, only one using something besides iostream), but I do believe that these concepts are a bit difficult for me right now. When I feel more comfortable I will take time to try these later (probably over summer break). Thanks a lot zombiebasher and everyone else for you guidance and time.
  12. snowfell

    [c++] Effective Rendering

    After spending some time looking into these methods I feel a bit overwhelmed. What can I do to prepare myself for this more advanced style of 3d programming? I have basically worked my way through Beginning Opengl Game Programming by Dave Astle, Kevin Hawkins. But when I try to take the next step into more advanced methods it just seems too much. Know of any good books that make a good transformation from beginner to intermediate. Also where can I go to learn about the structure of a real time 3d program? Thanks for all the great incite so far, you all have been a great help!
  13. snowfell

    [c++] Effective Rendering

    Well I already have bitmaps assigned to an array. It would help the most if I could put all the vertexs in one array regardless of the texture its using. It would grow a little confusing having a different vertex array for each texture to be used. If its an option to do this, what might I want to look into? What method is used in most modern or older games? In a game like Quake what method of rendering would you expect they used?
  14. snowfell

    [c++] Effective Rendering

    I think I am going to give vertex arrays a try. So far I have been able to setup a vertex array that renders all my code as before. But I am having trouble understanding how I can have the type of texture support that I did before. I already know how to setup the texture coordinates, but I don't see how I can have different textures assigned to different shapes without having a new array for each shape of one texture. Is there a way to give multitexture support for these arrays?
  15. Hey, guys. I could use a little help with making a program render more effectively, if you don't mind lending me a few minutes of your time. I have been working on this small project for a little while now and I thought it was about time to try and improve my method of rendering. My goal of the project is to have a simple 3d fps-style game (not really caring about game aspects like AI or lighting at the moment, just trying to get the 3d environment and stuff up and running smoothly), as my final project in my high school C++ class. Basically I have multiple functions (cube, wall, .ect) for rendering, and the program has to call these functions every time the loop goes through. Then I use these functions to draw the world and everything in it. I believe that this method is very ineffective but I don't know of any other way. Would this be a good time to look into display lists, or would that help at all? Any other tips on making a better rendering engine? Thanks for your time and help! ->basic program model Main() { Window_Setup() Import_Textures() Init() Game_Loop() { Rendering() Input() Physics() } Destroy() } ->function for rendering cubes void BuildCube(float x1, float y1, float z1, float x2, float y2, float z2, int tex_l, int tex_x, int tex_y) { glBindTexture(GL_TEXTURE_2D, tex_l); glBegin(GL_QUADS); //bottom glTexCoord2f(0.0, 0.0); glVertex3f(x1, y1, z1); glTexCoord2f(tex_x, 0.0); glVertex3f(x2, y1, z1); glTexCoord2f(tex_x, tex_y); glVertex3f(x2, y2, z1); glTexCoord2f(0.0, tex_y); glVertex3f(x1, y2, z1); //top glTexCoord2f(0.0, 0.0); glVertex3f(x1, y1, z2); glTexCoord2f(tex_x, 0.0); glVertex3f(x2, y1, z2); glTexCoord2f(tex_x, tex_y); glVertex3f(x2, y2, z2); glTexCoord2f(0.0, tex_y); glVertex3f(x1, y2, z2); //sides glTexCoord2f(0.0, 0.0); glVertex3f(x1, y1, z1); glTexCoord2f(0.0, tex_y); glVertex3f(x1, y1, z2); glTexCoord2f(tex_x, tex_y); glVertex3f(x2, y1, z2); glTexCoord2f(tex_x, 0.0); glVertex3f(x2, y1, z1); glTexCoord2f(0.0, 0.0); glVertex3f(x2, y1, z1); glTexCoord2f(tex_x, 0.0); glVertex3f(x2, y2, z1); glTexCoord2f(tex_x, tex_y); glVertex3f(x2, y2, z2); glTexCoord2f(0.0, tex_y); glVertex3f(x2, y1, z2); glTexCoord2f(0.0, 0.0); glVertex3f(x2, y2, z1); glTexCoord2f(tex_x, 0.0); glVertex3f(x1, y2, z1); glTexCoord2f(tex_x, tex_y); glVertex3f(x1, y2, z2); glTexCoord2f(0.0, tex_y); glVertex3f(x2, y2, z2); glTexCoord2f(0.0, 0.0); glVertex3f(x1, y2, z1); glTexCoord2f(0.0, tex_y); glVertex3f(x1, y2, z2); glTexCoord2f(tex_x, tex_y); glVertex3f(x1, y1, z2); glTexCoord2f(tex_x, 0.0); glVertex3f(x1, y1, z1); glEnd(); }
  • 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!