Ph.D. Adventures!

Star Struck! Meeting Julian Togelius (Ph.D. Year 1, Fall Weeks 11-13)

Oops, life got away from me, but that’s okay! Here’s a three-week update!

TLDR:

I had a minor procedure done (all went well), I updated my website with an about me, I completed and got rejected for the HERTZ, we didn’t have time to complete the AISL, and I got great feedback and direction from Tallie the librarian for my literature review! OH, and I met Julian Togelius the editor in chief for the IEEE Transactions on Games Journal! What?!?!? 

For the Interested Reader:

Star Struck!

I should preface: I don’t usually get star struck! But when I met Julian Togelius, I definitely felt the struckness!

Julian Togelius visited our university and I had the opportunity to attend the grad luncheon. He politely, and with good humor and an upbeat spirit, listened to and engaged with us and our research areas and ideas. It was a great experience. Afterward, he emailed me personally with two papers he had written on psychotherapy games (a core interest of mine), and I got to talk to him for a bit after his talk also. I was def star-struck. It was great!

Taking Time for Me

In my last post, I talked about being a woman pursuing both career and family goals: in that pursuit, I had to take some time away from school and I fell a little behind. I am all caught up now, if not with the all-star A’s I had before, I am feeling I need to push through so as to let other women know you can do both, and it’s okay to shift from one to the other. As a doctoral student being a 4.0 isn’t as important as it used to be, though I love getting my A’s, it’s okay to let perfection in the pursuit of better, more impactful things!

Accomplishments

I got rejected from the HERTZ!

We’ll be applying to the AISL (or another related grant) next year.

I took time for my personal and family goals.

The Marriot Library has FREE research consultations for students and employees. At the suggestion of my advisor I did one, not really expecting much. Boy was a blown away! I got SUPAH great guidance feedback from Tallie the librarian on my literature review. She definitely helped me frame my research question, get to my target databases, how to save my work, emphasized the Prisma (which I think will be a fun visual to include in my paper), and was in general fun to talk to and very supportive.

What’s next

Got to do these things:

  • Start the meat of the literature review: downloading, reading, and writing
  • Survive the end of the semester
  • Register for Spring 2020
  • Read the many papers that have been sent to me to read from my advisor, Julian Togelius, and my peers.

Roadblocks

I’m burnt out from the semester. My classes are only slightly related to my area of research and I’m getting really tired of reading and doing writeups on papers that aren’t even remotely related to my core area of interest. There’s a reason I didn’t go into writing, as much as I loved being an editor and journalist, I get really bored when writing and reading is all I do all day. This semester has been one very long reading-writing session. I’m all burnt out.

I need to work with Rogelio on what my schedule is going to look like next semester and how my work this semester can be carried into my lab rotation with Eliane next semester: I’m excited to see what we can possibly collaborate on.

Ph.D. Adventures!

Ph.D. Year 1, Fall Week 10 — Being Mom

TLDR:

Being Mom and doctoral student last week was a success! Refined my search terms for my systematic review. Worked on the HERTZ. Got my schoolwork done. Did well on my exam.

The Full Story:

If I thought last week was busy… well, I knew this week would be worse.

Accomplishments

Being step bonus mom while doing my Ph.D. last week was successful! I think the kids would have preferred to play with me more, but it’s good for them to see my work ethics too. My advisor and group members for projects were all very supportive of my need to be with the kids, and since I also accomplished my tasks at hand, and even went the extra mile, no one was complaining. Of course, going the extra mile isn’t always feasible, but I always get my work done and I always make time for my family. This last week was a busy one, and being able to juggle family and school life, a first for me, showed to me that we can do it and there is no reason why not.

Research / School-related accomplishments

  • Refined my list of search terms for systematic review.
  • Got my four recommenders for the HERTZ
    • Note to self: ask for recommendations WA-AY sooner!
  • Getting better at the academic paper reading, finding, reviewing, analyzing. 

