Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

138 Neutral

About Bigfatmeany

  • Rank
  1. Bigfatmeany

    Fez like 3D engine.

    ah, Ok, I understand more now knowing that it's nothing super fancy, just something basic. Thank you for your help.   On the other hand   Im going to start with OpenGL because I know SDL very well, so I've been told OpenGL is a good direction to head in. but what does DirectX offer over OpenGL?
  2. Bigfatmeany

    Fez like 3D engine.

    I was playing minecraft with a friend earlier because I was bored and wanted a break from the programming I was doing. she was complaining about lag, and proposed the question "Why does minecraft lag on my computer". Well, shes pretty tech savey, so I gave my explanation (which I'm not going to state as to avoid de-railing the thread) and then I thought about FEZ. It was stated in "Indie Game: The Movie" (Im not sure of the company who created it or I would post it here) that the graphics in FEZ were created by taking 6 images from photoshop, putting them into a 32x32 square on a tile sheet, then wraping them around to make them form a block.    Phil Fish, the creator of FEZ, made it sound simple, but it doesn't seem that simple to me. While Phil used Microsofts XDA, Mojang seems to have managed to do the same thing with java(I believe, the language could have changed, as I stopped keeping up to date with minecraft long ago).   I have theorized many ways to do this, but im unsure how to go about executing a test. I have never worked in a 3D enviroment before. I have never wanted to venture out of my 2D wonderland that im in.   So the quest is; Where does one start with a SIMPLE <- it's obviously not simple, but I mean in comparisons to others, 3D engine., Or must something like DirectX be used to do this. Im using the word engine, because It is what I believe an engine to be, there could be a better word for this.     My generally accepted (by myself I mean, i've never had anyone else to discuss this with) theory is to take an index of arrays, create an array for each side of the cube, and work that with an index of arrays grabbing textures, then rendering the full block to the screen.    The language im using is C++.
  3. Bigfatmeany

    Expression must have class type?

      Then where is it defined? It isn't in the header of CSprite that you posted. And however it is defined, it is unlikely that &name.member[][] makes sense.   Oh, I see what your saying. You are correct I never defined it in the header to be used across both of those functions. im going to try to make a struct named map with int tile in it. Is there a better way to do this?
  4. Bigfatmeany

    Expression must have class type?

    Sorry to everyone wondering where the it's actually throwing the error, I posted this before I went to bed and kinda spaced it. Both of those lines are throwing the error. I'm not to confident on using #defines, as Im not very familiar with them, so if there is a better way to achieve my goal, i'm more than open to suggestions/ideas or tuts.  No map is not a global variable. This is being done in the sprite class because I didn't want to create any unnecessary classes. 
  5. Im working on Tile Mapping using SDL2, and so far stuff was going good, but for the life of me I can't figure out what I need to do to solve this problem. This is the error: Expression must have class type. Here is the class along with its' header. #include "Sprite.h" #include "includes.h" CSprite::CSprite(SDL_Renderer *passedrenderer, std::string Filepath, int x, int y, int w, int h) { renderer = passedrenderer; std::cout<<"Before\n"; image = IMG_LoadTexture(renderer, Filepath.c_str()); std::cout<<"after " << image<<std::endl; rect.x = x; rect.y = y; rect.w = w; rect.h = h; } CSprite::~CSprite() { SDL_DestroyTexture(image); } void CSprite::Draw() { SDL_RenderCopy(renderer, image, NULL, &rect); } void CSprite::SetX(int X) { rect.x = X; } void CSprite::SetY(int Y) { rect.y = Y; } void CSprite::SetPosition(int X, int Y) { rect.x = X; rect.y = Y; } int CSprite::GetX() { return rect.x; } int CSprite::GetY() { return rect.y; } void CSprite::LoadMap(char *name) { int x, y; FILE *Map; Map = fopen(name, "rb"); for (y = 0; y < MAP_MAX_Y;y++) { for (x = 0; x < MAP_MAX_X;x++) { fscanf(Map, "%d", &Map.tile[y][x]); } } fclose(Map); } void CSprite::DrawMap() { int x, y; for (y = 0; y < MAP_MAX_Y; y++) { for (x = 0; x < MAP_MAX_X; x++) { if (&Map.tile[y][x] != 0) { } } } } Header: #pragma once #include "includes.h" class CSprite { public: CSprite(SDL_Renderer *passedrenderer,std::string Filepath, int x, int y, int w, int h); ~CSprite(); void SetX(int X); void SetY(int Y); void SetPosition(int X, int Y); void Draw(); void LoadMap(char *name); int GetX(); int GetY(); void DrawMap(); #define MAP_MAX_Y 10; #define MAP_MAX_X 10; #define TILE_SIZE 32; private: SDL_Texture *image; SDL_Rect rect; SDL_Renderer *renderer; }; Thanks for any help, I'm going to attempt to solve this again tomorrow, but I've been a bit crushed on time recently.
  6. Bigfatmeany

    beginners pong in unity

      I might just be really bad at pong, but I played for probably an half an hour and only beat the AI once, maybe it follows the ball a bit to well? However other than sound affects seeming a bit loud, everything seemed to work fine and I experienced only a couple bugs, the AI kinda glitches up and down, but I think you already knew that one, however this is difficult to explain. http://puu.sh/7Ok2J/cd2b0f8f51.gif.  The ball got moving so fast, I believe it pushed the AI off screen, eventually he was playing while off screen, and the game slowed down terribly bad. If that doesn't download let me know, puush doesn't like gifs sometimes.
  7.   I think unity is a great option for what you are looking for. I delved into 4.3 not to long ago, and I think that it did a lot of what people wanted from it. Im unsure, but I think c# is most recommended language for use with unity scripts. As far as im aware though, It may be the only one but i'm not completely positive. In the end though, with your C# exp, and unities tools being right there, I think it would be a great thing to work with as long as you enjoy it.          Do you want 2.5D or pseudo 3D. From my experiences 2.5D would be like little big planet/New Super Mario Bros, where as pseudo 3D would be a 3d effect made by 2d sprite, as in something like world runner, and that type of fake 3D. There is also Isometric, which is again kinda like a fake 3D, but still looks better in a 3D world than a pseudo 3D effect.       Are you sure? because thats pretty much 2.5D physics for ya, In a 2.5D world, you can basically have 3 layers. your front, your middle, and your back. these in order done right will give you that 2.5D effect. Take a look at Beatbuddy:Tale of the Guardians. This game used unity and did so perfectly.  This is the best example of basic 2.5D I could find. Once you really have a hard grasp on how you want it to look, decide whether or not unity would be best for you.   All in all, I think unity is the best option here, Im not trying to discourage you from starting from scratch, but unity is a very powerfull and time saving tool if you know what you are doing. And while 4.3's tools are still new, tutorials will come up eventually, and messing around with the ui on your own to see what does what will also help. there are some Unity made tutorials on their website related to these tools.
  8. private: bool quit; CSprite *player; CSDL_Setup *csdl_setup; }; game_loop.h
  9. Well, it just continues to fail at the same point.  return renderer; I'm unable to see a consol or anything.
  10. Didn't see this earlier. == is a comparison, while = is an attribution. This: x = 1 means that you want x to be 1, and now it is. x == 1 means that you want to know if it is 1.   So, == is comparing two things, while = is modifying the left one's value to be the same as the right one. see, thats what i thought. But it confuses my why visual studio 2013 wouldn't throw me a warning about that in an if check. Sprite.cpp http://paste.ofcode.org/xDsSHHcNbL8YWhjscfkWnh sprite.h http://paste.ofcode.org/u8Jb28PZAUTux7PfrhJG8Y
  11. that did give me a warning, i just didn't get around to changing  it, but it still breaks.
  12. SDL_Setup.cpp http://paste.ofcode.org/h7TiTsMNJLQK9U57k9Xw7q SDL_Setup.h http://paste.ofcode.org/9qem9BMGWj8TcqcFMFQEZJ Game_Loop.cpp http://paste.ofcode.org/x4KRbXXgAvACvi9ch46vjx Game_Loop.h http://paste.ofcode.org/DSpAvqcgDGQ66MEY6jKvEA   Im using visual studio 2013. If it is showing them, im seeing them no-where, and I know it used to throw warnings in 2010.
  13. ah, this solved my first error, no it didnt. which was odd. It compiles with no errors or warnings. except for the break, which is now happening here. SDL_Renderer *CSDL_Setup::GetRenderer() { return renderer; } more specifically return renderer; EDIT: interestingly enough if I have: csdl_setup = new CSDL_Setup(&quit); it breaks in the original place. however: csdl_setup == new CSDL_Setup(&quit); "==" causes it to break in the return renderer; function. any known reason to why == and = are different or did i just missing something from my books and studies?
  14. I have nothing that is un-allocated, however as shown here, for some reason my renderer and main event are appearing null, even though they aren't and shouldn't be. heres the line that breaks: while (csdl_setup->GetMainEvent()->type != SDL_QUIT) here is a picture showing them both appear as NULL and the SDL code:   EDIT: I couldn't get the picture to work so heres this:   csdl_setup = 0x01394de8 {window=0x01013050 {...} renderer=0x00000000 <NULL> mainEvent=0x00000000 <NULL> }   SDL code: CSDL_Setup::CSDL_Setup(bool *quit) { *quit = false; if (*quit = true) { // Start SDL SDL_Init(SDL_INIT_EVERYTHING); window = SDL_CreateWindow("My First RPG!", 100, 100, 600, 480, SDL_WINDOW_SHOWN); if (window == NULL) { std::cout << "No window!" << std::endl; *quit = true; } renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); if (renderer = NULL) { std::cout << "No Renderer" << std::endl; *quit = true; } if (*quit = true) { //Quit SDL SDL_Quit(); } } }
  15. my main is fairly simple, and my SDL_init call is made first thing in the CSDL_Setup class,  and my main looks simply like this: #include "includes.h" #include "SDL_Setup.h" #include "Game_Loop.h" int main(int argc, char* args[]) { CGame_Loop(); return 0; }
  • 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!