• Content count

  • Joined

  • Last visited

Community Reputation

115 Neutral

About pacobarter

  • Rank
  1. Isolines (contours) and image coloring

    You could use the same "marching squares" algorithm in a second pass to "fill the gaps" between the isolines.
  2. If you're new to HTML5, instead of focusing on text editors and "plain html", there's another point of view: code in <whatever> and "export" to HTML5. Two examples of this: Google PlayN ([url=""][/url]) and LibGdx ([url=""][/url]).
  3. GTK+/gtkmm and DirectX?

    I use Java and OpenGL but the main idea may help you. I tend to use three separate threads: the "main()", the GUI with the tools and an instance of the game "window" (working as the "world editor"). The "main" has a simple job: start the GUI and the "game" and link both with each other. The way to "link" them is by using java "interfaces" (implementing Listener pattern): GUI implements something like WorldBuilderEventListener and WorldEditor implements something like GUIEventListener (with methods as "setPlayerPos(x,y,z)" and the like). So, the "main()" is like: [font=courier new,courier,monospace]main(){[/font] gui = GUI(); // class GUI implements WorldBuilderListener { ... } worldBuilder = WorldBuilder(); // class WorldBuilder implements GUIListener { ... } gui.setGUIListener(worldBuilder); worldBuilder.setWorldBuilderListener(gui); gui.start(); worldBuilder.start(); // wait for threads to end gui.join(); worldBuilder.join(); [font=courier new,courier,monospace]}[/font] There's another option: using processes instead of threads (as may be the case if there's no natural integration between GTK+ and DirectX). In this case, my advice is to use sockets to communicate between GUI and WorldEditor.
  4. Beginner - How to make walkable/not walkable wall

    A solution could be making your MAP ítem (p, g, s,...) a dict in the form {Rect, boolean}, meaning the boolean that you can visit that tile or not. If you need more info for your tiles, you can use an int instead of a boolean.
  5. Collision with polygon or Polyeder

    I would build a generic triangle-triangle collision engine. You can then use that engine for just whatever "objects" you check for collision. And you can optimize the engine just ignoring the type of objects that are made of triangles.
  6. IMHO, I think you are talking about some sort of "implicit management", creating "screen with childs" to achieve layer compositing. So, why don't make layered the architecture of the game screens? You can have several layers in the game screen (i.e.: [i]background[/i], [i]main[/i], [i]ui[/i], [i]notifications[/i]), each having its own FSM (Finite State Machine) and being independent. Then, you can update them sync/async as long as you render them bottom-up. In the same way, you can also send "user events" (click, touch, drag,..) up-bottom in the layer stack. I think that it can be "implicit" or "explicit" but there's always "management".
  7. multi-platform mobile phone development

    I'm actually reading a cool book about Android/iPhone Game/Graphics programming called "Game and Graphics programming for iOS and Android with OpenGL ES 2.0", by Romain Marucchi-Foino. It comes with an open source C++ cross-plattform SDK.
  8. I think you are talking about an abstraction called "Finite State Machine" ([url=""]http://en.wikipedia....e-state_machine[/url]). If the states itself run as FSM, then you are talking about "Hierarchical FSM". I usually prefer separating the FSM logic from the game/app logic, using a pattern called "Delegate" ([url=""]http://en.wikipedia....egation_pattern[/url]): each State delegates its execution on another object. In I use (java) Interfaces for State and Transition, so being less intrusive in the Screen/Game/... object hierarchy. I mean, using Interfaces in this way, you can forget about the FSM logic and concentrate on your Game logic.
  9. As an estimation (max bound), you can compute the minimum of all nine distances between the vertices of the triangles. Then, filtered by a threshold, you can choose candidates and compute the real distance between each vertex of one triangle and the plane that represents the other triangle.