I almost quit my application for the HERTZ when I realized last week I hadn’t asked for letters of recommendation and they are due this week. Rogelio my advisor encouraged another member of our lab to got for a grant. She decided to drop it, but I knew he’d say the same things to me (to go for it!), so I took that as encouragement, swallowed my pride, and prepared to need to profusely apologize to the people I was asking so late, which I did. It was a lesson that I need to be more on top of next time. It could have very negatively impacted my relationship with these people. Thankfully they were willing to forgive and were very supportive.

What’s next

Got to do these things:

  • HERTZ due this week
  • Schoolwork, projects, and exams
  • Begin testing systematic keywords in various databases. 
    • Meet with a librarian to see if I’m missing anything
  • AISL grant proposal due Nov 6th!
  • Meet Julian Togelius at his talk this Friday! (I’m super excited!)

Roadblocks

Just buys and tired. Not sure if a certain large homework assignment is going to be completed because everything else is more pressing, more important, and I do not like the class… should still be able to pull off a B though… ??

Being a Mom while Completing a Ph.D.

I got a taste of what it will be like to have kids while doing a Ph.D. and I believe it is completely doable. There is no reason why you can’t pursue a degree and be a mom. You just have to remember your priorities: faith and family first, then career. Of course, you still need to meet your work responsibilities, but family ones are just as important, so I made sure to schedule in playtime this past week with the kids while we had them despite a heavy workload. So glad I did!

Between my husband’s work schedule and my school/work schedule, we were able to watch the kids without calling in for reinforcements. It helps that we have a live-in uncle, but he was sick so mostly I had the kids check on him, not the other way around. Ha ha. 

Since we had the kids we did some pumpkin carving (forgot to take photos since the hubby did that), and lots of Halloween crafts and decorating. We spent most of last weekend doing the big adventures since last week I knew I’d be in school. Glad we did it. I didn’t get to play with the kids as much as would have liked, but while I worked on homework and research my daughter was on the bed next to me playing games. 

Looking Back, Missing My Mom

This past Friday, October 18, 2019, marked the two-year anniversary of my mother’s death. She died during my last year of my Master’s. So we bought some fall flowers and went to her grave. She always supported me in my education and work. It’s hard to not have her as my cheerleader anymore. I think she would be proud.

When we were at the cemetery we decided to also see my little brother Ben (who died as a baby and is buried in the same cemetery as my mother). On the way over we saw a very decorated grave, all out! It looked beautiful. It was for a baby who died recently. That day was the baby’s birthday. Birthdays and Death Anniversaries are important days. It was bittersweet. It’s good to remember and celebrate lives, and take time to live your own.

Ludology, Ph.D. Adventures!

Ph.D. Year 1, Fall Weeks 6-8 — the AISL, Sickness, Arches, Campfire, and a Corn Maze!

TLDR:

AISL grant proposal won in the University of Utah competition. WAHOO!! Celebrate! Now we (Rogelio the PI and myself) need to write the full proposal. Need to complete my Hertz application, finalize my keywords for my systematic review, and lots of homework and an exam all need to be completed (or taken) all in the next eight days. Should be fun. 😉

Despite being sick, kept up with school work (at least the minimum required), and had a good fall break with camping and fires, Arches National Park, and a corn maze!

The Full Story:

An exam review, two weeks of sickness, and fall break made me miss the last couple updates. Here is my three-week catch-up.

Accomplishments

I wrote up a draft for the AISL grant proposal for the University of Utah competition. Because we found out about it close to the deadline, my illness, and Rogelio’s own busy schedule, he took my draft and finalized it for submission (he is the PI on the grant as it is anyway). If you compare the two you can see my content throughout, just elevated, by a large margin. I’m excited to be working with someone who is such a good writer so I can learn from him. Oh yeah, our proposal was accepted! Now we write the full proposal. 😉 More on that later…

I did preliminary searches and read a previous literature review on educational game design and have found that no one has addressed my specific research question about educational game design, so I am moving forward with my research topic. It also fits very nicely into our AISL grant proposal.

