Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

591 Good

About lede

  • Rank

Personal Information

  1. You may want to look into Node.js and see how it might be able to replicate the games your talking about.  Using node in your project lets you do a full stack implementation of any one of these games using a single language.  If your interested I have a proof of concept server running that tracks the movement of a couple of balls. The next steps would be to implement physics which I have used box2d with JavaScript before so it wouldn't be that difficult.  Looking on npmjs.com there are a couple of package available that support the box2d library.  Lucy-b2 looks like it might work and the author wrote up some decent instructions. Also if you are interested I've been writing a tutorial series talking about this very subject using JavaScript, canvas, and Node.  Just PM me and I'll send you the links to the proof of concept server and my tutorials.
  2. I was doing some searching for some information today and ran into this bug.  Start a search, I believe any term will do, Click on resources -> Books and you'll get this error message: Fatal error: Call to a member function getSearchWhere() on a non-object in /var/www/gamedev/admin/applications_addon/ips/ccs/sources/databases/fields.php on line 518 It doesn't seem like there is any specific term needed to crash the search system, for my searching I tried Horde3D and Unity which both returned the same error message.  Also I tried the search in FireFox, MS Edge, and Chrome all returned the same error message so it doesn't seem to be a browser specific issue.
  3. If you feel your computer is terribly slow then I'll bet there are a lot of people in this world that are in your same situation.  So checking your code against a slow computer is a good thing because then you find places your algorithms really hamper your game. If your running into calculation issues on 50-100 projectiles then it is time to really optimize your code.  But there are many solutions to this problem and without knowing a little more about the game mechanics it will be difficult to provide you a decent answer.  Is this a top down tank shooting type game? Or is this a side scroller game where your projectiles have a limited direction of flight. Either way one thing you might look into doing is breaking your collision tests into groups so that your not testing every collider in the game world against every projectile.  For example if there is a collider located in the opposite direction the projectile is flying then there is no reason you should every test those two colliders.  Many physics engines will break their collision system into groups of close objects.  This way an object that is on the far lower right of the game field isn't being tested against an object in the upper left corner.  You may need to use a different type of data structure that help you sort through all your colliders and collect objects within a certain amount of distance for each other. It sounds like you are rolling your own physics system.  If this is the case then maybe look at Box2D since all the code is open source you can see how they handle collisions in their system and also the different types of data structures they use to manage the physics world.  You may also want to look at a couple of books that discuss these concepts.  I've read "Game Physics Engine Development: How to Build a Robust Commercial-Grade Physics Engine for your Game" and he goes into great detail about handling the physics world.
  4. Sorry to say but this question is very open ended and there will be a lot of different answer which will not help you gauge how long it will take you.  For some developers 1 year of experience is like 10 years for other people like myself.   Now then with that said there has been several people ask why focus on a console game at this early stage?  You would do better at just writing a game and if it is a lot of fun then try and release it on those other platforms.  This is the beauty of Unity in the way that it can grow with how well you do.   If this is your first time writing a game you might want to take a step back and thinking about a few things you want in your game.  Start with building a game design document.  This will help you focus on your game plus as your idea grows you can add it tot he document so that when the project get large enough you won't forget ideas because you have so many great ones flowing through your head every minute.  Also focus on your strengths and find ways to mitigate your weaknesses.  It is hard to be able to do it all in a game so find the parts of the project you would like to work on and mark those as your tasks.  Things you may want to do but don't have skills could either be a learning experience or find a team member to fill those shoe's.   I've work on several team projects that have always failed because we didn't have a good plan to work from.  Our team member would always be excited for a week or so but after they figure out they have to some real work and planning is done they seem to disappear.  With a good design document you can use it to fuel your ambitions when you hit the lows of your project.  Keeping your motivation going over a long period of time is the real challenge so think about ways you can keep your enthusiasm going while working on your project.
  5.   Hmm I could see this providing some interesting results but then the next question is how long to you run the network until you consider your map worthy of playing...  Rhetorical question.  Now I can't wait to get home and crack open some of my old AI algorithm books and start building some concept code.
  6. lede

    Which engine to pick?

    There are a few HTML5 and JavaScript engines out there.  Check out GitHub there are a tone of open source projects that will fit this bill.  I've been reading a book that talks about this subject, you might want to check it out "Advanced Game Design with HTML5 and JavaScript".   The book has a decent explanation of making game engines and he provides the final code for his engine with the book.  The only major draw back I found with following his code and making my own engine was I ran into a MAJOR JavaScript ES6 to ES5 comparability issue.  He does talk a little bit about it but in the end I spend several days working on making my engine work in Safari for the Mac.  This is one major down side to using a browser to make games, there can be so many different bugs because browser vendors seem to never agree on features that should be included.
  7. Nice UML diagram.  That is about it really though. As others have mentioned there isn't enough details in this diagram to tell what really is going on.     The one item I would recommend you thing through a little more is the Input system.  You have two classes which look like they do the same job but are just called something different.  You may find doing a little abstraction here might help make your engine usable with not only a keyboard and mouse but maybe a joystick or touch screen.  Another thing to think about here is how will you manage allowing players to customize they key commands?  Sure WASD is used a lot to move around in a game but what if I'm used to using the arrow keys because I'm left handed or say IJKL instead?   As others have said start programming and see what happens.  Try a few things out and see what happens.  If the code breaks or doesn't work as expected then go back to your diagram and make some adjustments.  Iteration here is the key and don't be afraid to make mistakes.  We all do and most of the time you learn more from it.   Lastly if your serious about making a game engine then start building up your reference library.  Find as many books and articles you can on the subject and read as much as you can.  Using one article for reference isn't always the best way to get a better understanding of the subject.  
  8. When dealing with large maps you only need to render what will be seen by the player and skip the rest of the map to save memory.  For example if I have a world that is 2000x1000 tiles it would be crazy to try and render this whole map in a timely fashion.  That would be 2,000,000 total tile I would have to render and this is only for one layer!  Ouch that could be VERY costly on even the fastest computers.   This explanation is complicated and has a lot of calculations so please bear with me.  We are going to need to track a lot of different variables to help reduce our iterations to something that is manageable.  Notice in my world definition I talked about the size of the world in tiles and not pixels.  This is because with the beauty of tiles we can male them just about any size we want which also changes the size of our world.  It is also possible to mix tile sizes for different layers but that is another topic.   Now then the first thing to wrap your head around is that your players avatar should typically not move around your computers monitor, meaning it will mostly be drawn in a single location on the monitor.  But instead the world coordinates will move which means the tile map is what you want to move around to simulate the movement of the player.  I lost a couple of programmer in collage when I tried to explain this but the concept is still true.  This is also known as the players screen coordinates.   Knowing where the player is located in world coordinates will help us do the first calculation which is figuring out the upper left corner of the world that needs to be drawn.  To do this we would just need to know the screen resolutions and subtract half the height and width from the players world coordinates.  For example if the game resolution is 1024x768 we would want to take the players world x coordinate and subtract 512 (1024 / 2), and then subtract 384 from the players world y position.  This would then give us the top left world position of the tile map.     The next step is to take the world position which would be in pixels and convert it to tiles.  To do this we would now need to know the width and height of your tiles.  for an example we will just use a 32x32 tile just so the math will be easier.  We would take the upper left world position x and divide it by 32 and do the same to the y coordinate.  This would then give us the starting tile number to start drawing at and we would then just add enough tiles to cover the screen.  Again if we are using the 1024 x 768 resolution we would just divide 1024 by 32 which equals 32, and also 768 divide by 32 equals 24.  Got to love some nice and simple math... Now that we have a starting tile and the ending tile we will iterate through our tile array and only draw these relevant tiles.  Oh and this little optimization take the 2,000,000 original tiles to draw in one frame down to 768 tiles.   Now once you start moving the world map around you may want to expand the number of cols and rows enough so that you don't get clipped tiles showing on the game world.  But this will be something you'll want to experiment with until you find a happy medium.   If your also having to deal with an even bigger world map you could apply this same concept to the tiles data structure and as the player moves around the world and gets close to the worlds border it would then pull the data from your hard storage.  Just make sure that when the player is moving around their computer isn't going to the hard storage every couple of frames.  What I mean by hard storage is if your hosting an internet game it would be loading from the internet, or if they are playing locally on the computer pulling it off the hard drive.  Again this will be something you will need to play around with to try and find the right sweet spot for when to poll for new data.
  9. lede

    SDL Game Programming in C

    Not sure I can help other then to say I feel your pains.  It took me years to get a grasp of basic concepts how C/C++ is used.  I've read numerous books on the subject for the past 20+ years and until I went back to Collage.  It finally clicked but I had 8 or 9 different programming languages under my belt and I finally was able to learn how C/C++ works.  With your learning C and C++ make sure to take some time and learn Object Oriented Programming (OOP).  This is a critical concept to understand and once you have this knowledge converting between C and C++ code will be a lot easier.  But without OOP knowledge it will make it a little more difficult.   I'm not sure if you have done any research on finding decent books to learn from but I would highly recommend you check out Amazon for a decent SDL book.  I'm still looking for a decent SDL book myself but I can recommend a few books I have read in the past and found a few decent books:   Beginning C++ Through Game Programming by Michael Dawson. Game Programming Patterns by Robert Nystrom, covers common game programming patterns (OOP).        
  10. lede

    Create A Gaming Operating System

    With only knowing C# your going to have a hard time translating this to a *nix system.   First you should start researching and understanding how networks connect and share information.  You'll need a good knowledge of TCP and UDP packed of the IP protocol stack.  Sending and receiving data over the internet will be a key feature you will need to define.  C# can do these but you will want to look into a Windows Server box so that you can run either ASP.Net or MVC.  C# can be used directly to work as an application server but you will need to know a lot about IIS and how to do major performance tuning.  The upshot here is you can keep your proprietary code and sell if for a big profit.   Now if your really wanting to make *nix into a solid game service then look into a solid http server like Apache HTTPD.  There are other *nix web servers out there but by far there is a good deal of information on HTTPD.  Next you will need to find a parse-able language to program in like PHP, Python, or Perl.  The good news is you C# learning can be applied to any of these scripting languages.  If your really interested in playing around with this before you fork over a lot of time in setting up a *nix distro then check out XAMPP.  This is a great project and will give you direct access to Apache HTTPD, MySQL, PHP, Tomcat/Java, and other linux tools on a windows or mac PC.  DON'T USE THIS IN PRODUCTION!   Now that you have a server up the next trick can be to figure out how to share information between sessions (Sessions are connections to different browsers).  One tool to learn how this all works together would to be to create a simple chat program.  You will want to look into AJAX which brings up another language you will want to learn, JavaScript!  This powerful browser based scripting language will help you manage your connections between sessions and the server.   The last thing I want to mention if your serious about this project is you need to WRITE DOWN A PROJECT PLAN!!!!  This does a couple of things.  It helps you write out what you want to do and provide it to either potential helpers, or even help investors look into it as a viable project to fund.  Doing the planning will also help you find place of things you don't know which will mean these are places you and your team will need to research and find solutions to these problems.  Once it is created don't think it is done.  Make time to continue to update the project plan because it should become a living document of your project.  The better you can explain the project the better others will be to accept it and want to help you out.  Also don't be afraid after writing it to have professionals give it a review.  They maybe able to provide insight into your idea and places to do research.   So here is a quick synopsis:   Write a project plan!   Learn multiple programming languages.  C# is already known and will be good on Windows computers for the end user interface.  JavaScript, HTML, XML, JSON, C/C++, Server Side Scripting language like PHP, Python, ASP.Net, or Perl.   Learn how networks connect computers to the internet using TCP/IP and TCP, UDP packets.  TCP = Transmission Control Packets, UDP = User Data-gram Packets.    This does look like an admiral project and I would think it could work towards a Senior Thesis project.  Also you maybe able to find class mates that will like to help and fill in place where your knowledge is lacking.
  11. you have some interesting thoughts in this thread.  One thing I would like to point out if you write your scripts correctly in Unity3D then they can also be changed without having to jump into code.  I know you want to do 2D but maybe check out some of the 3D tutorials like this space shooter tutorial:   http://unity3d.com/learn/tutorials/projects/space-shooter-tutorial   As for dragging and dropping files in Unity you could instead copy files from one folder to your unity folders.  Getting art assets into Unity is fairly easy compared to some game engines I have used.   you might also want to check out the asset store in Unity.  This is usually a good place to start when your looking to add artwork to your game.   Anyways keep us posted on your progress.
  12. Last year I had a lot of fun working on my project.  Didn't do very well but that was why I entered was to get some good learning.   So will be tring it this year but as a solo unless someone would like to help me.  Not sure if I will use Unity 3D again or my custom game engine I've been building in C++, just depends on the topic I guess.   Team: TeamYAG Members: LEde Website: http://www.etekworld.com/teamyag/
  13. So for starters this algorithm will work but it is the brute force way of finding what you want.  The first thing you should figure out is how to access this array as a 2D array.  This doesn't mean you need a 2D array just figure out how to access it as if it were one.  I will show this in code when we get to that section.   So for this problem we need to define a few things that will be required to figure out how to do grid prediction.  The first thing we will need is the current position on the game field that Pac-Man is located.  Next we need to know his velocity aka the direction we are moving him in currently.  Last we will need to know the direction we will want to move or the new velocity of Pac-Man.  Once we know these things we can then do a quick search for a sqaure ID that is in the new direction. // For now we will assume the grid is a global variable. Now we will look for the square id int GetNextSquare(Vector2D pacPos, Vector2D velocity, Vector2D newDir) { // Create a default next id int nextId = -1; // First we need to figure out Pac-Man's current position ID int pacId = pacPos.x + (pacPos.y * CellsInRow); // Define some local values to control where we are going Vector2D pos = pacPos; // Now to start searching for the turn we want while(nextId == -1) { Vector2D tilePos = pos + newDir; // Should be same as tilePos.x = pos.x + newDir.x; and tilePos.y = pos.y + newDir.y; int tileId = tilePos.x + (tilePos.y * CellsInRow); if(tiles[tileId] == TILE_RED) { // We found our next tile!!!! nextId = tileId; break; } pos += velocity;// Should be the same as pos.x += velocity.x; pos.y += velocity.y; // Calculate new tile ID int posId = pos.x + (pos.y * CellsInRow); if(tiles[posId] == TILE_BLUE) break; // We hit a wall! Ouch that hurts } return nextId; } Please don't hate me for not optimizing this function, I wrote this more for conceptual ideas to show the idea of how to find something without having to brute force your way.   Now with that out of the way in this algorithm we are just going to keep moving in the direction pacman was already going and keep looking for the tile where we can change directions.  Once we have found that the tileID will be returned.  If we hit a wall -1 will be returned which means there was no intersection that we could turn in that direction.   Once we have the tile where we are allowed to turn we can pass that back to the animation system and let it animate pacman to the intersection where we will turn.  Hope this helps.
  14.   It just keeps moving in the original direction.  If Pac-Man runs into a wall then he just stops until the player presses a new direction.
  15. In the original game there was a little more to the controller then what has been presented here.  One of my AI projects in collage was to recreate the AI of pac-man.  For those interested here is the link I found on the article I used to research the game:   http://www.gamasutra.com/view/feature/132330/the_pacman_dossier.php   Now then if my memory serves me Pac-Man had a small advantage because he could pre-turn before the turn so that he would gain 3-4 pixels on a ghost.  This was a small advantage that many players would take advantage so their could either eat a ghost or evade one.  So just doing a simple rail detection on Pac-Man isn't fair to the player.   So here is how I did it with my project.  I create a grid in the game so that Pac-Man could wonder the map and hit collisions.  Once I had the grid made it was a matter of either using an A* algorithm to create a generic path from where I was to the direction I wanted to turn.  The hard part is finding the next square in the direction you want to turn but this was done by getting the row or column of the direction I wanted to move.  Then just moving in the same velocity of Pac-Man to find the next grid path.  Once you calculate the path it should be easy for the game to handle the animation and the turn properly.  This is more of a predictive algorithm idea instead of a reactive.  If you want some code example let me know I'll try and dig up my old project.   Also as a small optimization on my A* algorithm I only supported 4 direction to be able to move on Pac-Man and 3 on the ghosts.  According to the dossier it explains that the ghosts don't reverse their direction.
  • 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!