# Tag Info

9

Quick note: I don't know lua, however I am fairly good at maths/physics and please bear with me if I cover ideas you are already familiar with. For any object under the force of gravity the horizontal component of the velocity, vx, will remain constant throughout the motion. In this picture the red dots are made at equal times, so the ball travels equal ...

6

You really shouldn't use pixel coordinates for game logic. Just use coordinates that are independent of screen size, and make rendering code account for different screen sizes, this way you get much more flexible and maintainable code. So for example assume you are using 1 meter as one unit. Your screen is 2 meters high and 1 meter wide(on every device). ...

5

No. The device has an entirely different hardware than your PC and testing your App solely on the Simulator isn't going to be enough. You might hit problems in the simulator that won't occur on the device and vice versa. The simulator also doesn't simulate memory constraints of a device. I know that getting a Mac and an iPhone can be rather expensive, but I'...

5

Network Architecture is difficult. The problem is your never going to get "Instantaneous" clicks on both sides. There will be some lag, and most games get around this by accepting it and building the architecture around it. For example, most first person shooters use prediction. They keep the entire game state and logic on both ends, but the server sends ...

4

These are 100% tiles/sprites or whatever. Noone draws that kind of detail with code. Also it is not isometric, this is isometric: The grid in your example seems to be a simple top-down square grid. Here is another example of a 2D top down square grid: Do you see the difference? Here is a great tutorial series to creating a game in that style: http://...

3

I haven't debugged your code for you, so here are some bits of general advice on how to make things more robust: dirx = -dirx is a problematic way to implement bouncing, because if for whatever reason the ball is already inside an obstacle, or already moving the right direction, it will then be bounced the wrong direction and oscillate back and forth, and ...

3

First off, have you already seen Lime but don't want to incorporate that framework, since its entire purpose is to incorporate Tiled maps in Corona: http://lime.outlawgametools.com/ In your searches of the Corona forums, did you find these threads? http://developer.anscamobile.com/forum/2011/01/29/object-culling-render-process-when-not-content-area http:/...

2

Let me describe a bit how I do specific-height physics jumps in my current Corona game: Both the hero as well as the platforms are physics objects I put my own non-physical functionality and data on top of every sprite in the game, where needed (as I have a sprite object which mixes physics and manual behavior) When the hero runs right, I apply constant ...

2

You write code in Lua when developing in CoronaSDK. That information is definitely on their site, although it's not as prominent as it used to be (I haven't looked at the front page in a while). For example, here's the page under the "Games" heading: http://www.anscamobile.com/corona/games/ First sentence: "Built on top of OpenGL, OpenAL, Box2D, and Lua"

2

It works with more than just circles and rectangles. To be more specific, [physics.addBody()] Allows you to turn any Corona display object into a simulated physical object with one line of code, including the assignment of physical properties. The full explanation, along with examples including a rectangle, circle, and polygon, can be found here.

2

You will probably have to adjust parts of your application for the different platforms, but you won't have to do much because very little will change. Technically you can directly deploy unchanged an app created for Android onto iOS using Corona, but you will probably want to tweak a lot of things in the app in order to optimize for the different platform. ...

2

You can add an object behind another. Just add the black object (the border) first and then your main object. If you are using physics you have to set some flags so the 2 objects don't collide. Why don't you just add a sprite for your object (png, jpg) ?

2

If you don't need organization and don't need to change the display order later on, you can just do: do2:toBack() Or: do1:toFront() Now, if you want to maintain them later on, then put both do1 and do2 into a display group: doGroup = display.newGroup() doGroup:insert(do2) doGroup:insert(do1) The fact that do1 was inserted last means it will now ...

2

If do1 and do2 are in a display group they appear in the order you insert them as: local group = display.newGroup() group:insert(do1) group:insert(do2) Groups are also numerically indexed and the objects are in display order based on the index: assert(group[1] == do1) -- do1 is on the bottom assert(group[2] == do2) -- do2 is on the top (front) If you ...

2

You can develop the game as a 3D game, but have a fixed camera angles and use "upright" sprites. A game that pulls this off is Bastion: The animations are very smooth and well-done, but they still use sprite sheets.

2

Try using newImageRect() instead of newImage() image_variable_name = display.newImageRect("testimage.jpg", display.contentWidth, display.contentHeight) --then you have to center it: image_variable_name.x = display.contentWidth / 2 image_variable_name.y = display.contentHeight / 2

2

Make the values that define your physics body variables, not hard coded values. Then you can scale them at the same time you scale the sprite for your cake. The easiest way is to move your hard coded values into an array, then loop through the array and scale the values the same as the sprite before creating the physics object. An alternative, likely ...

2

From my limited knowledge and research, you seem to be incorrect in application of the force from the explosion. My above comments discuss this further, but put simply, you should not be applying a uniform force of {300, 300} to all bodies, unless you want to hurl them at a 45-degree angle with the same amount of force. If you want a realistic explosion, you ...

2

I have worked with Corona Labs (creators of the Corona SDK) as a contractor for almost 2 years now and I can safely tell you that the majority of these issues have been resolved - Android performance has taken a lot of work to improve but it is at the stage now it's very, very solid and the threads from 18 months ago, 12 months ago and even 6 months ago can ...

2

I don't think this is possible, since apps are built only via the Corona client application - your source actually gets sent to Corona's server where it is built, then sent back to you as a packaged application. See Building your App using Corona for more info.

2

Gimp Script-Fu You can batch resize images with Gimp thanks to scripts. You should probably look at some tutorials since it doesn't look very simple. Here is an example of batch resize, and here is an example that keeps aspect ratio. The intro is in french, it basically means: Here is an example of script that resize the current image to a 600 pixels ...

2

Its anchor points is in the middle of the object. do this: bg.anchorX = 0; bg.anchorY = 0; from here

1

The easiest approach is to have separate "card instance" objects from "card template" objects. A deck then is a collection of card instances, and each instance references its template. Something like: class CardTemplate { uuid id; string name; int base_hp; }; class CardInstance { CardTemplate template; int current_hp; }; This has ...

1

Basically you will want to do something like this: deltaX = event.x - playerX deltaY = event.y - playerY normDeltaX = deltaX / math.sqrt(math.pow(deltaX,2) + math.pow(deltaY,2)) normDeltaY = deltaY / math.sqrt(math.pow(deltaX,2) + math.pow(deltaY,2)) ... bullet:setLinearVelocity( normDeltaX * speed, normDeltaY * speed )

1

Use display.newImageRect(), except unlike display.newImage(), you now have to enter the width and height of the image you are feeding in (the actual file). This will now scale automatically. Also, if you ever switch to landscape mode for your default orientation, make sure your config.lua still has the fields width and height as if you were in portrait mode....

1

Actually Corona uses feature called dynamic scaling so it let you working within same virtual size - 320х480. You can even have different assets for different scale factors.

1

No. You have two options. Firstly, you can remove the image and then request the next one. display.remove(itemImage) itemImage = nil local myOtherImage = display.newImageRect() If you call the old image again later, this is fine as the images are cached by Corona. Secondly, you can use an image sheet: display.remove(imageItem) itemImage = nil local ...

1

Well, is difficult to answer you question because is too wide. But here are the basics on each framework, as far as i know at least xD SDL - no idea, never used cocos2d-x - is basically a c port (has other options) from cocos2d-iphone. The main feature is cross platform, and they take this seriously, trying to provide support for every mobile OS out ...

Only top voted, non community-wiki answers of a minimum length are eligible