Delve into the world of graphics and game development. Discuss creating stunning visuals, optimizing game mechanics, and share resources for game developers.

Post

Replies

Boosts

Views

Activity

Rendering EntityEquipment in TabletopKit
Hi, I've been implementing a tabletop game over the last couple of weeks. One thing that I'm struggling with it getting an EntityEquipment to render. I've followed the instructions in the documentation: https://developer.apple.com/documentation/tabletopkit/entityequipment But still no luck. Any insights what I might be missing are highly appreciated. Note: I've also watched the WWDC24 talk https://developer.apple.com/videos/play/wwdc2024/10091/ several times and downloaded the example but while the pawns render in the example perfectly. In my own implementation of a pawn nothing renders.
0
0
32
17h
adobe photoshop
Translated Report (Full Report Below) Process: Adobe Photoshop 2024 [4860] Path: /Applications/Adobe Photoshop (Beta)/Adobe Photoshop (Beta).app/Contents/MacOS/Adobe Photoshop 2024 Identifier: com.adobe.Photoshop Version: 25.11.0 (25.11.0) Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2024-07-03 20:14:56.0222 +0200 OS Version: macOS 15.0 (24A5279h) Report Version: 12 Anonymous UUID: BB272497-0BFA-2A39-D111-605692AACBB4 Time Awake Since Boot: 5300 seconds System Integrity Protection: enabled Crashed Thread: 50 Dispatch queue: com.apple.coreml.MLE5ProgramLibrary.lazyInitQueue Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6 Terminating Process: Adobe Photoshop 2024 [4860] Thread 0:: Main Thread 25.11.0 20240626.m.2679 509bf35 Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x1930125ac __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x193050894 _pthread_cond_wait + 1204 2 QuartzCore 0x19bf1cc40 CA::DispatchGroup::~DispatchGroup() + 68 3 QuartzCore 0x19beefec8 CA::Layer::display_if_needed(CA::Transaction*) + 724 4 QuartzCore 0x19c07e2b4 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 528 5 QuartzCore 0x19bed2514 CA::Transaction::commit() + 648 6 AppKit 0x196d82a48 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 272 7 AppKit 0x19786cc7c ___NSRunLoopObserverCreateWithHandler_block_invoke + 64 8 CoreFoundation 0x193137a50 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 36 9 CoreFoundation 0x19313793c __CFRunLoopDoObservers + 552 10 CoreFoundation 0x193136f70 __CFRunLoopRun + 804 11 CoreFoundation 0x1931365dc CFRunLoopRunSpecific + 608 12 HIToolbox 0x19ea1e8b8 RunCurrentEventLoopInMode + 292 13 HIToolbox 0x19ea24508 ReceiveNextEventCommon + 220 14 HIToolbox 0x19ea2480c _BlockUntilNextEventMatchingListInModeWithFilter + 76 15 AppKit 0x196c5f6f0 _DPSNextEvent + 660 16 AppKit 0x197563530 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688 17 Adobe Photoshop 2024 0x104fa9d74 0x102570000 + 44277108 18 AppKit 0x196c527fc -[NSApplication run] + 480 19 Adobe Photoshop 2024 0x104fab4a4 0x102570000 + 44283044 20 Adobe Photoshop 2024 0x104fad444 0x102570000 + 44291140 21 Adobe Photoshop 2024 0x105006240 0x102570000 + 44655168 22 Adobe Photoshop 2024 0x10786d6e4 0x102570000 + 87021284 23 Adobe Photoshop 2024 0x1025751cc 0x102570000 + 20940 24 dyld 0x192ccf274 start + 2840
1
0
100
1d
Crash in glDrawElements() on Apple Silicon Vision Pro Simulator
Hi, we've been developing an iOS game using OpenGL ES, trying running compatible iOS app on Vision Pro Simulator on M1 Mac, but we met a strange EXC_BAD_ACCESS crash in glDrawElements(), while the app run normally on ios or ipad simulators with the same developing environment. The stack like following: Our Mac is a Mac Studio(2022) with Apple M1 Max and MacOS 14.1.2. Xcode: Version 15.3 (15E204a) Simulator OS: Vision OS 1.1
1
1
106
1d
Need to get the frames of an animation for streaming in 3rd party video format (macOS)
I have a macos app that creates a sports scoreboard and streams this out in a third party streaming format. I need to use a library for this, which expects a CVPixelBuffer e.g. every 0.04 secs (25 fps). The scoreboard is a view with some subviews (scores, timers, etc) in an offscreen window. When a timer triggers to create a new frame, my code does: • create a bitmap-representation for the view • make a view.cacheDisplay(...) • create a CIImage from the bitmap-representation • create a CVPixelBuffer using CVPixelBufferCreate (kCVPixelFormatType_32BGRA format) • render the CIImage into the CVPixelBuffer using ciContext.render(ciImage, to: pixelBufferOut) • and finally hand over the CVPixelBuffer to the video library. Works, the app is in production. Now I come to the point where I need someone to tell me in which direction I have to think. The next feature requested is to do some animation for the scoreboard graphics , e.g. a simple "fade in" and "fade out". Later I would like to do more complex things, but let's just look at that. When I add a CABasicAnimation(keyPath: #keyPath(CALayer.opacity)) for fade in / fade out to the scoreboard base view (all views with layer), I can see it smoothly fading after I moved my offscreen to onscreen, so the animation works on screen. But in the video stream there is no animation, no fading, the content is shown with opacity 0.0 at one frame and in the next frame 1.0 (fade in) and the other way round for fade out. I have a not-animated, always visible text field displaying a timecode in the video screen and that shows every timecode in the video, so the frames are in fact generated, but contains no scoreboard view with an opacity other than 0 or 1. How can I get the rendered frames from an animation? Is it somehow possible with Core Animation? Do I have to dig into Metal? I searched for hours to find something, but "animation" leads to discussions about animations on screen, while "video" is always about AVFoundation, but there is this library I have to use. Thanks for any hints, Nina
3
0
211
1w
Permission denied: GenerativeFunctionMetrics
A sample of some error messages that are presented in the Xcode log for executon of a program. There is nothing in the messages that will help identify a component as the origin of the message, nor is there a locatable derinition for the various labels and fields of the text. What component or even framework does this set of messages originate? Your search engine is useless because it returns gibberish. It doesn’t even follow the common behavior of SEARCH ENGINES because it takes label strings compounded from common words and searches for the common word instead of using the catenated string that is the internal variable name that is in the text. 2024-06-22 19:45:58.089943-0500 RoomPlanExampleApp[733:30145] [ClientDonation] (+[PPSClientDonation isRegisteredSubsystem:category:]) Permission denied: GenerativeFunctionMetrics / ANEInferenceOperationPrepareForEncode. I am looking for a definition of the error with a way to locate the context in which the error occurs. 2024-06-22 19:45:58.089967-0500 RoomPlanExampleApp[733:30145] [ClientDonation] (+[PPSClientDonation sendEventWithIdentifier:payload:]) Invalid inputs: payload={ aneModelPath = "/System/Library/PrivateFrameworks/RoomScanCore.framework/PrecompiledModels/lcnn_floorplan_model.bundle/H14G.bundle/main/segment_0__ane/net.hwx"; bundleIdentfier = "com.example.apple-samplecode.RoomPlanExampleApp9QSS565686"; } 2024-06-22 19:45:58.094770-0500 RoomPlanExampleApp[733:30145] [ClientDonation] (+[PPSClientDonation sendEventWithIdentifier:payload:]) Invalid inputs: payload={ bundleIdentfier = "com.example.apple-samplecode.RoomPlanExampleApp9QSS565686"; e5FunctionName = main; numSegments = 1; }
1
0
150
1w
Game Can't Open (Cookie Run Kingdom)
Recently started playing this game, when I restarted my computer once it glitched out and when I tried to open it again, it said "last time you opened this app, it was force quit. Do you want to reopen it?" then the app closes itself immediately. How can I fix this? How can I remove the caches?
1
0
194
2w
USDZ with vertex color
Hello, I have a USDC file with vertex color (WITHOUT textures), and it displays perfectly in Preview. If I package it in a zip (without compression) and rename the resulting file to USDZ, I can see it without any issues in AVP and Mac. However, if I send it to an iPhone, the vertex color does not display. Is there anything else I need to do besides packaging the USDC without compression in a ZIP? Thank you very much.
2
0
173
2w
Multiplayer testing with the new TabletopKit
Hey, Just watched and started investigating a new TabletopKit framework, which looks fantastic. I'm looking at how multiplayer can be tested. Found info about testing on multiple real devices here - https://developer.apple.com/documentation/tabletopkit/tabletopkitsample#Start-a-multiplayer-game-on-devices I wanted to ask about options for testing multiplayer on simulators, maybe with a simulator + a single real device. Unfortunately, having multiple VisionPros for indie development is unrealistic, so I hope there are ways to do it.
2
0
352
3w
OpenGL ES support on Apple Silicon Simulators
Hey folks, I have a legacy game that is running OpenGL ES - and it no longer works on the simulators that are running Apple Silicon, ie iPhone 15 Pro, or the 13" iPads. And yes, i'm also running on Apple Silicon (M1 Max). The apps work fine on the actual devices, but the simulator crashes on any glDrawElements with a stack that looks like the following: I have not yet seen an announcement about this not working but i've seen mention in other apps of stopping to support GL (https://github.com/maplibre/maplibre-native/issues/2351) Can anyone shed some light? I'm obviously going to try to fix it, or find a recent sample app from which to start to see what might be up. Or move to metal, but i hadn't bargained for that level of effort atm ;) Any suggestions appreciated!
5
0
349
3w
Placing text over images
What is the best way to display text over images - I'd like the image to fade to white underneath the text so that the text is easier to read since I have no control over the contents of the images. I thought about having a second label behind the actual label with the same text in a slightly larger font and white color. but I'd rather have it be a gradual fading of the image just under the text rather than what looks like 3D text. Any suggestions?
2
0
328
4w
Problem with setNeedsDisplay:
Hi, with the default values the rotation take place but changing the value not. I bind a button to a slider action: -(IBAction)rotateXAction:(id)sender { NSLog(@"%@ \n",sender); BOOL yn = YES; _rotationX = [_sliderX intValue]; if(yn) printf("rotationX %d \n",_rotationX); // value o.k [self setNeedsDisplay:YES]; } The drawRect: will not be called. What is wrong with my code, please tell me. Uwe
1
0
382
Jun ’24
I'm trying to create a Magic Wand Selection Tool
So I have a class that does the selection but what I get back is a total mess. Can anyone help me with the code or possibly point me at an example class that performs a magic wand selection like in photoshop? Below is my current Code but I've also attempted to use metal and I've gotten an identical result in the same amount of time var red1: CGFloat = 0 var green1: CGFloat = 0 var blue1: CGFloat = 0 var alpha1: CGFloat = 0 selectedColor.getRed(&red1, green: &green1, blue: &blue1, alpha: &alpha1) var red2: CGFloat = 0 var green2: CGFloat = 0 var blue2: CGFloat = 0 var alpha2: CGFloat = 0 pixelColor.getRed(&red2, green: &green2, blue: &blue2, alpha: &alpha2) let tolerance = CGFloat(tolerance) return abs(red1 - red2) < tolerance && abs(green1 - green2) < tolerance && abs(blue1 - blue2) < tolerance && abs(alpha1 - alpha2) < tolerance } func getPixelData(from image: UIImage) -> [UInt8]? { guard let cgImage = image.cgImage else { return nil } let width = Int(cgImage.width) let height = Int(cgImage.height) let bytesPerPixel = 4 let bytesPerRow = bytesPerPixel * width let bitsPerComponent = 8 let bitmapInfo = CGImageAlphaInfo.premultipliedLast.rawValue var pixelData = [UInt8](repeating: 0, count: width * height * bytesPerPixel) guard let context = CGContext(data: &pixelData, width: width, height: height, bitsPerComponent: bitsPerComponent, bytesPerRow: bytesPerRow, space: CGColorSpaceCreateDeviceRGB(), bitmapInfo: bitmapInfo) else { return nil } context.draw(cgImage, in: CGRect(x: 0, y: 0, width: width, height: height)) return pixelData } func performMagicWandSelection(inputImage: UIImage, selectedColor: UIColor, tolerance: Float) -> UIBezierPath? { guard let pixelData = getPixelData(from: inputImage) else { return nil } let width = Int(inputImage.size.width) let height = Int(inputImage.size.height) let bytesPerPixel = 4 let path = UIBezierPath() var isDrawing = false for y in 0..<height { for x in 0..<width { let index = (y * width + x) * bytesPerPixel let pixelColor = UIColor( red: CGFloat(pixelData[index]) / 255.0, green: CGFloat(pixelData[index + 1]) / 255.0, blue: CGFloat(pixelData[index + 2]) / 255.0, alpha: CGFloat(pixelData[index + 3]) / 255.0) if colorMatches(selectedColor: selectedColor, pixelColor: pixelColor, tolerance: tolerance) { let point = CGPoint(x: x, y: y) if !isDrawing { path.move(to: point) isDrawing = true } else { path.addLine(to: point) } } else { if isDrawing { path.close() isDrawing = false } } } } if isDrawing { path.close() } return path }
0
0
279
May ’24
Mistake in OpenGLView:drawRect
I rewrite an old project since OpenGL is deprecated and the downgrade to High Sierra goes with the lost of the old project. Here is the drawRect: - (void)drawRect:(NSRect)dirtyRect { [super drawRect:dirtyRect]; if(backgroundColor == 1) glClearColor(0.95f, 1.0, 1.0f, 1.0); else glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glTranslatef(0.0 ,0.0, -10.0); // After mistake I wrote PushMatrix() glTranslatef(-0.01 ,-0.01, -10.0); // Screen Shot 0 // glTranslatef(-0.25 ,-0.25, -10.0); Screen Shot 1 glLineWidth(1.0); glRotated(rotationX, 1, 0, 0); glRotated(rotationY, 0, 1, 0); glCallList(axes); // After mistake I wrote PopMatrix() // Axes Vertices of xx,y,z are 1.0 // With vertices +/-0.99 nothing is drawn [self glError]; [self.openGLContext flushBuffer]; } I hope you Accept my Text and hope you can help me ! Mit freundlichen Grüßen Uwe Screen Shot 0 Screen Shot 1
1
0
307
May ’24
Crash after splash screen - latest gen ipads only
Hi, I've got a well established game in gamemaker, which seems to crash on latest gen ipads. In particular have been able to reproduce in ipad 11-inch M2 in the emulator. Game launches, shows the splash screen, and seems to crash as it's leaving it, but before launching the game itself, as such the log results are rather limited. I'm attaching what I can see from the crash, and hope anyone has a suggestion in what might be different in this model of the ipad to warrant this sort of crash. Any leads would be welcome. Thank you in advance.
2
0
335
May ’24