I got sick but somehow managed to keep up with the MVP for my classes. My professors are all really kind and understanding. Hopefully, I will be nice professor one day.

Over fall break I specifically did not do anything school-related. I thought I might get bored, and I did start to, but then my husband decided we should go on an adventure after all, called his work and received the time off, and we headed down to Arches National Park for two nights! That meant we got to build two campfires! That was fun.

On Saturday we took the kids and their uncle Zeke, my younger brother, to a corn maze in Lehi, Utah. My husband’s favorite part was seeing how fast he could throw a baseball, my favorite part was seeing how good my soccer skills still are when kicking a ball at various targets, Mikey’s favorite was the zipline (despite hitting his head on the rope at the end), Uncle Zeke’s was lifting a 400 lb haystack (all by himself), and Chelsea’s favorite part was the corn maze. Gotta take time to have fun!

What’s next

In order of priority (for the next 1.5 weeks): finalize keywords for systematic review, finish Hertz application, keep up with classes (I’ve got a lit review, group project announcement, two-week homework assignment, multiple reading writeups, and an exam), and the AISL full proposal.

Also, try to get the rest of the way better. 

Roadblocks

I’m still recouping from my two-week illness, still feeling sick, and having side effects from being sick so long and from all the medication. I’m back on herbal and essential oil remedies so the side effects should start subsiding. 

I really do not enjoy one of my classes — it is not related to my area of study and the class is mostly busywork. The professor himself even told me that last part before classes started– and it takes a very long time to do the homework assignments, so motivation is low.

Cool Stuff!, Game Dev Adventures!

Ph.D. Year 1, Week 5 —  MY FAVORITE SEASON!

TLDR:

I wrote a very rough draft for the AISL grant. Narrowed down research questions and aims for systematic review along with a pretty comprehensive list of keywords and databases to search. I need to get the AISL proposal written up and fast. The deadline is next week and I need to somehow fit that in with my course load. Where has September gone? On the bright side, it’s officially my favorite season and my husband and I just passed our half-year wedding anniversary.

The Full Story:

Accomplishments

It’s officially my favorite season! YEAH AUTUMN! Pumpkins, cute jackets and boots, and bring on the hot chocolate! My husband and I just passed our six-month anniversary. (We’re not very good at celebrating on specific days, but we do celebrate!). We started our marriage with his favorite season — we married on the spring equinox — and now we get to celebrate the rest of our first year kicking it off with my favorite season. I picked a good wedding day. 

Last week Rogelio made me aware of the NSF’s AISL program and potential funding. AISL is “Advancing Informal STEM Learning” which is right up my games ally! He asked me to write up a 1.5-page draft proposal. We first have to compete with others from the University of Utah (each university can only submit three proposals for AISL funding). It’s final is due next week on Wednesday, Oct 2nd! Wish us luck.

With the help of my advisor, Rogelio, I narrowed down my systematic review questions, created aims, and with the help of others from the QED lab, I now also have a pretty comprehensive list of databases to search and keywords to search on. (Thanks QED lab!)

What’s next

Write up a hero narrative for the AISL. Get all my notes from the systematic review all in one place (they are a bit of everywhere right now). Somehow fit in my coursework and study for my upcoming midterms.

Roadblocks

I somehow have to fit writing up the AISL and do my research amongst many large projects from my courses. I can see now why taking three courses, two seminars, and doing research is a bit much. I am definitely feeling burnout. Mostly because one of my courses workload (just one) ate my weekend. 😦

 

Game Dev Adventures!

Ph.D. Year 1, Week 4: Down to Brass Tacks  

TLDR:

This week I got down to brass tacks (which idiom no one knows the origin of): I began an application for outside funding, and started a list of research questions to use for a systematic review. I further refined my research interests which is almost ready to be shared on the QED lab page.

The Full Story:

Accomplishments

I officially changed my name! I am now Nancy N. Blackburn. Hooray!

