0 Comentários
0 Compartilhamentos
14 Visualizações
Diretório
Diretório
-
Faça Login para curtir, compartilhar e comentar!
-
WWW.POLYGON.COMThe Duolingo owl will now nag you about doing your chess lessonsAnyone who’s taken language lessons on the Duolingo app is certainly familiar with the Duolingo owl, Duo. If you skip out on lessons, Duo will ping you — crying! — to come back. Over the past few years, he’s gotten more aggressive with his approach: He died, and was brought back to life by people completing their daily lessons. Talk about guilt tripping. Now, he wants to teach you to play chess. Duolingo is testing out chess lessons on the app; they’re rolling out a limited beta that began Tuesday and will go wider “soon.” A Duolingo spokesperson said it’s the first new course subject to be added since it added math and music in 2023. Chess is more popular than ever, gaining traction with a younger generation of players. (Teens got absolutely obsessed with chess in 2023.) “As chess increases in popularity, we wanted to provide a fun, accessible way for people to learn,” a Duolingo spokesperson told Polygon. “We want to teach subjects that people can learn for a long time, like languages, math and music. Chess is a game you can play your whole life and continuously improve your skills.” Like its other courses, Duolingo breaks down learning into small parts that can be completed in short bursts, daily. It’ll teach everything from what the pieces are, how they can move, and go into patterns and strategy. “Most lessons focus on solving short puzzles to sharpen your thinking, and learners can apply what they’ve learned in fast-paced ‘mini-matches’ or full games against the in-app chess coach, Oscar, one of Duolingo’s beloved characters,” per the news release. Chess will come to all iOS Duolingo users “in the coming weeks.”0 Comentários 0 Compartilhamentos 27 Visualizações
-
WWW.POLYGON.COMOblivion Remastered sure has a lot of brownThe Oblivion Remastered game is finally here and it looks, well, modern. And by modern I mean brown. The mud’s brown, the water’s brown, and the grass is brown. It’s all extremely brown and I’m not sure how to feel about that as someone who was wowed by Bethesda’s bright fantasy world 19 years ago.Comparing screenshots between old Oblivion and Oblivion Remastered make it pretty obvious: There’s a thick haze hanging over everything that darkens every scene. The entire world looks like a bonus level in PowerWash Simulator waiting to be blasted back to its original look.In terms of detail, it certainly looks improved. Torches glow in the darkness, water shimmers in the sunlight, and docks look like actual wood and not mossy stone. But the actual mossy stone is now charcoal for some reason. The original game was much brighter, lightening up the grassy hills and trees, but Unreal Engine 5 has the remaster looking burnt.Image: Bethesda Game Studios/Bethesda Softworks via Extra Ben Buja and Image: Bethesda Game Studios/Bethesda Softworks via Extra Ben BujaInterior sections in Oblivion Remastered are a bit better. The amazing intro to the game where you escape prison with Patrick Stewart is all suffocating stone corridors and the occasional beam of light bleeding through the ceiling. It’s surprisingly close to the chilly vibe of the original. In fact, it might be an example of what the improved lighting gets you when it’s not working with overcooked textures.Image: Bethesda Game Studios/Bethesda Softworks via Loopy Longplays and Image: Bethesda Game Studios/Bethesda Softworks via Ben-GunThe pale character faces from the original didn’t survive the remaster, which is mostly an improvement to me. In a perfect world, we’d get the weirdly smeared NPC mugs of the past in 4K, but I’ll take the hyper-detailed wrinkles and pores if it means better facial animations can exist. And don’t worry, when they open their mouths, they still sound just as goofy as before.I just can’t get over how muddy the outside has become in the remaster. But I’m also the person who won’t forgive Virtuos for turning the stylistic Dark Souls bonfire into a realistic fire in Dark Souls: Remastered. It’s also entirely possible that Oblivion Remastered’s visuals coalesce the deeper you get into it and explore new areas. If they don’t, I’m at least happy that the original Oblivion is still available whenever I want to go back.See More: The Elder Scrolls 4: OblivionWindowsWindows logoXboxXbox logoXboxXbox logoExplore The Game0 Comentários 0 Compartilhamentos 31 Visualizações
-
WCCFTECH.COMSouth of Midnight – Where To Find All Notes – Chapter 10There are more than 100 notes to find in South of Midnight, and it's worth your time to seek out all of them beyond just doing it to get the achievement. Arguably, the storytelling in South of Midnight is its strongest aspect, and each note adds strong context to the storytelling that would otherwise be missed. Of course, you can still have a great time with the story if you didn't find all of them, but the experience is so much more enhanced if you do. This guide will show you where to find all of the notes hidden in Chapter 10. South of Midnight - Where To Find All Notes - Chapter 10 Thankfully, it's easy to clear all the notes in Chapter 10 as there are only five to find. Hope's Crossing Homecoming - Soon after the first combat encounter of the level, you'll reach a point where you'll see a hole for Crouton to enter to your right. Go left instead, and you'll find this note and a Floof knot waiting for you. Sleep and Smoke - After Crouton grabs your first Spindle, grapple across the gap and stick to the right past some exploding mushrooms. This note will be on the wall as blue art in the broken house. A Close Call - After interacting with the first firefly tree, follow the strands left and see a set of echo stairs to enter an old house. Enter the house and you'll find this note on the wall to your right. A Grand Wedding - From the first firefly tree, go right and turn right again when you reach a bushel of exploding bramble. Directly ahead, you should see a grapple point leading to a broken-down house, where you'll find this note on the wall on the left. The Flower Child - Once you're inside Honey's home, you'll find this final note on the back wall of his cave. That's where all five notes are found in Chapter 10. What's especially helpful here is that most of these notes are on the main path anyway; you just have to pay attention to the walls around you as they're all notes in the form of the blue art that's seen throughout South of Midnight. If you've followed along with the rest of these guides, then you'll have found 74 notes out of 103. Only 29 more to go. Products mentioned Deal of the Day0 Comentários 0 Compartilhamentos 36 Visualizações
-
WCCFTECH.COMTesla Delivers Subpar Earnings For Q1 2025 Earnings; All Eyes On Elon Musk Now To Work His Magic During A Special “Company Update”This is not investment advice. The author has no position in any of the stocks mentioned. Wccftech.com has a disclosure and ethics policy. After enduring a brutal pummeling, one that has seen its stock decline by nearly 50 percent in what is inarguably one of the fastest transitions from outright euphoria to abject despondency in the stock market's long history, Tesla has just disclosed its earnings for the first quarter of 2025, managing to post broadly negative results relative to Wall Street's consensus expectations. Consensus Expectations For Tesla's Key Quarterly Metrics Before going any further, please read through Wall Street's consensus expectations (compiled by the company's IR) for Tesla's key quarterly metrics as detailed in the above snippet (source). Tesla (TSLA) Q1 2025 Earnings Revenue In Billions Of Dollars Revenue 051015202530 051015202530 Q1 2024 21 Q4 2024 25 Q1 2025 Consensus 20 Q1 2025 Actual 19 Tesla has reported $19.335 billion in revenue for the first quarter of 2025, badly missing consensus expectations of $20.01 billion. Tesla's Segmental Revenue In Millions Of Dollars Automotive RevenueEnergyOther Sources 04000800012000160002000024000 04000800012000160002000024000 Q1 2024 17.4k1.6k2.3k Q1 2025 14k2.7k2.6k The above chart gives a segmental overview of Tesla's top-line metric for the just-concluded quarter. Do note that Wall Street analysts expected Tesla to disclose $14.119 billion in automotive revenue, $3.157 billion in energy-related bookings, and $2.733 billion in revenue from other sources. The following snippet summarizes the EV giant’s production activities during the quarter: Tesla's Quarterly Operations As we reported earlier this month, Tesla delivered 336,681 units in Q1 2025 against a production level of 362,615 units. Tesla's Auto Gross Margin (Ex-Regulatory Credits) In Percentages Gross Margin 0369121518 0369121518 Q1 2024 16 Q4 2024 13 Q1 2025 Consensus 12 Q1 2025 Actual 12 Moreover, Tesla's auto gross margin (ex-Regulatory Credits) printed at 12.50 percent for the just-concluded quarter against consensus expectations of 12.30 percent. Finally, the EV giant has announced $0.27 in non-GAAP (adjusted) EPS, missing consensus expectations of $0.38. In a rare bit of good news, Tesla has recorded free cash flow of $700 million for the quarter, though this is still below Wall Street's expectation of $1.1 billion. Also, do note that the EV giant earned $595 million via regulatory credits in Q1. The following snippet summarizes the company's latest guidance: Tesla Guidance Tesla continues to contend with brand damage in the US and the EU, and heightened competition in China. Moreover, due to the recent tariff-driven upheaval, the EV giant has reportedly delayed the start of trial production for the Cybercab and the Semi. Also, Tesla has purportedly delayed the launch of a stripped-down version of the Model Y, originally expected to launch in H1 2025. *TESLA 1Q REV. $19.34B, EST. $21.37B *TESLA LEAVES OUT RETURN TO GROWTH FORECAST FROM EARNINGS REPORT Tesla earnings and forward guidance goes about as bad as possible. And this was after massive downward revisions all quarter long. — Spencer Hakimian (@SpencerHakimian) April 22, 2025 However, in its guidance, Tesla has reiterated that the cheaper Model Y will enter production in H1 2025, and the Cybercab's launch is still expected in 2026. Do note that Tesla does not actually project when it would return to growth. This is a major red flag. Tesla intends to provide a special "company update" during its earnings call. We'll continue to update this post with relevant details. Deal of the Day0 Comentários 0 Compartilhamentos 42 Visualizações
-
WWW.TECH-WD.COMمستثمر بارز: الذكاء الاصطناعي «يستبدل البشر بالكامل»الرئيسية/الأخبار/مستثمر بارز: الذكاء الاصطناعي «يستبدل البشر بالكامل» الأخبارمقالات مميزة مستثمر بارز: الذكاء الاصطناعي «يستبدل البشر بالكامل»قال المستثمر ورائد الأعمال البارز فيكتور لازارتي إن الذكاء الاصطناعي «لم يعد يُكمل عمل البشر، بل بات يستبدلهم بالكامل»، في تصريحات مثيرة للجدل تعكس اتجاهًا متزايدًا لدى بعض المستثمرين في الدفع نحو الاعتماد الكامل على تقنيات الذكاء الاصطناعي، رغم التحذيرات المتكررة من تداعيات هذه السياسات.وفي حديثه على بودكاست Twenty Minute VC، وصف لازارتي، الشريك في شركة الاستثمار الجريء Benchmark، خطاب الشركات الكبرى بشأن «تعزيز قدرات الموظفين عبر الذكاء الاصطناعي» بأنه «كلام فارغ»، مضيفًا: «ما يحدث الآن هو استبدال كامل للموظفين».الذكاء الاصطناعي في المحاماة… إخفاقات واضحةلازارتي، الذي يستثمر في شركات تعتمد على الذكاء الاصطناعي مثل Mercor (منصة توظيف) وDecart (مختبر بحثي)، ركّز بشكل خاص على المهن القانونية والموارد البشرية، محذرًا طلاب كليات الحقوق من أن وظائفهم قد لا تكون موجودة خلال ثلاث سنوات.لكن الواقع لا يعكس هذا التفاؤل المفرط، إذ تشير تقارير حديثة إلى أن محاولات استخدام الذكاء الاصطناعي في المجال القانوني واجهت إخفاقات فادحة. ففي نيويورك، انتقد قاضٍ في المحكمة العليا رائد أعمال حاول استخدام فيديو مولد بالذكاء الاصطناعي كممثل قانوني في قاعة المحكمة، في إطار تجربة لتطبيق قانوني ناشئ.كما تورط مايكل كوهين، المحامي السابق للرئيس ترامب، في فضيحة استخدام مذكرات قانونية أنشأها الذكاء الاصطناعي، تبين لاحقًا أنها استندت إلى قضايا مختلقة بالكامل.المختصون القانونيون لا يبدون حماسة كبيرة لهذا التوجه، إذ قال البروفيسور مارك بارثولوميو إن «المحاكم ستتدخل قبل أن يتمكن الذكاء الاصطناعي من تثبيت قدمه في المجال القضائي».ذو صلة | الوظائف المهددة بالاختفاء بحلول 2030 بسبب الذكاء الاصطناعيفوضى الذكاء الاصطناعي في التوظيفأما في مجال الموارد البشرية، فإن استخدام الذكاء الاصطناعي بات أكثر شيوعًا، رغم ما يحمله من تحيزات عنصرية متأصلة في البيانات التي يتم تدريبه عليها.تشير دراسات إلى أن 99% من شركات فورتشن 500 تستخدم الذكاء الاصطناعي لتصفية طلبات التوظيف، بل إن بعضها بدأ يجرب أدوات تقوم بالمقابلات الوظيفية نفسها. في المقابل، يلجأ بعض المتقدمين للوظائف إلى استخدام أدوات ذكاء اصطناعي خاصة بهم لكتابة السير الذاتية والرد على الأسئلة، مما حول العملية إلى سباق تقني يُقصي من لا يملك هذه الأدوات، لا سيما من كبار السن أو ذوي الإعاقة أو المهاجرين.في ظل هذه الفوضى المتزايدة، حذر أستاذ علوم الحاسوب بجامعة بيركلي، هاني فريد، من التسرع في تبني هذه التقنيات، قائلاً:«فقط لأن شيئًا ما يبدو حتميًا، لا يعني أنه يجب تطبيقه على الفور.»وتبقى الإشكالية الجوهرية في أن العديد من المستثمرين والداعمين للذكاء الاصطناعي يبالغون في قدراته، دون أن يقدّموا أدلة عملية على أنه بالفعل قادر على تولي المهام البشرية بدقة أو أمان. تابع عالم التقنية على0 Comentários 0 Compartilhamentos 28 Visualizações
-
WWW.TECH-WD.COMتراجع أسهم التقنية مع تحذيرات من تداعيات الرسوم الجمركية على صادرات الرقائق إلى الصينالرئيسية/الأخبار/تراجع أسهم التقنية مع تحذيرات من تداعيات الرسوم الجمركية على صادرات الرقائق إلى الصين الأخبار تراجع أسهم التقنية مع تحذيرات من تداعيات الرسوم الجمركية على صادرات الرقائق إلى الصينشهدت أسهم شركات التقنية تراجعًا حادًا يوم الأربعاء، في ظل تصاعد المخاوف من تداعيات الرسوم الجمركية التي فرضها الرئيس الأمريكي دونالد ترامب على قطاع صناعة الرقائق، والذي يُعد محوريًا في سلاسل الإمداد العالمية للتقنيات المتقدمة.وكانت شركة Nvidia في صدارة الخاسرين، حيث هبط سهمها بنسبة 7% بعد إعلانها عن تحمل خسارة بقيمة 5.5 مليار دولار في الربع الأول، نتيجة لتأثير القيود المفروضة على تصدير شرائحها الرسومية (H20) المصممة خصيصًا للسوق الصينية.AMD تتوقع خسائر وASML تحذر من الغموضمن جانبها، توقعت شركة AMD خسائر تصل إلى 800 مليون دولار بسبب القيود المفروضة على تصدير منتجاتها من شرائح MI308 إلى الصين.أما شركة ASML الهولندية، المتخصصة في معدات صناعة أشباه الموصلات، فقد خيبت التوقعات بشأن الطلبات الجديدة، وحذرت من أن القيود التجارية الحالية تُضعف الثقة وتزيد من حالة عدم اليقين في السوق العالمية، ما أدى إلى تراجع سهمها بنسبة 7%.كما انخفضت أسهم شركات تصنيع المعدات مثل Applied Materials و Lam Research بأكثر من 5% لكل منهما، في ظل موجة هبوط شملت القطاع بأكمله.هبوط واسع في مؤشر ناسداكامتدت التراجعات إلى سوق الأسهم الأوسع، حيث هبط مؤشر ناسداك المركب بأكثر من 3%، متأثرًا بخسائر لأسهم شركات التقنية الكبرى. وسجلت أسهم شركات ميتا وآبل وأمازون ومايكروسوفت انخفاضًا بنحو 3%، في حين تراجعت تسلا بنسبة 5%، وألفابت بأكثر من 2%.وكانت الآمال معلقة على أن يجلب فوز ترامب بفترة رئاسية جديدة استقرارًا للقطاع التقني، ما دفع الأسواق إلى تسجيل مكاسب قوية بعد الانتخابات، وشهدت واشنطن تدفقًا لافتًا من كبار التنفيذيين في شركات التقنية.لكن هذه الآمال بدأت تتلاشى مع التصعيد في السياسة التجارية. فمنذ يناير، تكبّدت شركات كبرى مثل إنفيديا وآبل وأمازون خسائر في القيمة السوقية بنحو 20%، بينما تراجعت تسلا بأكثر من 40%.وكانت «السبعة الكبرى» من شركات التقنية قد خسرت أكثر من 1.8 تريليون دولار من قيمتها السوقية في جلستين فقط بعد إعلان الرسوم الجديدة. ورغم تعافي السوق جزئيًا عقب إعلان ترامب عن تجميد مؤقت للرسوم لمدة 90 يومًا، إلا أن حالة التذبذب لا تزال تسيطر على الأسواق. بواسطة CNBC تابع عالم التقنية على0 Comentários 0 Compartilhamentos 35 Visualizações
-
GAMEDEV.NETclick and drag spriteAuthor All I want to do is click and drag a spriteelse if (event.type == SDL_MOUSEBUTTONDOWN||SDL_MOUSEMOTION) { if (event.button.button == SDL_BUTTON_LEFT) { int mouseX, mouseY; SDL_GetMouseState(&mouseX, &mouseY); cout << mouseX << " " << mouseY << endl; if (mouseX > 522 && mouseX < 567 && mouseY>394 && mouseY < 439) { SDL_Rect rect_two; rect_two.x = 567; rect_two.y = 394; SDL_BlitSurface(gHelloWorld_one, NULL, gScreenSurface, &rect_two); SDL_UpdateWindowSurface((gWindow)); } } pbivens67 said:All I want to do is click and drag a spriteA good exercise regarding realtime applications.It's clear that you need some persistent data that lives not just for a single frame, or within a single function call.Examples are the sprites position and the state of the mouse button. SDL already does the latter for you, but you need to cara about the sprite. The easiest way would be to use a global variable. (Global variables are bad practice in general. It works for the simple test case, but if the program gets more complex global variables usually become a nightmare.)Your code looks like you can click within some area, and if you do so it draws a rectangle over that area. But you can not yet move it, i guess.I can give some example, but i don't know SDL, so you'd need to do some things differently, at the right callbacks SDL provides.struct Sprite { SDL_Rect rect; SDL_Color color; // idk if sdl has such type for color }; Sprite globalSprite; // bad practice, but i know you love global variables and magic numbers, so... Sprite *dragSprite = NULL; // if the user is dragging some sprite, this pointer will point to it. Otherwise pointer is zero. void main() { // set some initial state at application startup... globalSprite.rect.left = 522; //globalSprite.rect.right = .... globalSprite.color = white; // setup SDL, create Window, and all that... while (true) // some loop, not using callbacks for input, which SDL probably does { if (SDL_MouseButtonPressed()) // eventually grab the sprite and make it red { if (dragSprite == NULL && MouseCoordsInsideRectangle(globalSprite)) { dragSprite = &globalSprite; dragSprite->color = RED; } } if (SDL_MouseButtonReleased()) // releasing the sprite - make it white again and set pointer to zero { if (dragSprite) dragSprite->color = WHITE; dragSprite = NULL; } if (dragSprite && SDL_MouseMoved()) // move the dragged Sprite { dragSprite->rect.left += SDL_MouseDeltaX(); dragSprite->rect.up += SDL_MouseDeltaY(); // assuming rect also has width and height which stays the same. // If it has right and bottom we need to change that too ofc. } SDL_RenderRect (globalSprite.rect, globalSprite.color); SDL_Wait(60 fps); } }You need to figure out how to do this with SDL, but the code should help to see what global state is needed, and where in the loop this state is affected by what.By using a pointer (not just a bool for example), the example can be easily extended to handle… multiple sprites! \:D/ Advertisement Author I have worked on my code but it still does not click and drag a sprite bool isDragging = false; int startX, startY; int objectX = 0, objectY = 0; bool quit = false; while (quit == false) { SDL_Event event; while (SDL_PollEvent(&event)) { if (event.type == SDL_KEYDOWN) { Uint8 const* keys = SDL_GetKeyboardState(nullptr); if (keys[SDL_SCANCODE_ESCAPE] == 1) quit = true; } else if (event.type == SDL_MOUSEBUTTONDOWN) if (event.button.button == SDL_BUTTON_LEFT) { isDragging = true; startX = event.button.x; startY = event.button.y; } else if (event.type == SDL_MOUSEBUTTONUP) if (event.button.button == SDL_BUTTON_LEFT) { isDragging = false; } else if (event.type == SDL_MOUSEMOTION) if (isDragging) { int offsetX = event.motion.x - startX; int offsetY = event.motion.y - startY; objectX += offsetX; objectY += offsetY; startX = event.motion.x; startY = event.motion.y; } } } int mouseX, mouseY; SDL_GetMouseState(&mouseX, &mouseY); cout << mouseX << " " << mouseY << endl; if (mouseX > 522 && mouseX < 567 && mouseY>394 && mouseY < 439) { SDL_Rect rect_two; rect_two.x = 567; rect_two.y = 394; SDL_BlitSurface(gHelloWorld_one, NULL, gScreenSurface, &rect_two); SDL_UpdateWindowSurface((gWindow)); } } } I have to fix tabs so formatting becomes better readable.It seems the section to render the sprite is outside the scope of the loop,so the object is not rendered until we quit. Another problem is, i expect the delta keeps growing even if movement would be zero.So it will propell the sprite offscreen within a few frames, which is a typical mistake.Might work now: bool isDragging = false; int prevX, prevY; // instead using a start, i use the previous coordinates to calculate movement relative to that each frame int objectX = 0, objectY = 0; bool quit = false; while (quit == false) { SDL_Event event; while (SDL_PollEvent(&event)) { if (event.type == SDL_KEYDOWN) { Uint8 const* keys = SDL_GetKeyboardState(nullptr); if (keys[SDL_SCANCODE_ESCAPE] == 1) quit = true; } else if (event.type == SDL_MOUSEBUTTONDOWN && event.button.button == SDL_BUTTON_LEFT) { isDragging = true; startX = event.button.x; startY = event.button.y; } else if (event.type == SDL_MOUSEBUTTONUP && event.button.button == SDL_BUTTON_LEFT) { isDragging = false; } else if (event.type == SDL_MOUSEMOTION/* && isDragging*/) // calculate mouse delta every frame, no matter if dragging or not { int deltaX = event.motion.x - prevX; int deltaY = event.motion.y - prevY; prevX = event.motion.x; prevY = event.motion.y; if (isDragging) // eventually move object { objectX += deltaX; objectY += deltaY; } //int offsetX = event.motion.x - startX; //int offsetY = event.motion.y - startY; //objectX += offsetX; //objectY += offsetY; //startX = event.motion.x; //startY = event.motion.y; } } //} // this must be after the rendering code, so it is executed in the loop, not after it //int mouseX, mouseY; //SDL_GetMouseState(&mouseX, &mouseY); //cout << mouseX << " " << mouseY << endl; //if (mouseX > 522 && mouseX < 567 && mouseY>394 && mouseY < 439) cout << objectX << " " << objectX << endl; // should change only if mouse moves //{ SDL_Rect rect_two; rect_two.x = objectX; // give the sprite the changing coordinates rect_two.y = objectY; rect_two.width = rect_two.height = 10; // you need to give it some size too SDL_BlitSurface(gHelloWorld_one, NULL, gScreenSurface, &rect_two); SDL_UpdateWindowSurface((gWindow)); //} } Author is this code correct? bool isDragging = false; int startX, startY; int objectX = 567, objectY = 394; int prevX=0, prevY=0; bool quit = false; while (quit == false) { SDL_Event event; while (SDL_PollEvent(&event)) { if (event.type == SDL_KEYDOWN) { Uint8 const* keys = SDL_GetKeyboardState(nullptr); if (keys[SDL_SCANCODE_ESCAPE] == 1) quit = true; } else if (event.type == SDL_MOUSEBUTTONDOWN) if (event.button.button == SDL_BUTTON_LEFT) { isDragging = true; prevX = event.button.x; prevY = event.button.y; } else if (event.type == SDL_MOUSEBUTTONUP) if (event.button.button == SDL_BUTTON_LEFT) { isDragging = false; } else if (event.type == SDL_MOUSEMOTION) { int deltaX = event.motion.x - prevX; int deltaY = event.motion.y - prevY; prevX = event.motion.x; prevY = event.motion.y; if (isDragging) { objectX += deltaX; objectY += deltaY; } } } SDL_Rect rect_two; rect_two.x = objectX; rect_two.y = objectY; SDL_BlitSurface(gHelloWorld_one, NULL, gScreenSurface, &rect_two); SDL_UpdateWindowSurface((gWindow)); } } } Author well I got the code to work but I want it to erase the sprite after it draws it. yes your code works and mine is incorrect Advertisement pbivens67 said:I want it to erase the sprite after it draws it.What do you mean? Maybe you want to preserve the background, which the sprite overwrites while moving? Or maybe drawing the moving sprite, but making it disappear after the mouse button is released? Author I want it to preserve the background which the sprite overwrites while moving. pbivens67 said:I want it to preserve the background which the sprite overwrites while moving. Like Quote ReplyJust draw everything each frame. E.g. first the background, then sprites, then HUD.Then it's never a problem if some background gets overdrawn with moving sprites.It's not necessarily the most efficient solution ofc. You could also have each sprite keeping a copy of the background below it. So when you move it, you first revert the background to ersae it, then you draw it at the new place. But even for simple 2D games such effort probably isn't worth it anymore with modern HW. Author here is an image of my problem0 Comentários 0 Compartilhamentos 28 Visualizações
-
HITMARKER.NETSony has raised the price of the PS5 in Europe, Australia, and New ZealandThe Digital Edition of the PS5 will now retail for €499.99 in Mainland Europe.0 Comentários 0 Compartilhamentos 43 Visualizações
-
HITMARKER.NETBungie reveals Marathon gameplay and release date, closed alpha test announcedFour of its six classes have been revealed so far.0 Comentários 0 Compartilhamentos 47 Visualizações