Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Everything posted by Greenhouse

  1. Sounds like you want a flood fill algorithm that works across diagonals.   Yes, I need it to work in 8 directions.
  2. Hey everybody, I need an advice for an algorithm.   I'll try to describe what the situation is...   I have a structure that looks like this: https://dl.dropboxusercontent.com/u/8655042/struct.bmp A grid of cells having their coordinates and a value 'X' or 'O'.   I'm looking for an algorithm that could build me a path, array of cells that are having value of 'O' and one cell apart from each other (neighbor cells). buildPath: (x, y) -> array of cells So if I'll call it like buildPath( 2, 0 ) it will produce output something like so: [ (2,0); (3,1); (3,2); (3,3); (2,3); (1,3); (0,2); (0,1); (1,1) ]   It's not exactly what I'm looking for, but it will help me to start with.   Thanks. 
  3. Greenhouse

    The Programming Primer

    nicely written
  4. It's not clear to me, where this is performed: Is the function pointer casting ((AnimationEventCallback)callback.f) happens in low-level system? This will produce a coupled systems, no?
  5. Seems like this can solve a problem   Layer1(bottom): Will hold a tiles board, that is basically will serve as a background, like so:  https://dl.dropboxusercontent.com/u/8655042/grid.bmp but I still need to indicate which tile the player's finger on, like so: https://dl.dropboxusercontent.com/u/8655042/grid_touch_down_at_cell_1-1.bmp so, to solve this I need a tiles board where each tile will have a touch event handler? Layer2(top): Will be used for drawings on top of a tile board (layer1), like so: https://dl.dropboxusercontent.com/u/8655042/grid_base.bmp   Am I correct? 
  6. Hi to everybody! This is my first topic.   I'm currently at the very beginning of game development. With almost 0% experience. Have some basic in C/C++ and also a little bit in WPF C#. Mainly working with mainframe computers, that is pretty old technologies there... COBOL... )   Now, what I want to start is a board game (for mobile devices). I have an idea for what the game should be and how it should be played. Basically, the board will be a grid with cells that should respond to player input. grid example: https://dl.dropboxusercontent.com/u/8655042/grid.bmp when the player hold finger on cell (hover mouse), cell's background need to be changed to indicate this cell: (touchDown at cell 1,1) https://dl.dropboxusercontent.com/u/8655042/grid_touch_down_at_cell_1-1.bmp when the player will mark for example 4 cells, the polygon will be created by connecting cell's dots and the resulting area will be filled by some color: https://dl.dropboxusercontent.com/u/8655042/grid_base.bmp   Can you please advise me a way to implement this functionality and the framework that will fit it most (targeting to mobile).   p.s. don't have an option to insert images directly into the topic, so i post them as a links.
  7. Bogdanas, I also think that js is optimal for that kind of games (and not only), but it's not my cup of tea :(   What about cocos2d-x? I think it should be ok too? :)
  8. Or maybe instead of drawing the board line by line I should use tiles composition instead? And each tile will have a touch event handler? But then how can I paint on them?   ? 
  • 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!