I have a list of several systematic review questions.

I started a dreaded application for outside funding. (They are a lot of work!)

What’s next

Do a search in the current literature to see what literary reviews have already been compiled and use that data to select a research question to move forward on.

Continue to fill out my applications for grants.

Finish my QED bio and get it published.

Roadblocks

Feeling discouraged about my applications for outside funding. The competition is stiff and while I feel that I am deserving I am definitely wondering how I “prove” my value. 

Game Dev Adventures!, Ludology

Ph.D. Year 1, Week 2 & 3: The Plan and Burnout

TLDR:

Finished semester plan. Main two research goals are to apply for outside funding and  write a systematic review.

This week I’ll create a set of research questions for a systematic review and begin applying for outside funding.

The Full Story:

Accomplishments

I have been reading meta papers and looking at different ways to read and write different kinds of research papers. I have decided this semester to focus on writing a systematic review in the educational games/intelligent tutoring systems area.

I also shared several of the games I made in 24-48 hours with my lab and discussed the design ideas and purpose behind each. It was a good review to me. My chosen area in games is for pedagogical reasons, however games have purpose far beyond just entertainment and education.

It’s one of the other things I did this past week was defending the rigor of games research. I have come across several researchers who use game terminology without actually understanding the field of games. It is particularly important to note that what many researchers have called “game design theory” is actually gamification. Without proper understanding of the difference of game design and gamification, the application of these principles can actually backfire and undermine the overall purpose of the application as a whole. 

Two books I am enjoying delving into are Dan Norman’s The Design of Everyday Things, and Level Up! The Guide to Great Video Game Design by Scott Rogers. Part of what I want to do as part of my Ph.D. is to define and further develop design principles for learning games.

Something I realized 2.5 weeks in is that if I don’t take time between research and coursework projects to work on personal & family goals then I don’t make progress my personal or family goals. The thing is research and school is that those things can balloon and take up all your time. It’s important to set appropriate boundaries for everything and not allow those things to consume your life unknowingly. With this in mind I was able to start making progress on personal and family goals as well which has made me feel better about my life overall since I am not ignoring important aspects of myself.

Finally, I finished my semester plan and have a clearly defined path to accomplish my goals this semester.

What’s next

Create a set of research questions for a systematic review.

Begin applying for outside funding.

Roadblocks

Adhering to my scheduled time blocks to accomplish different tasks. Issues here are: under/over estimating (mostly under) time it takes to accomplish tasks, unplanned activities (such as having to spend an extra hour getting somewhere, forgetting lunch, etc.), and burnout. The burnout bit is an issue for me when I’m working against a deadline and I’m sick of doing the task in front of me.

I think I have a solution, by switching up tasks, going for walks, taking time to eat, relaxing about perfectionism (which has been a big thing for me), but when you have to get something done and you need all the time you have been given to accomplish it burnout sets in…

This semester has also been a lot heavier on the reading/analysis then expected and not so much on math and programming. I have done little programming and not in any way that I truly enjoy, and I don’t have time to make games, which makes me sad. So yeah, burn out is an issue.

Game Dev Adventures!

Ph.D. Year 1, Week 1 – Starting a Journey, GBA Workshop

TLDR:

