We in Telegram
Add news
March 2010 April 2010 May 2010 June 2010 July 2010
August 2010
September 2010 October 2010
November 2010
December 2010
January 2011
February 2011 March 2011 April 2011 May 2011 June 2011 July 2011 August 2011 September 2011 October 2011 November 2011 December 2011 January 2012 February 2012 March 2012 April 2012 May 2012 June 2012 July 2012 August 2012 September 2012 October 2012 November 2012 December 2012 January 2013 February 2013 March 2013 April 2013 May 2013 June 2013 July 2013 August 2013 September 2013 October 2013 November 2013 December 2013 January 2014 February 2014 March 2014 April 2014 May 2014 June 2014 July 2014 August 2014 September 2014 October 2014 November 2014 December 2014 January 2015 February 2015 March 2015 April 2015 May 2015 June 2015 July 2015 August 2015 September 2015 October 2015 November 2015 December 2015 January 2016 February 2016 March 2016 April 2016 May 2016 June 2016 July 2016 August 2016 September 2016 October 2016 November 2016 December 2016 January 2017 February 2017 March 2017 April 2017 May 2017 June 2017 July 2017 August 2017 September 2017 October 2017 November 2017 December 2017 January 2018 February 2018 March 2018 April 2018 May 2018 June 2018 July 2018 August 2018 September 2018 October 2018 November 2018 December 2018 January 2019 February 2019 March 2019 April 2019 May 2019 June 2019 July 2019 August 2019 September 2019 October 2019 November 2019 December 2019 January 2020 February 2020 March 2020 April 2020 May 2020 June 2020 July 2020 August 2020 September 2020 October 2020 November 2020 December 2020 January 2021 February 2021 March 2021 April 2021 May 2021 June 2021 July 2021 August 2021 September 2021 October 2021 November 2021 December 2021 January 2022 February 2022 March 2022 April 2022 May 2022 June 2022 July 2022 August 2022 September 2022 October 2022 November 2022 December 2022 January 2023 February 2023 March 2023 April 2023 May 2023 June 2023 July 2023 August 2023 September 2023 October 2023 November 2023 December 2023 January 2024 February 2024 March 2024 April 2024
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
27
28
29
30
News Every Day |

I used GPT4 to build two new video games after ChatGPT helped me write a children's book. It makes coding approachable — even if it seems like it's only half-listening.

Ammaar Reshi
Ammaar Reshi describes himself as a "novice coder" who used GPT-4 to build two games.

This as-told-to essay is based on a conversation with Ammaar Reshi, a design manager at Brex. It has been edited for length and clarity.

I want to start with a disclaimer: I have a degree in computer science. 

I still tell friends, though, that if you let me code it'll be a complete hazard. I went to college in the UK, where computer science is a rigorous yet very theoretical degree. You aren't taught many practical skills. 

That's why I pivoted towards design. I work now at the fintech startup Brex, where I manage a team of designers who work on user experience. Despite that, I never lost hope that one day I'd learn how to code my own games. 

I've toyed with no-code tools in the past like Webflow and Framer, that are mostly for building websites, but I felt they weren't that advanced.


Over the past couple of weeks, though, I've coded two games in JavaScript using OpenAI's newly released GPT-4. The technology is next-level. 

Building a game just takes imagination and a prompt

The first game I built was a snake game, which is a sort of classic arcade game. It took me less than 20 minutes and just five prompts to build the game. Here is a closer look at the final product.

 

Then, over a weekend, I built a more complex game that I would describe as a "3-D space runner." Here's a closer look.

 

Basically, I input a prompt like "Add a high-score label that tracks the amount you've eaten" and GPT-4 would spit out the code. I took those lines of code and pasted them into Replit — a browser-based coding environment — because I didn't have a JavaScript environment set up on my computer. 

I also have really vivid dreams and they came in handy here. I was able to use an AI-image generator called Midjourney to recreate those visuals and illustrate my games.  

All you need is your imagination and a prompt to go really far with GPT-4. 

Sometimes GPT-4 seems like it's only half-listening

The experience definitely isn't perfect. Coding with GPT-4 sort feels like talking to someone who's only half-listening to you.

What I mean by that is with the first snippets of code GPT-4 generated for the snake game, the snake would hit the bottom of the screen — like it had died. Then it would resurrect itself and the game would just keep going.

So, I had to remind GPT-4, "Hey, you forgot to kill the snake."

Of course, that wasn't too bad. Trial-and-error is par for the course in coding. But the second game was another story. 

It was significantly more complicated, so I expected that it would take me longer to complete. I didn't expect it to take me an entire weekend. 

I had so many questions for GPT-4 that I needed to break them up into four separate conversations. I noticed that after a conversation had gone on long enough, GPT-4 would hit some sort of limit, and suddenly forget what "we" had been discussing. That's what I mean by only "half-listening."

