Jump to content
  • Advertisement

AtomicWinter

Member
  • Content count

    13
  • Joined

  • Last visited

  • Days Won

    1

AtomicWinter last won the day on July 18

AtomicWinter had the most liked content!

Community Reputation

7 Neutral

About AtomicWinter

  • Rank
    Member

Personal Information

  • Role
    Programmer
  • Interests
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. AtomicWinter

    Advice for Creating a Hand Drawn 2D RPG

    A little off topic, but I just wanted to say that I love your art style. The environment, shading, glows, etc. all look really cool. Well done.
  2. You do have something to fall back on... a framework/engine that took many experts years to develop and fine tune. You say that you have been programming for several years, but ask yourself what you have to show for it. You're going to always be spinning your wheels trying to develop something that will not get completed. Save your time/sanity and just use an existing engine and focus on the game you want to develop.
  3. What is your ultimate goal? If it's to make a game/RTS then why do you care? With that logic then why use an operating system? Just develop your own... afterall, using an existing operating system would be cheating. Using an existing IDE would be cheating. Buying a lambo would be cheating; create your own car from the ground up. Buying ground chuck would be cheating; slaughter your own cow.
  4. C# is not Windows only either. The Internet is inundated with Unreal Engine and Unity tutorials, from basic to advanced. I believe the main problem is, and I mean this with all due respect, is you just want to copy and paste other people code instead of taking the time to actually learn the programming patterns, logic, concepts, etc. You need to take a step back and really understand the core concepts.
  5. AtomicWinter

    Platform/Stealth: which one sells best?

    The answer is going to be biased based so you are going to get mixed answers no matter what, which is probably what you're after. Some people love the Metroidvania style while others enjoy the stealth style. My opinion is a narrative stealth game, as that sounds like it could be interesting if done correctly. I don't care too much for the Splinter Cell series either, but there are other stealth style games that have been fun. The Last of Us, Metal Gear Solid, Dishonored, Little Nightmares, the Far Cry series, etc. are a few that I have enjoyed over the years. With that being said, I enjoy the nostalgic feeling I get from Metroid/Castlevania/etc., but not nearly as much as a friend who is die hard. On a side note... You and you're team are not Nintendo, Sony, Microsoft, Ubisoft, Valve, etc., but that's what makes you... you. We don't always need copycats and we don't always need AAA games for that matters. A good indie title brings me just as much of enjoyment as a AAA game does. For instance, I just recently played Hacknet and couldn't put it down. He did an amazing job on the game and it's one of the rare games I'm going to replay. Don't let other people try to bring you down. I don't know the experience of your team, but the fact that you are making this post and doing leg work before jumping into the programming phase is a good sign. I hope the best for you and you team.
  6. AtomicWinter

    The Battlefield V "Historical Accuracy" Controversy

    Seems like a redundant statement since it's essentially analogous to what I was trying to portray.
  7. AtomicWinter

    The Battlefield V "Historical Accuracy" Controversy

    I don't get it... it's just a game that is meant to be fun. Period. Battlefield has never been accurate and they don't claim to be either (jump from a jet, shoot a rocket launcher or snipe, get back in jet and fly away; as an example). In COD you can run along a wall, but everyone is OK with that. Why is something so minute such an issue with Battlefield? If it bothers someone that bad then they need to take another look at their priorities.
  8. AtomicWinter

    Mulitple Game Loops?

    The units can still be updated, but if they're out of view then there is no reason to draw them. You could create a 2x2 buffer around the area you're drawing to account for the panning, zooming, etc. I don't consider this a premature optimization since the number of tiles x number of layers can quickly add up and degrade performance (see below for an example of this). Like ChuckNovice mentioned, you are essentially doing one game loop either way. I think the way you are managing how the updates/rendering is done needs addressed. Can you give some pseudo code on how you are currently doing this? I can give better advice once I see that. libGDX is good, but drawing every tile is going to bring any system to it's knees. Think about it this way, you have a map that is 500x500 tiles with each tile being 32x32. That's about 250,000 tiles being drawn per loop. Now if we do the optimized method then for a 1920x1080 resolution you would only draw 2,232 tiles (62 x 36) per loop - (1920 / 32) x (1080 / 32) resolution with the 2x2 bleed area. Here is an example as well as the article: https://github.com/mozdevs/gamedev-js-tiles/blob/gh-pages/performance/offcanvas.js https://developer.mozilla.org/en-US/docs/Games/Techniques/Tilemaps (see the performance part) Either way, show the pseudo code of what you're thinking.
  9. AtomicWinter

    Mulitple Game Loops?

    Each map should have it's own update / render logic, but not necessarily a game loop (that consists of physics, object updates, player input, etc.). In your main game loop just call activeMap->Update() / activeMap->Render() as an example. Also, only render what you can see and nothing more. You shouldn't be looping through all of those tiles every frame.
  10. AtomicWinter

    2D Tile Map Rendering (C++ w/ SFML)

    Method 2, but you want to avoid looping through all of the tiles every frame. Here is an example of how to do that: https://gamedev.stackexchange.com/questions/32140/effecient-tilemap-rendering Also, you may want to look up quadtrees to help with spatial queries as well.
  11. AtomicWinter

    Initializer list woes

    Arbiter32u test1(stuff, {1U,2U,3U}); What is {1U,2U,3U}? Is that just an array of unsigned ints, a std::initializer_list, or? The compiler most likely doesn't know you are wanting to pass a std::initializer_list since your passing it to args. When you use auto the compiler is able to deduce it to a std::initializer_list before passing it to the args. This would work fine since you are actually passing the list to the args, which represents one object/arg: Arbiter32u test1(0, std::initializer_list<int32u>({ 1U,2U,3U })); As a matter of fact, you should be able to do this as well since you are allowing multiple args to be passed: Arbiter32u test1(0, std::initializer_list<int32u>({ 1U,2U,3U }), 0, 1, 2, 3.0, 4); //OR Arbiter32u test1(0, std::initializer_list<unsigned int>({ 1U,2U,3U }), 0, std::initializer_list<unsigned int>({ 1U,2U,3U }), 2, 3.0, 4); If you add this, just as an example. then it would work fine for just your std::initializer_list so you can use Arbiter32u test1(stuff, {1U,2U,3U}): template<typename ...Args> Arbiter(int stuff, std::initializer_list<int32u> args) : subject(args) { } Perhaps someone with more knowledge on this would have better information for you.
  12. The best thing you can do is to learn how to debug your code. If you step through the logic of your program you will be able to see what is actually happening and what values are being assigned where. I believe that is going to be the best thing here. It's hard for me to understand some of the logic without seeing more. For instance, in your CheckBorders method I am not sure what those magic numbers are or represent. If I remember from your previous questions those are the edges of the grid (and hence the name), but others looking at the code would not know this. You need to make constants to represent what those actually mean (GRID_MIN_X, GRID_MAX_X, GRID_MIN_Y, GRID_MAX_Y, etc.). Anyway, start a debug and step through your code. You will instantly be able to spot the issue.
  13. AtomicWinter

    creating and manipulating a grid

    Sorry. Didn't see the C#, Unity tag. This can easily be converted should you desire. Best of luck. OK; this was a quick few minute mock-up and just an idea... I did not test this, add validation, const correctness, etc. Strictly just a mock-up. With that being said, I don't see the problem with a 1D array. It can easily be done for the entire grid as well as only the visible portion of the grid. Here are a few simple structures that could define the game tile as well as the grid cell. The idea with the grid cell is to have an occupied flag. When you go to place a tile, query a cell, etc. then you can easily see if there is a tile placed there already. Another nice thing is if you want to remove a tile. When you remove a tile you can simply set the occupied flag to false to allow a new tile to be placed there. struct GameTile { //--Tile POD implementation }; struct GridCell { bool Occupied; GameTile Tile; }; Here is an example class showing the basic concept of working with the grid. Of course you can set your access modifiers however you want: class Grid { private: const static int GRID_ROWS = 30; const static int GRID_COLUMNS = 20; const static int SCREEN_GRID_ROWS = 15; //--The number of visible rows on the screen. This should, of course, be //--less than the number of GRID_ROWS GridCell cells[GRID_COLUMNS * GRID_ROWS] = { 0 }; public: GameTile GetCellTile(int x, int y) { return cells[GetCellIndex(x, y)].Tile; } void SetCellTile(int x, int y, GameTile tile) { cells[GetCellIndex(x, y)].Tile = tile; SetOccupied(x, y, true); } void RemoveCellTile(int x, int y) { //--No need to actually remove anything... just set the cell as unoccupied. SetOccupied(x, y, false); } bool CellIsOccupied(int x, int y) { return cells[GetCellIndex(x, y)].Occupied; } void SetOccupied(int x, int y, bool occupied) { cells[GetCellIndex(x, y)].Occupied = occupied; } public: void AutoPlaceTile(int x, int y, GameTile tile) { if (!CellIsOccupied(x, y)) { SetCellTile(x, y, tile); return; } //--Add logic to check neighbor tiles and place new tiles } private: //--This will give you the index for the entire array int GetCellIndex(int x, int y) { if (x < 0 || x > GRID_COLUMNS) { //--Handle this } if (y < 0 || y > GRID_ROWS) { //--Handle this } return y * GRID_COLUMNS + x; } //--This will only give you the index to tiles visible on the screen. //--I'm guessing that the non-visible cells are all above the visible cells. int GetScreenCellIndex(int x, int y) { auto screenY = SCREEN_GRID_ROWS + y; //This needs tested... if (x < 0 || x > GRID_COLUMNS) { //--Handle this } if (screenY < 0 || screenY > GRID_ROWS) { //--Handle this } return screenY * GRID_COLUMNS + x; } }; I hope this will help give you an idea or two so you can finish your implementation. I don't know exactly how you want your blocks to flow, but with this it should be relatively easy to perform the auto tile placement logic.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!