Deban

Members

39

2. Looking for research materials for multiple shape id interactivity

Octree and quadtree are the same thing, the former is a 3D implementation of the last one. Let's see... For what I understood, you use the shapes to check if they collide. Collisions are divided in 2 phases. The broad phase and the narrow phase. The broad phase is checking what can possible collide, the idea is to avoid using a free 4 all check (everything with everything). The common way to do this is by spatial partition, dividing the space in sectors. In 2D the common approaches are: a common grid (also called hash table), a quadtree, binary space partition and sweep and prune. Spatial partition means getting everything that is in a zone, or even near a zone. You can use this algorithms even if you are not checking for collisions. Which algorithm to use, is heavily based in your game, how many objects you have, how much they move around, it's an open zone or a closed one, etc... Here is an excellent article on hash table to get you started. The narrow phase is checking if the objects that can collide actually do it. It's the common collision algorithm. Some people divide this in two steps, first a fast but inaccurate test to narrow the possibilities, even more, and then a expensive but exact algorithm. The algorithms are (in order of complexity, accuracy and inverse speed): Circles. The most basic, the distance between the centre points of the circle should be less than the sum of the radius for the circles to collide.Axis Aligned Box (AAB). Which is a rectangle that can't rotate.Oriented Bounding Box (OBB). A rotated rectangle.Separating Axis Test (SAT). This is where you start to get a lot of control. You can use any polygon to test against any other polygon. The more faces, the slowest it becomes.Minkowski Difference. This is a different way to solve the same as SAT. You can use multiple polygons checks. Choose this or SAT based on which one you understand most.This page contains all the algorithms except SAT. For SAT you can look here.

4. Scoring engine

How about plus and minus? var availablePeople = 0;When a room is created: availablePeople += 2;You can give each room a requirement of necessary free/available people to be created. Bedrooms have 0 as requirement for example. And then a room can generate/consume people. function OnCreation() { availablePeople += this.peopleGenerated;}function OnDestruction() { availablePeople -= this.peopleGenerated;}It's consumed if peopleGenerated is negative. If you have different pools of people to consume, create different variables. Treat it like resources, mana or gold.
5. Looking for research materials for multiple shape id interactivity

I'm sorry, I don't really understand (specially the pseudo code). Where you have the grid? What does it represent? How do you code that grid? I will try to help, but probably it won't be really useful (with the 3d mesh you completely lost me). This are examples to give you ideas, change it as you see fit. The grid code: var grid = [];var rowsAmount = 10;var colsAmount = 10;for (var x = 0; x < rowsAmount; x++) { grid[x] = []; for (var y = 0; y < colsAmount; y++) { grid[x][y] = new Shape(/*Chose type here*/, x, y); }} The shape constructor: function Shape (type, x, y) { this.type = type; this.id = ++Shape.lastID || 0; this.position = {x: x, y: y};}And lastly getting the shape and it's surrounding shapes: var selectedShape = grid[selectedRow][selectedColum];var id = selectedShape.id;//The surrounding shapesvar surroundingShapes = [];//How many shapes I will select on each size, it's like a radius but the figure of the selection is a square.var sizeOfSelection = 4;//Current positionvar posX = selectedShape.position.x;var posY = selectedShape.position.y;for (var xOffset = -sizeOfSelection; xOffset <= sizeOfSelection; xOffset++) { for (var yOffset = -sizeOfSelection; yOffset <= sizeOfSelection; yOffset++) { surroundingShapes.push(grid[posX+xOffset][posY+yOffset]); }}Without knowing how you implement things, I can't help you much more.
6. Game idea, need help from the PRO´s.. (Thats you guys!)

That are not programming questions, they are game design. It's great that you answer them before asking the programmer to code them, but you programming knowledge has nothing to do with it. As a side note, if you are making your game in HTML5, it's cross-platform already. And even works in mobile, not great because of the different screen sizes, but works. Maybe knowing about how programmers usually behave will help you deciding. This is how it usually works, the stereotype, but there are lot's of types of programmers. Programmers won't create levels for you. They won't create a GUI either, they will place your images in the place you ask them, but not design it. A programmer will only create the behaviour of things, commonly even only the general behaviour and you have to do specifics (this varies a lot in the size of the project and team). Changing things is hard, sometimes really hard. Mock ups, or rapid prototypes created to test an idea can't be cleaned and call it done. It needs to be fully re-write to works. The bigger you game, the more important this becomes. That's comes to the top of my head. Good luck

10. Help with turn-based game

The most probable thing is that you turn base game won't be pure turn based. I meant that there should be sounds and music running and even animations playing. That means that your game have 2 parts, the one that updates it current state regardless of whose turn it is and the one that what for the player. The first part is like a normal game, with a game loop. That part you should know how to make. What it's generally done for the turn based is events. You wait for a specific event (like a click in done) and then inside that function is where most of the code regarding of the turns resides. Think in a Tic-Tac-Toe. Your normal game loop run animations, sounds, maybe a score or time. And when a user clicks, you do things that you would do normally in a game: check if the place is empty, then create a thing in there and lastly check if someone win. It's exactly like a normal game, you check collisions and allow to move in a place or not, you spam things in the map and check if the player dies or finish the map. The only difference is that a lot of things, instead of doing it inside a game loop, you do them in the event that represent the interaction of the user (clicking in a unit, click in a position to move the unit to, ending the turn, etc...). It's not that different from the player controls or a menu. Good Luck with your game!

12. Game Loop: Fixed timestep, Variable rendering

Remember that setTimeout has a minimum time of 4ms in HTML5 and in some browsers before 2010 it's 10 ms (source). And good luck.
13. Canvas Collision Map Problem

You are using x-y in your for, and i-j to access the array.

