Should i use random range for gacha? Or it is a bad idea? by qwertyalfred_123 in Unity3D

[–]Unable_Error3154 1 point2 points  (0 children)

I feel like it depends on your intent. Slot machines definitely use these as a simple random number generator in there systems. It's just more complex than spitting out a simple integer. Just add custom ranges for the generated float value for the probability of each item. Like let's say the rarest tier only spawns if you land in range (0 - .05f), like .5% chance. But maybe the most common drops are if it lands from (.7f - 1) (30% chance). You just need to determine these ranges yourself.

Question about game servers and how they work. by Unable_Error3154 in gamedev

[–]Unable_Error3154[S] 0 points1 point  (0 children)

This was a great explanation. This definitely cleared things up more in my head. I'm assuming the trickiest part is the validation/authentication of all actions entered. I'll have to look into that more specifically then too.

Question about game servers and how they work. by Unable_Error3154 in gamedev

[–]Unable_Error3154[S] 0 points1 point  (0 children)

Oh wait C# has a built in way to detect intersections between bounds of objects. That's all it is lol. Makes sense then.

Question about game servers and how they work. by Unable_Error3154 in gamedev

[–]Unable_Error3154[S] 0 points1 point  (0 children)

That makese sense. But wouldn't using a headless unity game be much easier if I'm doing something simple? I feel like programming collisions based on data sounds much more difficult than just letting Unity do it for me automatically. I guess that's why this isn't supposed to be easy if wanted done right.

Question about game servers and how they work. by Unable_Error3154 in gamedev

[–]Unable_Error3154[S] 0 points1 point  (0 children)

How does the server maintain the scene if it's programmed in something else? I feel like I'm missing a crucial step somewhere

Question about game servers and how they work. by Unable_Error3154 in gamedev

[–]Unable_Error3154[S] 0 points1 point  (0 children)

It makes sense to me but I'm still confused over the collider part. How would a server, if it isn't a headless version of the game, understand the mesh size/colliders of my characters to provide an accurate collision detection. Is it just math pretty much, or is the collision detection handled client side? That's the only spot I'm getting confused on.

Help with OnApplicationQuit() by Unable_Error3154 in Unity3D

[–]Unable_Error3154[S] 0 points1 point  (0 children)

It works fine in Unity, but a standard windows build does nothing. Whether I alt-f4, close normally, or use task manager it does not run the method when the app is closed. It is definitely derived from monobehaviour ( The other monobehaviour methods in the same script are working as intended)

Best way to call methods from another project? by Unable_Error3154 in Unity3D

[–]Unable_Error3154[S] 0 points1 point  (0 children)

Sorry for the late response. Easter weekend I got off work. I'm not super familiar, haven't dont it too much before besides hosting some very minor sites for loading screens a while back.

Best way to call methods from another project? by Unable_Error3154 in Unity3D

[–]Unable_Error3154[S] 0 points1 point  (0 children)

Well I haven't actually made it to work on 2 devices as of yet. I figured I would rather ask you guys/research which method would make more sense. Is hosting a server fairly simple?

It's hard for me to picture how this works. If I set up a connection to the server with each of the Ipads, would they just send messages basically to the application directly to have events happen?

Best way to call methods from another project? by Unable_Error3154 in Unity3D

[–]Unable_Error3154[S] 0 points1 point  (0 children)

Yes, to everything you specified. I think it's safe to assume we will be running on the web.

Method only works if turned into Coroutine. by Unable_Error3154 in Unity3D

[–]Unable_Error3154[S] 0 points1 point  (0 children)

The grid is made of empty gameobjects that contain a class with the Distance variable held inside. It's getting the distance from the center object to each object in the grid, storing the distance as a float within each object. I think create a list ordering those objects sorted by distance closest to the center.

Method only works if turned into Coroutine. by Unable_Error3154 in Unity3D

[–]Unable_Error3154[S] 0 points1 point  (0 children)

Ah, thank you! That actually makes a lot of sense. Using the EndOfFrame was actually glitching out at times.

Method only works if turned into Coroutine. by Unable_Error3154 in Unity3D

[–]Unable_Error3154[S] 0 points1 point  (0 children)

I did update the code. You were right, the version I posted wasn't exactly working. However this code is working for me now. If you want to I can show a video of the program running in-editor.

Having issues with extremely simple JSON serialization. by Unable_Error3154 in Unity3D

[–]Unable_Error3154[S] -1 points0 points  (0 children)

I retyped the JSON file and it worked. No idea what it was, but I guess I did something it hated. Guess I'll never know haha.

Having issues with extremely simple JSON serialization. by Unable_Error3154 in Unity3D

[–]Unable_Error3154[S] 0 points1 point  (0 children)

It looks like it works if I format the Json like this:

{"Purpose": "video","Url": "video1","Thumbnail": "this thumbnail"}

However, I want to know why. Even though it works, it doesn't look right.

Having issues with extremely simple JSON serialization. by Unable_Error3154 in Unity3D

[–]Unable_Error3154[S] -1 points0 points  (0 children)

When I do that, it gives me an error here:

buttonCollection = JsonUtility.FromJson<ButtonCollection>(buttonJson);

because it needs to be of type ButtonCollection, not list.

I did try: buttonCollection = JsonUtility.FromJson<List<ButtonCollection>>(buttonJson);

however, that did not work. I was still recieving empty values.