• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 14:34
CEST 20:34
KST 03:34
  • 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 RO8 Preview: herO, Zoun, Bunny, Classic7Code S RO8 Preview: Rogue, GuMiho, Solar, Maru3BGE Stara Zagora 2025: Info & Preview27Code S RO12 Preview: GuMiho, Bunny, SHIN, ByuN3The Memories We Share - Facing the Final(?) GSL47
Community News
BGE Stara Zagora 2025 - Replay Pack2Weekly Cups (June 2-8): herO doubles down1[BSL20] ProLeague: Bracket Stage & Dates9GSL Ro4 and Finals moved to Sunday June 15th13Weekly Cups (May 27-June 1): ByuN goes back-to-back0
StarCraft 2
General
Jim claims he and Firefly were involved in match-fixing The SCII GOAT: A statistical Evaluation Code S RO8 Preview: herO, Zoun, Bunny, Classic DreamHack Dallas 2025 - Official Replay Pack BGE Stara Zagora 2025 - Replay Pack
Tourneys
[GSL 2025] Code S: Season 2 - Ro8 - Group A [GSL 2025] Code S: Season 2 - Ro8 - Group B RSL: Revival, a new crowdfunded tournament series SOOPer7s Showmatches 2025 Sparkling Tuna Cup - Weekly Open Tournament
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
BGH auto balance -> http://bghmmr.eu/ FlaSh Witnesses SCV Pull Off the Impossible vs Shu BW General Discussion StarCraft & BroodWar Campaign Speedrun Quest Will foreigners ever be able to challenge Koreans?
Tourneys
[Megathread] Daily Proleagues [ASL19] Grand Finals [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET NA Team League 6/8/2025
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 Stormgate/Frost Giant Megathread Nintendo Switch Thread 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
TeamLiquid Health and Fitness Initiative For 2023 2024 - 2025 Football Thread Formula 1 Discussion NHL Playoffs 2024
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: 17033 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 2h 26m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 580
IndyStarCraft 123
UpATreeSC 61
JuggernautJason60
MindelVK 55
StarCraft: Brood War
Sea 2808
Rain 1399
Hyuk 672
Soulkey 136
HiyA 44
hero 32
Dewaltoss 30
TY 25
scan(afreeca) 25
Yoon 17
[ Show more ]
Nal_rA 13
zelot 3
Dota 2
Gorgc7692
League of Legends
Dendi1393
Counter-Strike
fl0m6752
olofmeister2562
Foxcn10
Heroes of the Storm
Liquid`Hasu271
Khaldor135
Other Games
FrodaN839
C9.Mang0748
tarik_tv662
Mlord506
B2W.Neo249
Grubby135
elazer129
Mew2King98
Organizations
Dota 2
PGL Dota 2 - Main Stream4083
Other Games
BasetradeTV79
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• Adnapsc2 22
• intothetv
• Kozan
• sooper7s
• AfreecaTV YouTube
• Migwel
• LaughNgamezSOOP
• IndyKCrew
StarCraft: Brood War
• HerbMon 26
• Rasowy 9
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 3576
• masondota21056
League of Legends
• Jankos2189
• TFBlade1412
Other Games
• imaqtpie950
• Shiphtur347
Upcoming Events
OSC
2h 26m
ArT vs ReBellioN
HonMonO vs Ziomek
Shameless vs LunaSea
MilkiCow vs GgMaChine
Moja vs HiGhDrA
Jumy vs TBD
Demi vs NightPhoenix
Solar vs Cham
Replay Cast
5h 26m
OSC
5h 26m
WardiTV Invitational
16h 26m
HiGhDrA vs Nicoract
MaNa vs HiGhDrA
HiGhDrA vs Reynor
Nicoract vs Reynor
MaNa vs Nicoract
MaNa vs Reynor
MaxPax vs Spirit
Krystianer vs Spirit
OSC
18h 26m
Korean StarCraft League
1d 8h
SOOP
1d 14h
sOs vs Percival
CranKy Ducklings
1d 15h
WardiTV Invitational
1d 16h
Cheesadelphia
1d 20h
[ Show More ]
CSO Cup
1d 22h
GSL Code S
2 days
Rogue vs herO
Classic vs GuMiho
Sparkling Tuna Cup
2 days
Replay Cast
3 days
Wardi Open
3 days
Replay Cast
4 days
Replay Cast
4 days
RSL Revival
4 days
Cure vs Percival
ByuN vs Spirit
RSL Revival
5 days
herO vs sOs
Zoun vs Clem
Replay Cast
6 days
The PondCast
6 days
RSL Revival
6 days
Serral vs SHIN
Solar vs Cham
Liquipedia Results

Completed

CSL Season 17: Qualifier 2
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
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
BLAST Open Spring 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
Murky Cup #2
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.