• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 03:59
CEST 09:59
KST 16:59
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
Chinese SC2 server to reopen; live all-star event in Hangzhou20Weekly Cups (Oct 13-19): Clem Goes for Four3BSL Team A vs Koreans - Sat-Sun 16:00 CET7Weekly Cups (Oct 6-12): Four star herO85.0.15 Patch Balance Hotfix (2025-10-8)81
StarCraft 2
General
Chinese SC2 server to reopen; live all-star event in Hangzhou The New Patch Killed Mech! RotterdaM "Serral is the GOAT, and it's not close" Weekly Cups (Oct 13-19): Clem Goes for Four 5.0.15 Patch Balance Hotfix (2025-10-8)
Tourneys
Merivale 8 Open - LAN - Stellar Fest Tenacious Turtle Tussle RSL Season 3 Qualifier Links and Dates $1,200 WardiTV October (Oct 21st-31st) SC2's Safe House 2 - October 18 & 19
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers
Brood War
General
OGN to release AI-upscaled StarLeague from Feb 24 BGH Auto Balance -> http://bghmmr.eu/ Is there anyway to get a private coach? SnOw's Awful Building Placements vs barracks BW General Discussion
Tourneys
ASL final tickets help [Megathread] Daily Proleagues [ASL20] Semifinal B 300$ 3D!Community Brood War Super Cup #4
Strategy
Current Meta [I] TvP Marine Usage Roaring Currents ASL final BW - ajfirecracker Strategy & Training
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread Dawn of War IV ZeroSpace Megathread
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
YouTube Thread US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine The Chess Thread
Fan Clubs
The herO Fan Club!
Media & Entertainment
Korean Music Discussion Anime Discussion Thread Series you have seen recently... [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023 Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
The Benefits Of Limited Comm…
TrAiDoS
Sabrina was soooo lame on S…
Peanutsc
Our Last Hope in th…
KrillinFromwales
Certified Crazy
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1695 users

Student Game Dev Part 14 - Enemies and problems

Blogs > Soan
Post a Reply
Soan
Profile Blog Joined August 2010
New Zealand194 Posts
February 28 2014 02:49 GMT
#1
+ Show Spoiler [Previous parts] +
Part One - It begins
Part Two - Technical Foundation
Part Three - Game Design
Part Four - Input and Physics
Part Five - More Physics Things
Part Six - Even More Physics
Part Seven - User Interface
Part Eight - UI and the Editor
Part Nine - Editor Progress
Part Ten - Progress, and videos
Part Eleven - Fixing the Physics
Part Twelve - Unproductive
Part Thirteen - Context menu + enemies


This Week
Hello again TeamLiquid! Welcome back to my blog about the development of The Adventures of Sam the Pirate, the 2D platformer I'm creating as the final game project for my Bachelor of Software Engineering degree. Last week I talked more about the context menu, and talked a bit about enemy behaviours. This week I'll be talking about implementing the first, most basic enemy and its interaction with the player.

Basic Zombie Pirates
The basic zombie pirate is now mostly implemented. They're moving back and forth, although they don't yet detect the edge of a cliff and so just walk right off, which is not the intended behaviour. I will be working on this a bit over the weekend, so they turn around instead of walking off. They do turn around when they hit a wall though! As for their AI, I decided to keep things simple, and just have them attack on a timer. It's likely all other enemies will have similar behaviour. No death animations being triggered just yet, that is next on the to do list.

I would love to do more, such as having enemies chase the player for a peroid of time if the player enters their line of sight, but there isn't enough time left to implement this. It will definitely be something I look at redoing in the future, as it is very likely I'll be doing a lot of work after graduation on the game, improving under the hood performance, changing AI, maybe adding new features/enemies to levels.

New Problems
So this week I discovered a problem with the sprite creation/loading system I created near the beginning of the project. Whenever I wanted to create a new sprite, the sprite system compared the file path of the requested sprite sheet against what had already been loaded. If it had already been loaded, then that sprite object was simply returned, and no new sprite object was created. This sounds all fine and dandy, as I don't want to load the same sprite sheet into memory multiple times, however this sprite object contains, as well as the art, the positional and animation information. So when I created multiple enemies, while their positions were different (as this is set separately for each enemy), they were sharing animation information, and so displayed exactly the same. So for instance, I could have an enemy displaying the run left animation, but be moving right. Which is obviously silly!

In hindsight, it would have made far more sense to shift loading the sprite sheet texture into a separate texture loading system (which I don't currently have), rather than keeping it as part of the sprite object. I didn't think of this at the time though, and don't really have time to fix it at the moment. Another thing to add to the list of things I'm going to do after graduation.

What's next?
I'll be finishing up the player/enemy interaction, including making sure death animations are played when something dies. I'll also starting looking at implementing parallax scrolling, so the background is a bit more interesting than a static image. Having a play testing session on the Friday with all the tutors, so hopefully I'll actually have some proper art in the game by then.

Keep up to date!
Be sure to follow me on Twitter, and like the Facebook page to stay up to date on future content and blog posts when they happen. If you have any questions don't hesitate to ask, either through Twitter or Facebook! You can also check out the blog, previous posts, screenshots and videos over at my site.

KaiserKieran
Profile Blog Joined August 2011
United States615 Posts
February 28 2014 03:37 GMT
#2
Looks cool man! Look forward to the game!
Please log in or register to reply.
Live Events Refresh
Next event in 3h 1m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nina 193
OGKoka 8
StarCraft: Brood War
ToSsGirL 270
Nal_rA 37
Dota 2
XcaliburYe65
League of Legends
JimRising 620
Counter-Strike
Stewie2K632
Other Games
ceh9487
crisheroes206
Tasteless176
C9.Mang0169
NeuroSwarm37
Trikslyr22
Organizations
Other Games
gamesdonequick572
Counter-Strike
PGL266
StarCraft: Brood War
lovetv 17
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• LUISG 24
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos1237
• Lourlo965
• HappyZerGling164
Upcoming Events
WardiTV Invitational
3h 1m
Online Event
8h 1m
RSL Revival
18h 1m
RSL Revival
1d 2h
WardiTV Invitational
1d 3h
OSC
1d 7h
SKillous vs goblin
Spirit vs GgMaChine
ByuN vs MaxPax
Afreeca Starleague
2 days
Snow vs Soma
Sparkling Tuna Cup
2 days
WardiTV Invitational
2 days
CrankTV Team League
2 days
[ Show More ]
RSL Revival
2 days
Wardi Open
3 days
CrankTV Team League
3 days
Replay Cast
4 days
WardiTV Invitational
4 days
CrankTV Team League
4 days
Replay Cast
5 days
CrankTV Team League
5 days
Replay Cast
5 days
The PondCast
6 days
CrankTV Team League
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
BSL 21 Non-Korean Championship
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.