I survived my first week of my phd, read lots of papers, attended the first ever GBA workshop at which I met lots of interesting academics, industry professionals, and peers with similar research interests, and then slept a lot (#TravelWipesMeOut).

This week I will be writing up my Ph.D. overall goals and coming up with a semester research plan. (Plus of course my coursework, but that is implied.)

A roadblock would be the need for some read/want-to-read research paper organization system suggestions, and just waiting on research papers from my advisor and contact information for people at the GBA workshop.

The Full Story:

This past week, starting 2019-08-19, I began my long journey to doctorate at the University of Utah in the School of Computing. My Ph.D. is in Computing on the HCC, Human Centered Computing, track, with a research emphasis in educational games. I started the week by attending my courses and ended the week by attending the first of its kind, GBA conference at the University of Minnesota, which made for a great start to my professional academic career, and made me a little behind in my coursework. Aw, the life of a Ph.D. Student.

As first weeks go, it was very exciting, both on the new and exciting, and scary and near panic inducing ends. For instance, because of funding and for personal reasons I am taking a more course-heavy load than typical: in all I have five courses, with one being for my research and one a required seminar for all fellowship Ph.D.s in the school of computing. As a gameplay programmer enrolled in four cs courses I was a bit taken aback that only 1.5 of my courses will be requiring programming! For the most part I will be reading and analyzing research papers in my and related fields, studying from textbooks, a little bit of math, a little bit of programming, and adjusting as best I can to Ph.D. student life.

So far so good.

I have been warned repeatedly of the cycle of a Ph.D. journey, with all its highs and lows, and I believe I have gone through the cycle multiple times this week ending on a bit of a high note.

So far so good… 😉

GBA Workshop

The GBA Workshop was very well organized, especially considering it was the first one ever. There was research presented by people in academia (from the graduate to tenured professor positions) and industry, from different disciplines (from I/O psychology to cs), and different countries (mostly U.S. and European). It was great to mingle with people from so many different backgrounds.

My favorite presentation was by a Ph.D. student at Northeastern University, Chaima Jemmali, entitled “Insights on Debugging Processes of Beginner Programmers in an Educational Puzzle Game.” Her presentation was the only one that directly correlated to the kind of research and work I want to do with my background and degrees. Specifically, she designed and programmed the game by herself and then tested it, analyzed the results, refined her project, and presented her results: a validation for using games to teach programming. I spoke with her briefly after the conference (she didn’t speak until near the end) and I hope to get to speak with her more in the future.

Accomplishments

I didn’t give up! As an industry professional turned academic I didn’t believe my experience was valued in academia, but advise from my advisor was that I should wear my experience as a badge of honor, which I did. I found that at the workshop I attended my industry experience was highly valued. I had important experience to share that all could learn and benefit from.

My main goal at the GBA workshop was to network with my peers in multiple disciplines. The conference was very interdisciplinary. I met people from I/O psychology, game design, educational games, and the social sciences, as well as people from multiple different countries (majority representation from the U.S. and Europe from my limited sample pool). There were also industry and academic professionals as well as other graduate students, both MS and Ph.D.s. Again following the advice of my advisor, I never shied away from a conversation from my fellow students (my career-stage peers), nor from beginning or experienced career and academic professionals. It was a very good first experience networking in as an academic. I’d say I killed it. Perhaps in the future I’ll share some networking tips (both that I received and that I used from experience networking professionally).

I managed to stay afloat in course-work by waking up early in my second week to do catch-up.

I have read and listened to several research papers in my broader field of research interest.

What’s next

The major two goals I have this week are:

  • Write down my Ph.D. Goal – I can revisit/revise this idea each semester
  • Write down my semester plan.

The rest of these will be part of my semester plan, some to be accomplished this week

  • Create a list of 5-7 academic/professional conferences and workshops that are related to my field. Plan to attend 1-3 of them in the coming year.
  • Start organizing/recording the papers I have been reading so I can keep track of the important things I have read and ideas for future.
  • Discuss paper ideas with my advisor. Pick one of the paper ideas and begin background and supporting paper research.
  • Start preliminary process of applying for two grants that I qualify for.
  • Start reading papers directly related to my research interests.

Roadblocks

I have been directed to two different research paper managers – I would like some guidance on organization strategies so I can track important papers.

I am also waiting on some research papers from my adviser to begin reading research related to my areas of interest.

I am awaiting contact information for people at the GBA workshop. I brought my business cards, but some of the people I spoke with didn’t have one of their own and promised to contact me. I’ll follow up once I have their contact information from the workshop organizer.

EAE 6320-001 GameEngII Game Engine Project, Game Dev Adventures!

Final Project: Matching Game!

My FINAL game: simple one-click download below, unzip, play, enjoy!

NancyNewren_ExampleGame FinalProject!

What’s new
It’s a game!

Controls
Main object: Use arrow keys to move the 3D object to its matching card.

About the Game

Okay, so it’s not pretty, but sometimes you just need to get to proof of concept; beautifying the game can come later.

When I was making educational games for Waterford Research Institute I made a lot of mini games for preK curriculum: letter/word association, number recoginition, letter matching, and even an ethics game. I really enjoyed making these simple-to-play games for 4-5 year olds. They were fun enough that even my older play testers (20-year-olds) liked them. However I never got to make a shape matching game. But now I have!

This was fun to make, especially since it was in my engine, but slightly more complicated than I anticipated.

The first thing was paring down the game to its minimum essentials: for instance having animations wouldn’t matter if I didn’t have a game first. So what was essential? Well having four objects with four matching cards. Being able to detect a right and wrong guess, and upon such guesses having a response (moving onto the next object for the right guess, feedback to let you know it was wrong otherwise). Once that was determined I simply needed to set up the graphics objects and then create the basic right/wrong logic with a simple collision detection.

Everything we needed to draw to screen was done: but any game logic I had to write, though admittedly we had previously written the player controls and the essential game loop code (like the update functions in Unity) were already supplied previous to this final assignment.

I don’t think I had noticed previously how heavily a game relies on its graphics components though. Without those, regardless of any clever logic you may have written, you don’t have much of a game. And I think it took up a majority of my time to find, create, edit, and import into my engine all the assets.

Honestly I think the most difficult thing to do was just tracking all the different assets. In game engines such as Unreal and Unity it is easier to track them I think because there are prefabs and the editor to help you create your arrays of assets. However creating the c3DObjects class to manage all things for my 3D objects (mesh, effect, texture, transform, speed, and even id) made it much simpler to program the game. When I was trying to detect whether or not an object matched a card all I had to do was give them both the same id in their c3DObject instance. Which brings up something: the cards, though flat, were still meshes. As I didn’t want them drawn like UIElements, but to interact with the objects in world space, I had them as 3DObjects. The only thing I’d add to the engine would be a UIElement class (akin to the 3DObjects class, but fancier since I’d need to track scaling vs. anchoring, etc.), and the idea of prefabs. It’d really make things easier to track with those things in place. Well, I’d also add an animation project to make animations simpler too.

The only time that I wished I’d done something different in previous assignments was the way I stored graphics elements in my game logic. Before even started coding the game I did some refractoring in my game logic to make it easier to track my graphics elements.

I created two effects for right and wrong guesses that tint and make the cards transparent. Then it was a simple matter of just swapping out the regular effect (which everything 3D was drawn with) with a right/wrong effect. That decision also made it easy to animate the ending flash as I just swapped out right and regular effects. If I’d passed the color to the effect to draw right/wrong it would have affected all my objects, and not just the one I wanted to draw.

The other difficulty was randomizing the order of everything while keeping track of them! picking four (of seven) random objects to be the match objects, making sure the four card were the four matching ones, and then drawing the four matching cards in a random order on screen. Here’s how I chose my random objects:

The collision was interesting. I didn’t do what fancy game engines do: detect whether the bounding boxes have collided. What I did was much, much simpler! Knowing that my local meshes origins were all at the origin, this meant that their position were all in world space. And as I didn’t care when their boundaries collided, but rather when their local origins were within a certain range of each other, all I needed to do was check to see if a matching object was within a certain distance of the card. To further optimize, as square roots are inefficient, I only checked the distance squared, I only checked the player object against cards that hadn’t been matched, and didn’t check for collisions at any time when the player movemnet input was deactivated. I added the DistanceSquared method to the Math::sVector class.

float distSquared = eae6320::Math::DistanceSquared(i_pObj1->m_rigidBodyState.PredictFuturePosition(i_elapsedSecondCount_sinceLastUpdate), i_pObj2->m_rigidBodyState.PredictFuturePosition(i_elapsedSecondCount_sinceLastUpdate));

return distSquared <= m_distAmountSquared;

The last thing I did was add in the sprite images upon a correct solution. This had multiple purposes: 1) it hid the no longer drawn match object, 2) It hid the sudden movement of the next object to match to the starting player position, and 3) It gave some fun, and funny, feedback to the player that they are on the right track.