Your steps are weird. Basically that is not a game. It's interactive, right, but won't give you any skills you will use to make more common games. And going from simple painting to colouring book is adding an image that you paint over that is almost no change at all. Normally people go with things like this: http://www.emanueleferonato.com/2010/05/07/6-games-you-must-be-able-to-make-in-less-than-a-day/ Or something close, like recreating the history of gaming (easier to complex). Pong, Pacman, space invaders, etc... But, it seriously depend in what types of games you are planing to make.
15. Help with tile-based collision detection

First try to say which line is the problem, and please remove the things that doesn't do anything (like gravity). Going through all your code to find what you want to do is not fun. In your library: this.collidesWith = function(sprite){ //check for collision with another sprite....}And then in your code: if (character.collidesWith(tileset) && (tileset.state == 0)){ character.hide();}tileset is an array, and you should send an image. I thing that what you want to do is something like: character.collidesWith(tileset[Math.floor(character.x / tilesize)][Math.floor(character.y / tilesize)]

17. help me with circle collision

That code has a little problem that may or may not influence in your game (beside that if your are using "use strict" it will fail). It's that the order in which balls are checked for collision matters. For example if you have a line of balls: 0 1 2 3 45 6 7 8 O-> OOOOOOOO If you check them in the same order that they are hitted, they will all move in one frame. (1 is hit so move to 2, 2 is hit so move to 3.......). But if it's checked in in the opposite each on will start to move one frame at a time. (8 was not hit, 7 was not hit....... 1 is hit so move to 2 ~ next frame: 8 was not hit.... 2 was hit so move to 3... ~ 7 frames later: 8 was hit so move) It also means that you can't collide with more that 1 ball per frame (because it will move you out of position). This could really make no difference at all in your game or it could make it feel a bit random, not always reacting at the same speed. Good luck with your game.

19. code structure frameworks

Don't paste all your code like that, it's really painful to read. Use something like jsfiddle.net, codepen.io or jsbin.com Or at least, use the code tags. function squareBump(x1, y1, w1, h1, x2, y2)// RECTANGLE COLLISION{ //x1, y1 = x and y coordinates of object 1 //w1, h1 = width and height of object 1 //x2, y2 = x and y coordinates of object 2 (usually mid point. Use regX and regY) if ((x1 <= x2 && x1+w1 >= x2) && (y1 <= y2 && y1+h1 >= y2)) {return true;}}//(a very nice little collision function by the way, use in any framework)My eyes would really appreciate it.
20. how to start making html5 games

If you can't decide where to start, the worst that you can do is procrastinate. You can pick up something and make your game with it, if you don't like it when you finish your game you can change your tool, but you will have a finished game. That doesn't work for me, but works for a lot of people. Other thing you can do, is make small experimental games in different platforms, like a breakout clone. And that way you will know a lot faster what you like, but you won't have any finished game. I recommend trying this: Construct 2. Will give you a pretty good senses of how to think in order to make a game. Unity 3D. A lot of people seems to really love it and say it's really easy and fast. I can't understand why, but different people, different ways. Phaser. Contains all the tools to make your games but no longer holds your hand. Pixi. Total freedom, total responsibility. The common wisdom say start small, here you have an example of a really really simple mmo and as you can see its a LOT of work. Making games is pretty easy, making good games is hard work. Games are a lot more than the sum of its parts. In a game everything come together to form a specific aesthetic and a experience for a living human being behind the screen. And even then, probably different persons will have different experiences.

22. Game editor on Phaser

I don't think that trying to make money with a premium version will be a good idea. Commonly the force around the opensource is greater than the force of the private parts. So basically you will spend a month (for example) to create a premium feature, only to have it available in the free version in one week. You can't really compete, not in power, nor features, nor ideas. The amount of people just make it impossible. The way I have seen this implemented is by giving services, like cloud hosting, remote compiling (so you can make an ios app from windows for example), and the likes. But it's more common to not make any money out of an opensource product, the benefit is usually improving the tool that you use to create your own games.
23. WebGL Support Confirmed in iOS 8 Safari and WebView

3) Now that you mention it... the app store is a centralized place where to find everything. On the other side, for the new web "apps", there isn't really a place to search for them, you need to search the internet for it. Maybe in the future there will be a centralized webpage (like some sort of html5 store), but for now it's really cumbersome for the end user to find them. Probably some game portals will improve their visits, but that will be all. 4) This is a matter of time, it will be hacked, sooner than later. Probably not with apple api, probably using something like google wallet. But people are pretty amazing, and I wont be surprise to see an html5 implementation of apples api. joannesalfa: You can sell to sponsors, and don't give a s**t about iaps. With this I mean, there are ways, and as time goes by, there will be more and better ways. 5) I personally don't think this is a real issue. WebGL pretty much gives all the (rendering) performance than a 2D game could need. In my opinion, Metal will have amazing results but for 3D. And taking into account that most popular mobile games are 2D, I don't think it will have that much impact. If we are talking about processing performance, 100% agree. When your screen is full of sprites and particles, there isn't much more that you can render, 2D isn't photo realistic so there is an effective limit on how much rendering performance is useful. But you can never have too much processing performance, there is always things to wast the cpu with.
24. WebGL Support Confirmed in iOS 8 Safari and WebView

Strange. I always thought that apple will never want to give away it's control over apps. If they give green light to html5, a lot of apps will be outside of the app store, running in the browser. Maybe you won't have access to lots of things of the phone, but your don't need them. You can make saves and manage profiles on the cloud, and use mails as notifications. I don't really understand it. Can somebody explain why they do it?
25. Game editor on Phaser

Perfect sense. I started drooling while I was reading. MightyEditor doesn't have any of those features, but hey... you need to start somewhere. Shmikucism, how about making it open source so we can all contribute to it and make it really mighty?