• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 21:09
CEST 03:09
KST 10:09
  • 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
BGE Stara Zagora 2025: Info & Preview27Code S RO12 Preview: GuMiho, Bunny, SHIN, ByuN3The Memories We Share - Facing the Final(?) GSL46Code S RO12 Preview: Cure, Zoun, Solar, Creator4[ASL19] Finals Preview: Daunting Task30
Community News
Weekly Cups (June 2-8): herO doubles down0[BSL20] ProLeague: Bracket Stage & Dates9GSL Ro4 and Finals moved to Sunday June 15th12Weekly Cups (May 27-June 1): ByuN goes back-to-back0EWC 2025 Regional Qualifier Results26
StarCraft 2
General
The SCII GOAT: A statistical Evaluation Weekly Cups (June 2-8): herO doubles down BGE Stara Zagora 2025: Info & Preview Magnus Carlsen and Fabi review Clem's chess game. Jim claims he and Firefly were involved in match-fixing
Tourneys
Bellum Gens Elite: Stara Zagora 2025 Sparkling Tuna Cup - Weekly Open Tournament SOOPer7s Showmatches 2025 Master Swan Open (Global Bronze-Master 2) $5,100+ SEL Season 2 Championship (SC: Evo)
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
Will foreigners ever be able to challenge Koreans? BGH auto balance -> http://bghmmr.eu/ Mihu vs Korea Players Statistics BW General Discussion [BSL20] ProLeague: Bracket Stage & Dates
Tourneys
[ASL19] Grand Finals NA Team League 6/8/2025 [Megathread] Daily Proleagues [BSL20] ProLeague Bracket Stage - Day 2
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
Stormgate/Frost Giant Megathread Armies of Exigo - YesYes? Nintendo Switch Thread What do you want from future RTS games? Path of Exile
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
LiquidLegends to reintegrate into TL.net
Heroes of the Storm
Heroes of the Storm 2.0 Simple Questions, Simple Answers
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Vape Nation Thread European Politico-economics QA Mega-thread
Fan Clubs
Maru Fan Club Serral Fan Club
Media & Entertainment
Korean Music Discussion [Manga] One Piece
Sports
2024 - 2025 Football Thread Formula 1 Discussion NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Cleaning My Mechanical Keyboard
TL Community
The Automated Ban List
Blogs
Cognitive styles x game perf…
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
Poker
Nebuchad
Customize Sidebar...

Website Feedback

Closed Threads



Active: 21438 users

Student Game Dev Part Eight - UI and the Editor

Blogs > Soan
Post a Reply
Soan
Profile Blog Joined August 2010
New Zealand194 Posts
January 17 2014 01:36 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


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 covered some of the User Interface work that I've done, and showed off a new piece of concept art. No new concept art this week, but I'll be going over the continued work on the user interface, and the start of work on the editor.

User Interface
As mentioned last week, the layout and other information for a specific interface layout is stored in a file. When I want to use a specific interface for a screen, such as a menu screen, the file is simply loaded, the UI system creates everything needed, and then it can be rendered over the top of everything else. Absolutely everything to do with the layout is stored. The number of UI elements like buttons and static images, the art used for each, their positions, their height and width, etc, everything needed to allow my UI system to create an interface that can be displayed.

As I mentioned in last weeks blog, I wasn't too sure how to give each button unique functionality without creating a different class for each button, which is inefficient and doesn't fit with my design goals of making things as generic and reusable as possible. I ended up doing what I talked about last week, using lua in a similar manner to how I used it in my debug console, which I talked about in a previous blog.

I could have also used the observer pattern, (where observers register with a button and can implement an OnClicked function or something similar, that is called anytime the button is clicked), but I'd totally forgotten about it, despite using it elsewhere and having seen it used in this manner before. Even if I had remembered, I'm not entirely sure I would have used it over the approach I have taken. While it would work, and both methods feel like they have about the same amount of work in them, I still prefer the lua method as it generally seems to fit with what I'm wanting to do. With the observer pattern, everything is done in code, but some changes would require a recompile of the project. With lua, I can change more things, like adding/removing UI elements, without having to recompile the code. It also feels like it would be easier to bring this code over to a new project and use it the system straight away.

With all the details for a layout being stored in a file, it is a bit of extra work in filling out all the details manually, and trying to manually position UI elements correctly, but as I was planning on creating a level editor, I've decided to simply expand the level editor by giving it the ability to edit interface layouts visually. More work now to save work later. This would also open up the possibility of giving the editor to an artist, so they can ensure that any UI art they have done is all positioned correctly and looking good.

Editor
Started work on my editor this week. As mentioned, initially it was just going to be a level editor, but with my work on the user interface stuff I've decided to add interface layout editing functionality, turning it into more of a generic editor to go with my framework.

I'm creating the level editor part first, as it will allow me to quickly create/edit levels visually, rather than trying to do them by hand, which is super important for saving time later. So far I've got a grid the size of the level being rendered, and you can scroll around it without going over the edges. This scrolling is done by holding the right mouse button down and moving the mouse around, but I'll probably look at adding scrolling by simply moving the mouse to the edges of the screen as well. I've also thought about adding a minimap, but that's pretty low priority at the moment.