If I had had more time (I did this all in about about 15-20 hours), I would have added:

  1. Movement animations
    1. For instance: Locking the “match” object to the center of the card before checking for a match, then moving it back to the beginning
  2. Setting boundaries the player can’t move outside of
  3. Beautifying the game: better match object models and cards, a better background too
  4. Add fun audio
  5. I also really wanted to do lighting

I enjoyed how it turned out though, and so did my play testers. 🙂

What I learned this semester

What I think the goal of the assignments were

I think the most important goal of the assignments was to teach us what good interfaces can do for us. For instance once we set up our one interface which behind the scenes dealt with our different platforms, we didn’t write any platform dependent code. That is very cool! We didn’t have to think about what each platform might need, instead we only connected with our interfaces and let the interfaces do their job.

We learned about building good asset pipelines. At the beginning we only had shaders, but by the end we had textures, meshes, and shaders. We separated out our algorithms from the data. I really liked this (especially creating the binary files!). Doing this makes it much faster and easier to change our assets as data is easier to update than code, and doesn’t require a recompile! We only need the built asset and that can plug-in to our code.

Another big point was to write code that is human readable, understandable, and easy to debug. Ultimately, whether it is someone else or yourself, someone is going to have to read your code to understand how to code against/interface it. If the programmer can’t understand and debug your code (which is really sad when you’re the programmer in your own code and you can’t do this!)  they’re just going to have to either spend a long time to understand it or are going to have to rewrite it, which if it’s a large amount of code is going to take a lot of time. But if you make it human understandable then they should understand quickly what is being done in the code and should be able to code/interface with it quickly, which is very important!

