# CodeHS Game Design Insider: AI in Games, Unity Tip, Connect Four Project & More!
Published: 2024-03-20
Category: Newsletter
Category URL: https://codehs.com/blog/category/newsletter
Tags: Course Insider
Tag URLs: Course Insider (https://codehs.com/blog/tag/course-insider)
URL: https://codehs.com/blog/codehs-game-design-insider-ai-in-games-unity-tip-connect-four-project-and-more-cm39bqu7y0000qt7ippidfx8s

![undefined](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/gamedesignnewsletterpercent281percent29-1731105934017-compressed.png)

​

## ✨ **AI in Games**

Imagine video game characters who don't just follow pre-programmed routines, but react and adapt to your choices. This is the power of artificial intelligence (AI) in gaming. AI breathes life into non-playable characters (NPCs) by giving them the ability to make decisions, strategize, and even learn from their encounters with the player. It's like giving NPCs a virtual mind, making the game world feel more immersive and the challenges more dynamic.

[![undefined](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/newsletterbannerspercent2810percent29-1731105954803-compressed.png)](https://youtu.be/ataGotQ7ir8?si=2qmnn3l9z5pzHgFZ)

While they don’t use generative or modern AI, the four ghosts in Namco’s _Pacman_ are each programmed to simulate intelligent behaviors. The game’s designer, Toru Iwatani, wanted each ghost to behave differently. To do this, each ghost calculates a different target, relative to Pacman’s position and other rules ghosts must follow. This programmed artificial intelligence relies on the state of the ghosts and the player’s choices throughout the game.

As generative AI systems improve, it’s likely that non-player characters will simulate more realistic behaviors, like adjusting movements and behaviors by learning and predicting player behaviors.

For a closer look at the ghost AI system in _Pacman_, check out this [awesome video by Retro Game Mechanics Explained](https://youtu.be/ataGotQ7ir8?si=2qmnn3l9z5pzHgFZ).

[![undefined](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/xs-tr-nu4m2e2m5me4isfnet6lg1upvcni4icil-7epentpoo1a0sshp1skkjfcenar9grxi1n5om2h9bla7evsjxzv1qawjrcsfgheoud8b7tjlnjzdzjquzieut2ffvzvgc2-1731105955932-compressed.xs-Tr-NU4m2e2M5mE4ISfnet6lG1upvcNi4_iciL-7epent_Poo1A0sShp1SkkJfceNAR9GRXI1N5Om2h9BlA7EVsjXzV1qAwJRcSFGheOUD8b7tjlnjzDZjqUzIeUt2ffvzvgC2)](https://codehs.intercom-attachments-7.com/i/o/470304104/3c061999f2a232f328248879/xs-Tr-NU4m2e2M5mE4ISfnet6lG1upvcNi4_iciL-7epent_Poo1A0sShp1SkkJfceNAR9GRXI1N5Om2h9BlA7EVsjXzV1qAwJRcSFGheOUD8b7tjlnjzDZjqUzIeUt2ffvzvgC2?expires=1731107700&signature=56a1193be464dde7a10e405cc7bae47d0d7c597febe82f6c22f333d082f03320&req=cCcnFcl6nIFbFb4f3HP0gCh%2FSgCR%2FEKDqqkvq%2BdqbGzRF1sutj%2FEEumEjU4L%0AUwc%3D%0A)

## **🔴 Connect Four JS Project**

[![undefined](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/connectfour-1731105957022-compressed.png)](https://codehs.com/curriculum/projects/18048)

In this project, students build a digital version of the classic game _Connect Four_. In this game, two players take turns dropping colored discs into a rack. The first one to connect four of their discs in a row wins!

Students should have moderate proficiency with coding in JavaScript to complete this project. Students enrolled in our Introduction to Computer Science in JavaScript or Video Game Design in JavaScript courses may enjoy completing this project in the second-half of the curriculum.

[Assign Connect Four](https://codehs.com/curriculum/projects/18048)

![undefined](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/xs-tr-nu4m2e2m5me4isfnet6lg1upvcni4icil-7epentpoo1a0sshp1skkjfcenar9grxi1n5om2h9bla7evsjxzv1qawjrcsfgheoud8b7tjlnjzdzjquzieut2ffvzvgc2-1731106098875-compressed.xs-Tr-NU4m2e2M5mE4ISfnet6lG1upvcNi4_iciL-7epent_Poo1A0sShp1SkkJfceNAR9GRXI1N5Om2h9BlA7EVsjXzV1qAwJRcSFGheOUD8b7tjlnjzDZjqUzIeUt2ffvzvgC2)

## **🎮 Unity Tip**

Want to snap 3D objects in a Unity scene to a grid? As you move, rotate, or scale a GameObject, hold down your CTRL (PC) or CMD (Mac) key. This will snap your model to a predetermined grid interval.

To change the snap interval distance, adjust the x-, y-, and z-axis units under Edit > Snap Settings in Unity’s main toolbar.

Watch [Unity’s video tutorial](https://youtu.be/t_xxsCcM60k) for snapping GameObjects.

[Check Out Our Tutorial](https://codehs.com/tutorial/mattarnold/unity-coding-part-1)

![undefined](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/xs-tr-nu4m2e2m5me4isfnet6lg1upvcni4icil-7epentpoo1a0sshp1skkjfcenar9grxi1n5om2h9bla7evsjxzv1qawjrcsfgheoud8b7tjlnjzdzjquzieut2ffvzvgc2-1731106189258-compressed.xs-Tr-NU4m2e2M5mE4ISfnet6lG1upvcNi4_iciL-7epent_Poo1A0sShp1SkkJfceNAR9GRXI1N5Om2h9BlA7EVsjXzV1qAwJRcSFGheOUD8b7tjlnjzDZjqUzIeUt2ffvzvgC2)

## **🖥️ 2024 Virtual Teacher Conference**

[![undefined](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/2024virtualconferenceemailbanner-1731106206538-compressed.png)](https://codehs.com/virtualcon2024-register)

Registration for the CodeHS Virtual Teacher Conference is now open! We have an amazing lineup of speakers, including CS teachers from across the country and experts from CodeHS. Some session topics you may find interesting are:

- **Effective Use of AI for CS Teachers**
- **College Student Panel**
- **Ignite Classroom Collaboration**

Attendees will receive a CodeHS Pro Trial through June 30th, 2024, a $20 Amazon gift card, and a digital swag bag! Explore session topics and register at [codehs.com/virtualcon2024-register](https://codehs.com/virtualcon2024-register).

[Register Today](https://codehs.com/virtualcon2024-register)

![undefined](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/xs-tr-nu4m2e2m5me4isfnet6lg1upvcni4icil-7epentpoo1a0sshp1skkjfcenar9grxi1n5om2h9bla7evsjxzv1qawjrcsfgheoud8b7tjlnjzdzjquzieut2ffvzvgc2-1731106241214-compressed.xs-Tr-NU4m2e2M5mE4ISfnet6lG1upvcNi4_iciL-7epent_Poo1A0sShp1SkkJfceNAR9GRXI1N5Om2h9BlA7EVsjXzV1qAwJRcSFGheOUD8b7tjlnjzDZjqUzIeUt2ffvzvgC2)

## 🎓 **CodeHS Scholarship Program**

[![undefined](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/scholarshipprogramgoogleformheader-1731106255797-compressed.png)](https://www.notion.so/CodeHS-Scholarship-Program-6fe2b585a4ce4d208fe08fd67b62ff42?pvs=21)

**Calling All High School Seniors - Now Accepting Applications!**

CodeHS is proud to invite all eligible students to apply for the CodeHS Scholarship! We will award $1,000 grants to 10 students who plan to study computer science and related fields at the post-secondary level.

Review the scholarship eligibility requirements and learn how your students can apply today.

All applications are due by **May 20th, 2024 @ 11:59 PM CT**.

[Help Your Students Apply](https://www.notion.so/CodeHS-Scholarship-Program-6fe2b585a4ce4d208fe08fd67b62ff42?pvs=21)

![undefined](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/ccrwfssvth948705gnlv5nf9r0et-tqm8uuynmcs6m91sj2iitutvmaec12n-uhfsolw1cs9xuzssiros7xdaeppujlspnei8nkcqdxlh1hddxv2umtnp0tmjnxo7gfejfvly-g-1731106302102-compressed.CcrWFSsVth948705GNlV5NF9R0ET-TqM8_UUYNmcS6M91SJ2IItUTvmaeC12N-UHfsOLw1cs9xuZsSirOS7XdAeppuJLSpnei8NKcqDXlh1HDDxv2UMTnp0tmjnxo7GfEJfVlY-g)

## **Academic Integrity**

CodeHS has developed a new suite of [Academic Integrity tools](https://codehs.com/toolbox/academic_integrity/) to help teachers ensure authentic learning and ethical conduct in the classroom.

[Academic Integrity Tools](https://codehs.com/toolbox/academic_integrity/)

![undefined](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/ccrwfssvth948705gnlv5nf9r0et-tqm8uuynmcs6m91sj2iitutvmaec12n-uhfsolw1cs9xuzssiros7xdaeppujlspnei8nkcqdxlh1hddxv2umtnp0tmjnxo7gfejfvly-g-1731106342751-compressed.CcrWFSsVth948705GNlV5NF9R0ET-TqM8_UUYNmcS6M91SJ2IItUTvmaeC12N-UHfsOLw1cs9xuZsSirOS7XdAeppuJLSpnei8NKcqDXlh1HDDxv2UMTnp0tmjnxo7GfEJfVlY-g)

## **CodeHS in Spanish**

[Spanish curriculum](http://codehs.com/spanish) is available for Video Game Design in JavaScript, in addition to other courses, across languages.

[CodeHS in Spanish](http://codehs.com/spanish)

![Stay connected](https://prod.superblogcdn.com/site_cuid_cm264m3an0084qegvyd7aetst/images/ccrwfssvth948705gnlv5nf9r0et-tqm8uuynmcs6m91sj2iitutvmaec12n-uhfsolw1cs9xuzssiros7xdaeppujlspnei8nkcqdxlh1hddxv2umtnp0tmjnxo7gfejfvly-g-1731106380914-compressed.CcrWFSsVth948705GNlV5NF9R0ET-TqM8_UUYNmcS6M91SJ2IItUTvmaeC12N-UHfsOLw1cs9xuZsSirOS7XdAeppuJLSpnei8NKcqDXlh1HDDxv2UMTnp0tmjnxo7GfEJfVlY-g)

## 💬 Stay Connected

1. Follow us on [Twitter](https://twitter.com/CodeHS) and [Instagram](http://instagram.com/codehs)
2. Chat with others in the [CodeHS Educators Facebook Group](https://www.facebook.com/groups/CodeHSEducators/)
3. Explore the [CodeHS Game Design Hub](https://codehs.com/curriculum/game-design)

Happy Coding,

Matt Arnold

​ _Curriculum Developer, CodeHS_

_Interested in learning more about CodeHS Pro? [Request a quote.](https://codehs.com/quote?c=GameDesignInsider_03.20.24)_


---
This blog is powered by Superblog. Visit https://superblog.ai to know more.
---

