• Content count

  • Joined

  • Last visited

Community Reputation

130 Neutral

About krokko

  • Rank
  1. I don't have a direct answer to your question, but if you don't want to spend time designing tools (since that requires its own skillset) you could try using a general purpose map editor. For example:
  2. [SDL] cpu usage

    [quote name='mhagain' timestamp='1322781686' post='4889620'] My personal preference, if you really want to limit FPS, is to do so using vsync. [/quote] Well, be careful. Every monitor does not have the same refresh rate and some users may simply force v-synch to be turned off. You need to make sure your game logic isn't frame rate dependent if you want to rely on v-synch. Case in point: Super Meat Boy. Many levels in SMB become flat out broken if the game is not run at 60 Hz.
  3. Machine Learning with Multiplayer games

    [quote name='ApochPiQ' timestamp='1300327896' post='4786857'] I'm prepared to be wrong, but I'm not yet convinced. Give me a scenario where a human decision can outplay a perfectly operated AI. [/quote] Your assumption is that the AI controls individual units perfectly (in some sense), but you must make more assumptions about the AI! Playing the game involves choosing which units / buildings to produce as well as when to produce them. Those decisions are critical, and therefore the AI's ability to do them is as well, so you need to make assumptions about the decision making ability of the AI. If it is nonexistent, that is if the AI does the exact same build order every game, then the AI will lose. The reason for that is that some units are designed to kill other units and there are a lot of situations that you simply can't micro against. There are many ways to hold units in place, and in a lot of cases the unit AI will control your units optimally (chasing and surrounding other units for example). But, you just asked for any situation and then I can just say let the AI play Zerg in SC2. In the current state of the game Zerg is considered to be a very reactive race. They have very few offensive options early on, so they must play the role of the defender, but there is no universal defence strategy and in order to survive the player needs to rely on good decision making, which is why it is considered to be the hardest race to play. Their design differs a lot from the other two races in the game in that you build both workers and attacking units from the same source (larvae). That means that if you are tricked into making attacking units and the attack doesn't come, then you will be crushed by an attack a few minutes later because you had so many less workers (trust me, the difference will be greater than any micro can overcome, especially since early game Zerg units don't benefit much from micro). If you don't make enough attacking units then you can easily get crushed by an attack, and a human player will react to what you do! If you don't have a strong defence he will be prompted to attack. The AI will need to have the ability to adapt, but then you're getting into something much less trivial than unit control, which is my point =)
  4. Machine Learning with Multiplayer games

    [quote name='ApochPiQ' timestamp='1299889230' post='4784626'] To elaborate on the above, machine learning systems are good at finding [i]local optima[/i] of a solution space, but not necessarily optima of the [i]interesting solutions[/i]. In other words, a learning system will quickly figure out how to mop the floor with you, and then just do that. Over and over. A machine will always have better reactions, better micro-management, better timing; even with the exact same resources and units in a strategy game (say, Starcraft II) the AI can always win, because it does not have human limitations and fallibilities. So the AI will learn how to kill you, and then never do anything else. If it's designed to win - if that is the fitness criteria for how it is taught - then it will win, period. It won't play an interesting, creative game; it'll find that local optimum and just hammer on it until you give up in disgust.[/quote] You mention StarCraft and in the case of that game I think you're wrong. RTSes are limited information games, just like poker; you have to make a lot of decisions very quickly based on little information. Mindgames are extremely important on a high level where the players can no longer distinguish themselves with better mechanics. If you made an AI that could execute a strategy perfectly, then at least in SC:BW that wouldn't be enough to beat a pro player, because unit control only matters when the players are otherwise equal. If you let a human do the decision making and an AI the actual playing, then that pair would win, but a human could outplay an AI simply with decision making. Here's an article on some AI research in SC:BW:
  5. I just finished one too and the way I did it was that I had a set of waves and once a given wave was killed or went offscreen the next one would spawn, so it wasn't tied to how far you'd scrolled.
  6. Creating tilemap tools

    This article explains how to do a basic tilemap editor
  7. It shouldn't use a color key unless you specify one, and you can disable the color key of a surface with SDL_SetColorKey if you send 0 as the flag.
  8. Great video, thanks for posting it
  9. SDL wont draw[solved]

    What happens at runtime? Do you get a black window? If you do I'd try using SDL_FillRect on Screen and see if you can at least render that
  10. SDL wont draw[solved]

    If the code you pasted works in a different program then the error probably isn't there, so post the rest (or more) of the code :P Do you properly call SDL_SetVideoMode on ScreenPointer?
  11. Hey there, I've become intent on making a 3D game for the first time and I'm trying to figure out the best way to go about it. I thought about using something like UDK, but I've been checking it out today and I realized that working with something like that would drive me insane. I know I will run into so many problems that would simply come down to RTFM and figuring out how they decided to do something instead of figuring out how to make something on my own. The other option I'm considering is making something from scratch with SDL + OpenGL. I've made 2D games with SDL before but just software rendered, no OpenGL implementations. Writing a 3D renderer doesn't worry me that much because I'm pretty sure I have more than enough math knowledge to handle it (studied some projective geometry which might be put to use!). What worries me more is stuff like file-types / data structures for levels, models, making an animation system etc. A basic tile map is the most advanced data structure I've ever written to a file so I have very little experience in that area. I'm a horrible graphics artist so at some point I'm going to have to solicit the help of someone who's better at that stuff and that means being able to handle data formats their tools of choice spit out etc. I know you can handle a lot of that stuff with libraries, but still, there's a lot I would have to learn and I don't want to get in too far over my head. I know there's XNA but I don't know much about it other than that it uses C# which I haven't tried. Would it be a better option? Thanks for any advice :) /teo
  12. problem with memory addresses

    Thanks I can't believe I overlooked that. I did actually mean for it to be a four element array :D and I've been beating my head over this for 2 days :D bless you!
  13. Hi everyone, I'm having quite a bit of trouble with arrays and variables declared after them. class Block { private: SDL_Rect squares[3]; blockType kind; ... The problem is that the 'kind' variable gets the same memory address as the last element in the array I declared ( actually, the same address as the first member variable in the last element ), which really messes everything up. It's been spooking me for a really long time and I've redone loads of stuff because I couldn't figure out why my variable was changing without being explicitly changed. There must be some kind of way to avoid this, please help! I'd be grateful for any :) Thanks teo