What I got out of this class

I learned so much this semester. I used to always be scared whenever I had to set up build dependencies and references, what the differences were, and why they mattered. I never felt like I could do it on my own. But I don’t feel afraid anymore! In fact, I learned it well enough that I was able to explain to someone else the differences and help him troubleshoot his code, and to recognize when another of my classmates had done it incorrectly in his own code. I say that not to point out that he did something wrong, as we all make mistakes, but that I know enough to know when it is done incorrectly now. And that is also not to say that it’s always easy, but I feel confident that I can figure it out, and to NOT PANIC when I get linker errors! J

I learned…

A lot about graphics for a non-graphics class (I actually understand, on a very high-level, what the graphics card does now).

A more-different way to essentially have shared pointers without the overhead of shared pointers through reference counting.

Oooh, after class one day I asked JP about how shaders do absolute value so quick and so I became aware of the intrinsic functions of the graphics card.

Also, D3D has different debug output in VS than OpenGL.

The difference between handles and pointers.

A side effect of all that we did in the code for me was using the c11 standard as I’ve never worked on projects before that used it (we were in the dark ages I suppose 😉 ).

The, unfortunately short, discussion we had about lighting was very interesting. I hadn’t thought about digital lighting as taking away light, but it made sense.

I also think I would enjoy doing graphics more than I thought I would. Every time we got into talking about graphics I got really excited. The math is pretty basic, but can also be really interesting. I really thought I would hate the discussion on lighting, but I found it fascinating.

My thoughts on good engineering architecture and design

I usually like to try to play the line between very structured and “design as you go”. However I knew there would be a lot of refractoring from assignment to assignment and there’s nothing I hate more than having to undo complicated architecture, and since I also didn’t know what the end goal was, I purposely chose to play on the side of “design as I go.” Otherwise I would have drawn out a more architectured structure. There was only one assignment that I wished I would have architected more in a previous assignment, but even in that case my friend who chose more architecture in the previous assignment only finished about an hour before me, and I know he spent more time making the architecture in the first place. So it was basically a wash.

