i want to show road effect in cocos2D based game (like a bike is moving on road) iphone - objective-c

i am unable to show road effect in cocos2D based game and also little bit confused about image. what type of image i have to use to show effect and how i can use this image in code to generate moving road effect.

Actually You need to move the background back in different layers or you can use parrallax node .
Here is a link for the by source code steffen ittereheim which describes in detail the process

Related

How can I modify the Lyra camera to make a Top Down game in UE5?

I'm trying to make a Battlerite like game. Lyra comes with CM_ArenaFramingCamera which produces a fixed camera that doesn't track the player. I don't really understand how this is achieved, and I'm not sure how I could modify it to follow the player. Where would something like that happen and how would it play into the Ability system?
I've also tried looking at the CM_ThirdPerson camera to modify it to function as a top down camera. I understand how to change the curves to position the camera, but there's a lot of weird behavior associated with this and I'm unclear of how to fix the rotation.
I'd appreciate anybody that has a deep dive on using the Lyra system to modify and create custom cameras!
To get the same effect as the SpringArmComponent what I basically dis was to create a new class inheriting from ULyraCameraMode and copy paste all the methods from SpringArmComponent. The tick component I replaced it with the method ULyraCameraMode::UpdateView. The most important modification you have to do is inside the method UpdateDesiredArmLocation(), here at very end of all the calculations just set.
View.Location = ResultLoc;
View.Rotation = DesiredRot;

TILED editor - object placement possible to snap to grid in Object Layer?

thanks again in advance for any time spent helping me.
Thankfully, I have been able to import TMX to libgdx game without much of a problem, however this is now the first time of using Object Layer, for which at this moment in time I only want to include Platforms as the object (ie. I have 1x Tile Layer showing my background image and 1x Object Layer above). Now I've seen that I can just draw lines and/or boxes, circles etc to create 'zones' which I can pull into my code (goodness only knows how atm but I'll figure that later/soon )
But I see in Tiled that the button - Insert Tile (T) - exists.
I'm trying to use it but when the tile im using as a platform is placed it goes exactly where the mouse is pressed and I can't move it other than delete it. I'd just like to copy-paste a whole row of them for now and Level1 can just be 50 tiles in a flat line just so I can get it all working. It seems weird to me that Tiled can't do this but Ive spent ages looking for a way and can't find it.
Am I missing something or is this just not possible? And if the latter, how does an experienced tiled user (who's making a 2d platformer) go about creating such a simple example above in the Tiled environment?
What a noob - I answered my own question. The option I needed was in the 'View' dropdown menu -> 'Snap To grid' LOL

Cocos2d - 4inch screen displace the game

i developed a game for the iphone4. Now i got problems with the iphone5 and the 4inch screen. My game is on the left side of the 4inch screen and i have a big black border on the right side. But the buttons from the game are in the middle of screen, they have same position like on the iphone4. I checked everythin but i dont know why the background-images and the sprites are on the left side and the buttons are in the middle. I want that everything is in the middle or on the left side. It would be great if anybody could help me!! Thanks!!
COCOS2d-iPhone:
If you're using the latest beta, the only change you should need to
make is export all your images at twice the size and use the "-hd"
suffix, similar to Apple's "#2x". The documentation also says you need
to set the content scale factor of the director.
You can find the documentation here.
and more detail here.
COCS2d-X:
Cocos2D-x has a very easy solution for multi-resolution problem.
In fact you just need to set your DesignResolution and then just imagine your target device will has this resolution.
If target device really has this resolution ( or some other but with same ratio) cocos2d will handle to fix screen and your game looks same in all devices.
And when ratio of target device is different, you have many option ( as cocos2d language, policy) to manage that.
For example if you use Exact fit policy, cocos2d will force your game ( and design) to fit target device screen (without that black boarder).
Exact fit
The entire application is visible in the specified area without trying
to preserve the original aspect ratio. Distortion can occur, and the
application may appear stretched or compressed.
For more detail just take a look at this link : http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Multi_resolution_support

How to create a swanky SurfaceSlider

I am new to surface programming and stumbled upon this Image which I understand is a slider control on a tag visualization (in this case a card). This slider is
curved as opposed to conventional straight track
has a bigger thumb which displays the current position (thus eliminating the need of a separate label)
has a glowing feel (I understand this is due to overlapping controls with different blur radius)
Can anyone help with how to make such control.
-V
This is a custom-built control rather than a standard SurfaceSlider. It's not build using TagVisualizer either but that's only because the app that this picture shows was built ~2 years prior to TagVisualizer existing.
Now you should certainly use TagVisualizer to streamline an implementation of this but you'll still have to create a custom slider control - SurfaceSlider will not be a good fit because it assumes that the user is moving their finger linearly.
Within your custom arching slider control, you can use SurfaceThumb (which SurfaceSlider itself uses) to get the big glowing thumb... then just needs to listen to the Delta events on the thumb and move it along the constrained path as appropriate.

Zoom-able/ resizable grid with Objective-C

Hi i'm thinking about making midi step sequencer and I need to make a note grid/matrix that resizes/ adapts when you zoom. I've been searching for different ways of doing this but cant figure out a way that works well.
I thought about drawing cell objects made with (NSRect) but I couldn't figure out how to get the right interaction when resizing.
This is my first "biggish" OBJ-c project so please don't kill me, im still battling with the frameworks and the syntax is so foreign to me.
You could use Core Animation layers to create your grid.
Take a look at Apple's Geek Game Board sample code project:
http://developer.apple.com/library/mac/#samplecode/GeekGameBoard/Introduction/Intro.html
The code shows a way to display different kinds of card/board games using CALayer.
The Checkers game looks to be the closest to the grid you want to create.