Open AI Made This Game #openai #chatgpt #codex

*>*> Newly Released Set-It & Forget-It Passive Income Strategy...!t It Up For You..!

  • !*! We Completely Set It Up For You..! Get Your Own Classified Ad Website - You Keep All The Money! Yes, Have Created For You A 6 (Six) Figure Business Running Free Advertising Websites..!!>>CLICK HERE TO GET STARTED <<

Foreign [Music] Shooter game using openai codex Playground I can move spaceship left and right fire Bullets and kill enemies And there is a sound effect when we fire Bullets and enemies get destroyed just Go to this link open AI codex JavaScript Sandbox These are the images I will use in this Game display this image as background And paste the image link Now the open AI is generating JavaScript Code for our prompt Image is displayed as background Display the spaceship image and paste The image link This is a spaceship image Let’s make it smaller make this Spaceship image 10 percent of size It’s still big let’s make it five Percent Now place the spaceship at the bottom And our spaceship is at the bottom of The screen now we have to add Functionalities to move the spaceship Make the spaceship image move left or Right with mouse movement Keep y constant and x equals Mouse X And now the spaceship is moving left and Right with the cursor next we need our Spaceship to fire bullets When you press the spacebar key display

This bullet image at the spaceship Location and then move it upside Make it look like a spaceship is firing Bullets Let’s try firing Bullets by pressing the Spacebar And it’s working Now we can move our spaceship left and Right and also fire bullets Next we need enemies This is the enemy image and paste the Image link Create a new enemy every 4 seconds at Location x equals random and Y equals Zero Look at this It’s displaying a new enemy and making It move down I didn’t ask for the enemy image to move Down but open AI figure it out on its Own Every four seconds a new enemy is Created and starts moving down But speed is very fast So just click on the code section and Change the speed Now the enemy is moving at a slower Speed Finally we need Collision detection so We can destroy the enemies Add Collision detection if bullet image And enemy image overlaps remove that Enemy image and increase score by one Our code generated

Let’s try it and it’s working I can move the spaceship with the cursor When I press the space bar the spaceship Fires a bullet when a bullet touches the Enemy the enemy gets destroyed and the Score increases by one this is awesome Let’s get more enemies In this code change it to two Now every two seconds a new enemy will Be created let’s play it Our game is working fine Now I want to add some sound effects in The game First of all copy this code Open Visual Studio code create a HTML File and add script tag Paste the JavaScript code inside the Script tag now I have bullet.mp3 and Destroyed.mp3 files I will use these as sound effects Inside our code Add these lines of code So that every time when we destroy an Enemy it will play this sound And same with the firing add these lines Of code now every time we fire a bullet It will play this sound Let’s open this with a live server and This is our game [Music] Now we are getting sound effects too Spaceship can move left and right and we Can fire bullets with sound effects And we can destroy enemies and our score

Gets updated you can add code for game Over or losing For example when the enemy reaches the Bottom it’s game over I don’t like losing so I skip that part This is a simple space shooter game and I built this game using open AI you Should try playing with open ai’s codex Playground Thank you for watching and see you in The next video

BTW - Limited Availability - You Can Get A FREE Traffic Package To Send To Any Of Your Sites TODAY. No Cost:

Just Set Up Your Campaign - AGAIN, NO COST

Enter Your First Name

Enter Your Email Address *

You May Also Like

Make $100+ Daily FREE Training >> GET ITClose


=>=> SETTING UP YOUR TRAINING...

REPLAY: HOW TO DO ALL YOUR MARKETING IN 80% LESS TIME (PLUS 200 FREE CLICKS)

>> WATCH TRAINING NOW <<

×