I’ll say this about good architecture: while I was programming my game I made a decision early on to have a GetMatchObject(const unsigned int i_index) and GetCard(const unsigned int i_index) functions. This made it so that later on when I changed how I retrieved cards I only had to change it in one place: my “interface” function.

A good software architecture allows for flexibility in adding new items to the code, but isn’t so abstract and complicated that it is unclear what the interfaces are good for. I.E. it’s easy to read, understand, and debug, and allows for quick and easy iterations.

A good design will be platform independent: so that you only have to write code once! A bad design will have multiple files with only small changes in each for every platform (whether the platform is OSes, websites, or databases). A good design will allow for quick creation of new types that fit into the same interface. A bad design will require a new object or interface for each new type. A good design is faster to refractor. A bad design requires gutting of the interior for even small changes. On the other hand, a good design also isn’t over-architectured either. For instance, there is no need to create a reusable interface (no matter how neat) if you are only ever going to have one type that uses that interface. Good design is about being aware of the parts of code that need to be reusable, what needs to be able to be interfaced, and what can be done top-down as it were, because it’s not going to be used more than the once.

Acknowledgements

Thanks to Zeno for letting me bounce ideas off of him, and my Dad for proofing my write-up.

Many thanks also to my play testers who really just had fun playing: Zeno Saviour, Monika and Erik Tolman, my sister Deborah, and my brother Zeke (who tested it on linux with wine and it worked!).

EAE 6320-001 GameEngII Game Engine Project, Game Dev Adventures!

Assignment 14: Transparency in Meshes

This week’s game: simple one-click download below, unzip, play, enjoy!

NancyNewren_ExampleGame 14

What’s new
I added two transparent objects!

Controls
Main object: Use arrow keys to move main object left/right/up/down
Camera:  
Left/Right (A/D), Up/down (W/S), Zoom in/out (Q/E)

(When moving the camera things in the world will appear to move opposite. Thus when you move camera left, the world will appear to move right.)

 About the Project

This time around I added the ability to become transparent to my meshes! It was fun.

First thing was to create a shader and an effect to allow for transparency. Next I created two objects drawn with them, but drew the meshes in whatever order they were submitted to the render thread. This works fine for opaque objects, However for transparent objects when a transparent object is drawn in before an object behind it is drawn, the object behind it isn’t drawn properly (as expected that is) to the screen. I.E. you can’t see the object behind a transparent object if that object isn’t drawn before it.

This means that all transparent objects have to be drawn back to front. The order of the opaque objects doesn’t matter though (with depth buffering on at least), as long as they are drawn before all transparent objects.

So what I did to order the draw calls is: after submission to the render thread is over and and before the swap, I ordered the draw calls. How? First thing: I added the index of all opaque objects (I just asked the mesh’s effect if it was opaque, nicely of course) to a vector in the order they were submitted, and then put the transparent meshes in a separate vector with their index and their camera space z value. This is the key to quickly sorting these meshes: in camera space I immediately know which meshes are in the back and in the front based solely on their z values since camera space is when the camera is at the origin and is facing forward. Then a simple std::sort with a lambda function that orders the z’s based on z forward being negative z (i.e. larger values of z aren’t closer to the camera, they are the farthest away), quickly sorts those values. Once sorted I added the index values of the sorted transparent meshes to the end of the previously mentioned vector (the one with the opaque meshes all in front to be drawn first.) Then in the rendering of the meshes I draw them in the order of the sorted draw calls.

I chose the render thread because with my game it doesn’t really matter which thread does the sorting because it’s such a small game. However, in a real game I would profile both threads and then choose the thread that takes the least amount of time.

 Acknowledgements

I asked my brother how to use the std::sort with my vector<struct> as I hadn’t done a templated sort before . He set me on the path with the google search I needed and I whipped out a lambda compare for my sort in no time.  Thanks bro!