Building system like clash of clans / boom beach - unreal-engine4

Is anyone knows how to do a building system like coc / boom beach? I know how to do a fortnite building system but there's only 1x1 structures to do while i need 3x2, 5x3 and many more sizes to go. I'm going to do it using UE4 with Blueprints. I've been looking so long and couldn't find answer. Hope you'll help me!
Thanks.

As the question is rather vague and doesn't give anyone much to go on. I'll try to take a stab at it, conceptually at least.
I'd assume that you have a base building BP or struct so, in there I would create a Vector2D variable or something similar to give it a length and width per building.
Then when you are trying to spawn the building, check the tiles that are that length and width away from the center of the screen/cursor for any existing buildings. Then when you spawn the building make sure that the building takes claim over the tiles that it is using so others will not be able to overlap later on.
So your main "meat and potatoes" of this project will be creating a grid system and also creating a system that can check whether or not a tile is inhabited already and also using and releasing tiles when needed.
If you want someone to give you a more concrete answer, you will need to show what you have done and tried in your question. Especially for one as broad as this one.

Related

Place object in GPS coordinates ar foundation unity

I want to instantiate an object in some specific coordinates in ARFundation,
I have tried several ways but none convinces me or gives me the result that I want,
One is with a radius with which if you pass that radius you activate an object that is in your position and it already leaves it fixed but it does not convince me because you have to reach the exact point first to be able to visualize it and you already lose accuracy with the radius unless you put a radius of 2cm.
The other, I got from this blog https://blog.anarks2.com/Geolocated-AR-In-Unity-ARFoundation/ but depending on which cardinal point you are looking at, it is instantiated in one place or another (I think I remember that it says that is unfinished)
Does anyone have a proven way since it works and has enough accuracy?
Apple has released something called ARGeoAnchor.
I think it is not yet supported on Unity though.
If you wish, you can use it, with RealityKit been your engine.
https://developer.apple.com/documentation/arkit/argeoanchor
Also, note it is only supported in distinct locations in the US.
From what I could tell so far, it is very accurate, with the problem only been the altitude you wish to put things on.

minecraft: How to get coordinates of blocks inside selection

For a Loot Plugin i need all the coordinates of chests in my prebuilt world.
To add them to the plugins config. I am not programming the plugin, i am just using it, i just need a way to get multiple coordinates for specific blocks in a world.
OR
If it is possible to use worldedit and replace chests with chests that have nbt tags i can completely skip the plugin part and use the vanilla loot tables. But i haven't yet found a way to setblocks with nbt data using worldedit.
I was thinking about downloading the map moving it into mcedit or worldpainter and hopefully find a way there to export the coordinates of each chest.
I'm looking forward for some solutions, and i'm thanking you in advance!
If you have to prepare this world initially and only once, I would recomment to use a plugin to identify all the chests in the world (e.g. by iterating through all already generated chunks and all containing blocks), and modifing or saving them, the way you need to. Doing this on a productive server will probably cause lags, cause the iterating/searching will be very intensive.
You could also think about some kind of hacky way, to identify if the blocks are placed by the world generator/a plugin or a player. When u use the plugin LogBlock, you can check, if the clicked chest was placed by a player. If so, treat this chest as a normal chest, otherwise, if no player has ever placed a block at this location, treat the chest as a chest from the "loot plugin".
Any of the ways will work, but the first one will probably be a little harder, since you have to manually load all the chunks. The second is a little bit hacky, but will be more easy, but maybe not compatible to your setup.

Getting started with a cocos2d v2.0 image warp app / ccgrid / ccactiongrid

I have to make an app that takes an image of a face, allows the user to indicate the location of main features like eyes and mouth and then warp the image to give a particular expression (smile / frown).
My thinking is that I could use a few component ccgrids for the mouth / eyes separately and then combine these to make a live ccgrid to be applied with a ccactiongrid.
First of all is this a sensible way to approach this?
Secondly, I can't find any examples of how to work with ccgrid objects or ccactiongrids. Are there any examples out there that I'm missing or could someone give me a crash course?
Thanks,
Martin

iPhone - At user event create objects in the view

I am new to iPhone programming, so I think part of the problem is that I don't know what I really want to google to find my answer. I am looking for a method that allows a user to draw a line on the screen. There is no guarantee that it will be straight, it can be curved or whatever. I was thinking that I could create some small square image, and then as they draw, place them into a NSset. But I am not really sure how to communicate each new object up to the view. Up to this point, I've just been messing around with objects I put on the view and then assign movement to those, this is my first jump into on-the-fly object creation.
It might be that I just need to jump into a class/object type or even a tutorial, any guidance would be great.
Thanks!
Are you asking how to create a 'paint' type application? There's an apple example for that:
http://developer.apple.com/iphone/library/samplecode/GLPaint/Introduction/Intro.html
This question is relevant, but might be too complex when you're just starting out:
Improving Finger Painting Performance
If you're a bit more specific about what problem your app is to solve you might get some more specific answers.

how to make a Kaleidoscope in iPhone

i am trying to make a Kaleidoscope app in iPhone.
Some one can tell me how can make it, what kind of techs i must use, please !
thanks a lot for your helps, i am so worried now !
Thanks
To generate a random background and then do the two mirror reflections, you will need CoreGraphics/Quartz, and know about layers, and CGContexts. In order to vary the background based on the movement of the iPhone, you need to learn how to read the accelerometer.
This is if you want to make it look similar to a real Kaleidoscope. Otherwise you could take the much simpler approach of creating a graphic formulaicly based on random data that is then cropped to a pie slice and repeated twice to create a simple Kaleidoscope graphic.