• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:26
CEST 18:26
KST 01:26
  • 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
Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy4Code S RO8 Preview: herO, Zoun, Bunny, Classic7Code S RO8 Preview: Rogue, GuMiho, Solar, Maru3BGE Stara Zagora 2025: Info & Preview27
Community News
Classic & herO RO8 Interviews: "I think it’s time to teach [Rogue] a lesson."2Rogue & GuMiho RO8 interviews: "Lifting that trophy would be a testament to all I’ve had to overcome over the years and how far I’ve come on this journey.3Code S RO8 Results + RO4 Bracket (2025 Season 2)12BGE Stara Zagora 2025 - Replay Pack2Weekly Cups (June 2-8): herO doubles down1
StarCraft 2
General
Classic & herO RO8 Interviews: "I think it’s time to teach [Rogue] a lesson." Code S RO8 Results + RO4 Bracket (2025 Season 2) Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho Rogue & GuMiho RO8 interviews: "Lifting that trophy would be a testament to all I’ve had to overcome over the years and how far I’ve come on this journey. I have an extra ticket to the GSL Ro4/finals
Tourneys
[GSL 2025] Code S: Season 2 - Semi Finals & Finals $3,500 WardiTV European League 2025 Sea Duckling Open (Global, Bronze-Diamond) SOOPer7s Showmatches 2025 RSL: Revival, a new crowdfunded tournament series
Strategy
[G] Darkgrid Layout Simple Questions Simple Answers [G] PvT Cheese: 13 Gate Proxy Robo
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 477 Slow and Steady Mutation # 476 Charnel House Mutation # 475 Hard Target Mutation # 474 Futile Resistance
Brood War
General
ASL20 Preliminary Maps BGH Auto Balance -> http://bghmmr.eu/ Recent recommended BW games BW General Discussion FlaSh Witnesses SCV Pull Off the Impossible vs Shu
Tourneys
[Megathread] Daily Proleagues [BSL 2v2] ProLeague Season 3 - Friday 21:00 CET Small VOD Thread 2.0 [BSL20] ProLeague Bracket Stage - Day 4
Strategy
I am doing this better than progamers do. [G] How to get started on ladder as a new Z player
Other Games
General Games
Path of Exile Nintendo Switch Thread Stormgate/Frost Giant Megathread Beyond All Reason What do you want from future RTS games?
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread UK Politics Mega-thread Russo-Ukrainian War Thread Vape Nation Thread
Fan Clubs
Maru Fan Club Serral Fan Club
Media & Entertainment
Korean Music Discussion [Manga] One Piece
Sports
2024 - 2025 Football Thread NHL Playoffs 2024 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
A Better Routine For Progame…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
I was completely wrong ab…
jameswatts
Need Your Help/Advice
Glider
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 31739 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
Cheesadelphia
15:00
Cheeseadelphia 2025
CranKy Ducklings96
davetesta19
LiquipediaDiscussion
WardiTV Invitational
11:00
WardiTV June Playoffs
Reynor vs GeraldLIVE!
MaxPax vs TBD
WardiTV1695
TKL 307
IndyStarCraft 257
Rex165
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
TKL 307
IndyStarCraft 257
Hui .245
Rex 165
ProTech94
BRAT_OK 70
MindelVK 33
trigger 25
StarCraft: Brood War
Britney 32869
Calm 4880
Rain 2813
Horang2 1619
Bisu 1099
BeSt 600
Light 328
Soulkey 192
Nal_rA 189
Zeus 130
[ Show more ]
Mind 61
Dewaltoss 60
JulyZerg 60
Sharp 44
Rock 31
scan(afreeca) 22
Terrorterran 20
SilentControl 16
HiyA 15
sas.Sziky 11
IntoTheRainbow 9
Noble 7
Dota 2
Gorgc7603
qojqva2105
League of Legends
Dendi1348
JimRising 443
Trikslyr70
Counter-Strike
fl0m4347
olofmeister1557
Super Smash Bros
Mew2King33
Heroes of the Storm
Khaldor616
Liquid`Hasu472
Other Games
tarik_tv30878
gofns18404
singsing2380
B2W.Neo849
Grubby575
C9.Mang0536
Mlord429
Lowko392
crisheroes384
DeMusliM239
XaKoH 90
ArmadaUGS88
Organizations
Dota 2
PGL Dota 2 - Main Stream12414
Other Games
gamesdonequick599
EGCTV543
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• 3DClanTV 39
• Adnapsc2 15
• IndyKCrew
• AfreecaTV YouTube
• sooper7s
• Migwel
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 2501
• WagamamaTV351
• Ler53
League of Legends
• Nemesis7547
Other Games
• Shiphtur266
Upcoming Events
CSO Cup
34m
BSL: ProLeague
1h 34m
Hawk vs UltrA
Sziky vs spx
TerrOr vs JDConan
GSL Code S
15h 34m
Rogue vs herO
Classic vs GuMiho
Sparkling Tuna Cup
17h 34m
WardiTV Qualifier
23h 34m
BSL: ProLeague
1d 1h
Bonyth vs Dewalt
Cross vs Doodle
MadiNho vs Dragon
Replay Cast
1d 7h
Wardi Open
1d 18h
Replay Cast
2 days
Replay Cast
2 days
[ Show More ]
RSL Revival
2 days
Cure vs Percival
ByuN vs Spirit
RSL Revival
3 days
herO vs sOs
Zoun vs Clem
Replay Cast
4 days
The PondCast
4 days
RSL Revival
4 days
Serral vs SHIN
Solar vs Cham
Replay Cast
5 days
RSL Revival
5 days
Reynor vs Scarlett
ShoWTimE vs Classic
uThermal 2v2 Circuit
5 days
SC Evo League
6 days
Liquipedia Results

Completed

Proleague 2025-06-11
BGE Stara Zagora 2025
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
KCM Race Survival 2025 Season 2
NPSL S3
Rose Open S1
CSL 17: 2025 SUMMER
2025 GSL S2
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025

Upcoming

Copa Latinoamericana 4
CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
SEL Season 2 Championship
Esports World Cup 2025
HSC XXVII
Championship of Russia 2025
BLAST Open Fall 2025
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
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.