There was another point when I was building the second game, where a spaceship — representing the player — would fall and essentially get stuck. I spent over two hours explaining the problem to GPT-4 in different ways, but it just couldn't figure out how to get past the issue. I used code from another AI assistant called Claude to get the spaceship moving again. 

In the end, I showed my full-fledged software engineer friend the code that GPT-4 came up with. He conceded that it wasn't the best written code; it definitely repeats itself in places it doesn't need to. However, I think that GPT-4 will make coding more approachable for novice coders like me, and encourage more people to build out their ideas. 

Read the original article on Business Insider
Киев

Захарова: встречи по продвижению "формулы Зеленского" дают Киеву чувство вседозволенности

Laura Dern Is the Star of Roger Vivier’s New Short Movie

NYU Hospital on Long Island performs miraculous surgery

Ramon Cardenas aims to cement his contender status agains Jesus Ramirez Rubio tonight

Ryan Poles Needs A Last-Minute Review Of His Quarterback Scouting Notes To Ensure Nothing Is Missed

Ria.city






Read also

Reports Hint Unexpected Team Is Targeting Chicago Bears’ 9th Pick

Warmer temps expected to break through after soggy Friday, but rain expected to continue throughout weekend

Quarterback Jaden Rashada transferring to Georgia after just 1 season with Arizona State

News, articles, comments, with a minute-by-minute update, now on Today24.pro

News Every Day

Ramon Cardenas aims to cement his contender status agains Jesus Ramirez Rubio tonight

Today24.pro — latest news 24/7. You can add your news instantly now — here


News Every Day

Ramon Cardenas aims to cement his contender status agains Jesus Ramirez Rubio tonight



Sports today


Новости тенниса
WTA

Мирра Андреева замыкает год // 16-летняя российская теннисистка успешно стартовала на крупном турнире WTA в Мадриде



Спорт в России и мире
Москва

Кыргызстанцы завоевали медали на международном турнире по танцам в Москве



All sports news today





Sports in Russia today

Москва

Кыргызстанцы завоевали медали на международном турнире по танцам в Москве


Новости России

Game News

Для мобильного шутера Nebula Rangers проходит бета-тест на Android


Russian.city


Москва

ЦСКА и «Спартак» сыграли вничью в перенесённом матче 21-го тура РПЛ


Губернаторы России
Кубок

Псковские волейболисты стали призерами международного турнира «Кубок дружбы»


Шапки женские вязаные на Wildberries, 2024 — новый цвет от 392 руб. (модель 466)

Ведущие «Авторадио» исполнили в Кремле культовую песню о самой масштабной стройке XX века

Российские ученые первыми создали средство, способное вылечить болезнь Бехтерева

Прояснение причин СВО. План улучшения отношений. И дополнительно: "При чём здесь Ленин?"


Токсиколог Кутушов рассказал почему возникает похмелье

Певец Стас Пьеха рассказал о постановочной драке с Тимати, за которую его хотели избить

Концерт в честь Сергея Рахманинова прошел в Воскресенске

Розенбаум высказался о пластических операциях


Потапова всухую обыграла Шнайдер в 1-м круге турнира в Мадриде

Кудерметова выиграла турнир WTA в Штутгарте в парном разряде

Потапова проиграла Фернандес во втором круге турнира WTA в Мадриде

Первая ракетка России рассказала об общении с Шараповой



Российские ученые первыми создали средство, способное вылечить болезнь Бехтерева

Более 100 студентов посетило СЛД Курск в рамках акции «Неделя без турникетов»

Ведущие «Авторадио» исполнили в Кремле культовую песню о самой масштабной стройке XX века

Шапки женские вязаные на Wildberries, 2024 — новый цвет от 392 руб. (модель 466)


«Спартак» набрал больше всех очков в играх с командами из верхней половины таблицы РПЛ

Компания ICDMC стала победителем престижной премии в сфере ЗОЖ – Green Awards 2023/24

Эксперт Президентской академии в Санкт-Петербурге о господдержке многодетных семей

Владимир Путин поздравил ветеранов с 50-летием начала строительства Байкало-Амурской магистрали


В Москве к следующему учебному году заработают более 30 школ и детских садов

В Дубне устранили подтопление дворовой территории на улице Свободы

Эти ошибки дачника обойдутся в тысячи рублей: среди них и шашлыки, и шум застолья

МХТ имени Чехова представил премьеру спектакля «Стоики»



Путин в России и мире






Персональные новости Russian.city
Тимати

Певец Стас Пьеха рассказал о постановочной драке с Тимати, за которую его хотели избить



News Every Day

NYU Hospital on Long Island performs miraculous surgery




Friends of Today24

Музыкальные новости

Персональные новости