The current plan is for a right click to bring up a menu, allowing me to change what tool I'm using, what tileset is being used for the art, etc. Tiles and other level elements like the player start position, enemy start positions etc is done with a left click. Hitting the Escape key would bring up a menu allowing me to save, load, switch editors, etc. A lot of this stuff would also likely be keybound, so I wouldn't necessarily have to open menus all the time. To make things a bit easier, I won't have to select the right tile piece, such as a corner for a corner, and simply be able to "paint" where I want platforms to be. To make sure the right tiles are selected for each square, I'll have an algorithm detecting the surrounding tiles and selecting the right piece of art. I'm not entirely sure this description will make sense to you, so once I have it all figured out I'll go over it in a future blog, with pictures!

Unfortunately for you, the reader, I'm not planning a public release of the editor at this time, so making the editor easy to use for someone who isn't me is not a big deal right now. I would like to potentially release it and allow for easy sharing of levels through something like the Steam workshop, or setup my own server for this, but there most definitely isn't time to do this right now. I'll have to see how things go after release and after I graduate.

What's next?
I'll continue working on the editor over the next week, the next step is to get tools working, and start being able to place tiles. This will include working on the algorithm to make sure that the right art pieces are selected for the correct tiles.

I should look at documenting what functions are available to Lua, as well as what they do, what their parameters are etc. Should also look at adding some more commands to the debug console, as I've been a bit slack and haven't added any since it was created.

I'd like to start showing off some screenshots, and soon video of the current state of the game as well, but unfortunately I'm a bit embarrassed about the art situation at the moment haha. Tiles and the main character are just white boxes with some text on them at the moment, so there isn't much to show off! Once I start to get more art and things start to take shape, keep an eye out for screenshots/videos!

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!

0x64
Profile Blog Joined September 2002
Finland4544 Posts
January 17 2014 02:45 GMT
#2
You shouldn't probably do your own editor.
Just use http://www.mapeditor.org/ or something and put your focus on your game, not on tools that already exists.
Dump of assembler code from 0xffffffec to 0x64: End of assembler dump.
Soan
Profile Blog Joined August 2010
New Zealand194 Posts
January 17 2014 22:44 GMT
#3
I've got a few reasons for making my own.

1. We've got a development based capstone coming up, where we'll be required to make a tool or something of some sort. I figured an editor of some sort that I can use on my game would be where I'd best spend my time for that. We actually should've gotten the brief for this last week, but nothing yet. :/

2. It allows me to keep all the level formats and everything as I want, without having to learn, or possibly work around something else.

3. As a student, it's something I can put on my portfolio, on top of the game. Which I'm confident will be completed in some form.

4. I like the challenge!
0x64
Profile Blog Joined September 2002
Finland4544 Posts
January 18 2014 02:12 GMT
#4
While all your points are valid. My intuition tells me you are making a mistake.

The strongest point is 1.
but this Tiled map editor is open source, meaning that you could quickly edit it to support features customized for your game.

2. is lazy. You can check the format out in 20 min and decide if there is something wrong with it.

3. True, but now you end up rushing your editor, because you need it for your game. Focus 100% on your game, and the result should be better for your portfolio.

4. If you like the challenge, then take challenge as presented with 2.


I am playing a bit the devil's advocate as I do not think you are wrong in any way, just want you to have the argument for doing the opposite of what you are doing.

Anyway, best of luck with your project!
Dump of assembler code from 0xffffffec to 0x64: End of assembler dump.
Soan
Profile Blog Joined August 2010
New Zealand194 Posts
January 19 2014 19:04 GMT
#5
On January 18 2014 11:12 0x64 wrote:
I am playing a bit the devil's advocate as I do not think you are wrong in any way, just want you to have the argument for doing the opposite of what you are doing.


Yeah no worries, I've always felt it's good to have someone do exactly that, so thanks!
Please log in or register to reply.
Live Events Refresh
Next event in 9h 51m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
NeuroSwarm 185
Livibee 126
RuFF_SC2 108
StarCraft: Brood War
Artosis 1103
Icarus 11
Dota 2
LuMiX1
League of Legends
tarik_tv7709
JimRising 697
Counter-Strike
Stewie2K1664
PGG 29
Super Smash Bros
C9.Mang014725
Mew2King193
Heroes of the Storm
Khaldor166
Other Games
summit1g8259
FrodaN3647
shahzam1051
ViBE233
Maynarde139
Models1
Organizations
Dota 2
PGL Dota 2 - Secondary Stream7880
Other Games
gamesdonequick824
BasetradeTV145
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• Berry_CruncH315
• Hupsaiya 65
• davetesta17
• gosughost_ 4
• Mapu1
• Kozan
• AfreecaTV YouTube
• intothetv
• sooper7s
• IndyKCrew
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• Azhi_Dahaki27
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• Ler110
League of Legends
• Doublelift6075
• Shiphtur773
Upcoming Events
Wardi Open
9h 51m
Replay Cast
22h 51m
Replay Cast
1d 8h
WardiTV Invitational
1d 9h
WardiTV Invitational
1d 9h
GSL Code S
2 days
Rogue vs GuMiho
Maru vs Solar
Online Event
2 days
Replay Cast
3 days
GSL Code S
3 days
herO vs Zoun
Classic vs Bunny
The PondCast
3 days
[ Show More ]
Replay Cast
3 days
WardiTV Invitational
4 days
Korean StarCraft League
5 days
CranKy Ducklings
5 days
WardiTV Invitational
5 days
Cheesadelphia
5 days
GSL Code S
6 days
Sparkling Tuna Cup
6 days
Replay Cast
6 days
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
ECL Season 49: Europe
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.