• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
  • entries
    707
  • comments
    1173
  • views
    432773

I broke it...

Sign in to follow this  
Followers 0
Programmer16

812 views

Well, if anyone downloaded v1.0.7, you'll probably notice quite a few issues. The whole 'not serializing node links' issue that I fixed...wasn't completely implemented. I added the code to load the nodes, but never added the code to save the nodes. So, if you saved and then tried to load it would crash.

I also managed to make it so you can't start a game, save, exit to main menu and start a new game.

Both of these issues have been fixed. I've also located the issue with the lag; it's the same bug that I thought I fixed back in May. Coroutines are getting caught in the system and it is causing XNA to start calling update or draw in fast succession. I'm working on fixing this now.

I'm working on the lag issue now. Once I have that resolved I'll upload a new installer. A big thanks to Raymond Jacobs for trying the game out and helping me identify these new issues.

[edit]
It looks like the loading of scenes is taking just long enough to screw with XNA, causing it to call multiple update and draws to catch up. I have two options:
1) Disabling the fixed timestep seems to fix the issue.
2) Off-load this some so that it is done asynchronously. If it starts to take too long, I can have a loading message/screen pop up.

The latter seems like the better choice, but honestly it would be more of a nuisance in my opinion. Basically the loading screen would pop up for literally a second at points.

I'll think it over and see what I can come up with.
[/edit]

[edit]
Ok, I think I have it fixed. I've completely rewritten the coroutine system. I'm not sure if you remember me posting it earlier this year, but it was very very naive. Most of it was handled via runtime script generation and I really just cobbled it together to get it working. I have completely removed the script generation and implemented a nice new class-based implementation that uses variable arguments and unpack. It is still using my CoroutineTable C# class, but I'm thinking tomorrow I can quickly remove that completely since there is no longer any script generation. Then I can just add some extension methods to Lua and I'll be good to go.

I've also figured out a new bug that I've been seeing pop up here and there, but absolutely could not figure out. Every now and then I'd hold down the mouse button to select my verb and I would be selecting a verb for some other object. I do it quite quickly, so I couldn't really catch what the object actually was. Turns out, I'm apparently forgetting to nullify the object that you're hovering over at some point. So, if you hover over an object, move off of it, hold down the mouse button and then move it over a different object, you'll be selecting a verb for the original object.

I'm off to bed now; I'll test some more to see if the lag issue is resolved and I'll post an updated installer once I have the bugs I've found cleaned up.
[/edit]

1
Sign in to follow this  
Followers 0


6 Comments


[quote name='Black-Rook' timestamp='1350701566']
How did you find the slow down issue??? I know when I played the game I couldn't even detect any delay or FPS drop.
[/quote]
It wasn't easy lol. I was originally thinking it wasn't much of an issue since I was the only one that seemed to be having the problem. However, Raymond played through and had issues as soon as he climbed out of the bathroom window. He also said it basically just kept getting worse.

Since it only happened to me if I did a full play through I had to play through it about 30 times in a row, stepping through different parts with the debugger XD. In the end, I added some debug output at a few different locations:
1) Each Update() call
2) Each Draw() call
3) Each coroutine resume call

I then waited for the lag and read through the log and I realized that it was calling Update() or Draw() multiple times in a row (skipping one or the other.) I'm looking through the loading code to see where the bottleneck is; there really isn't that much being loaded.

I'm thinking that setting up a loading screen and popping the loading code into a thread would be the best way to go. Still doing some troubleshooting though.
0

Share this comment


Link to comment
Strike that, it's not the loading code. The scene that I get the lag on actually takes considerably less time than the rest. Now I'm completely baffled lol.

I think it may have something to do with the coroutines. I've altered the engine so that it stops all coroutines when changing a scene and the lag (at least for me) is basically gone; the cursor hangs for literally less than a second now. The funny party is that I don't see any extraneous coroutine updates during the lag. Maybe it is something in the Lua state that is causing it...
0

Share this comment


Link to comment
[quote name='Arthur Souza' timestamp='1350704842']
Have you used a profiler to actually analyze what parts of the code are taking more time / more cpu?
[/quote]
Yup; the problem is that is coming from within my Lua scripts which aren't getting properly profiled. I've narrowed it down pretty far now; it has something to do with my coroutines and how I'm managing them.
0

Share this comment


Link to comment
I think I have it resolved; I've rewritten how the coroutines are handled and I'm no longer getting the lag. I'm going to test tomorrow and see if Raymond can test again.

Thanks for the comments and input guys!
0

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now