Author Topic: Game Design Megathread  (Read 555514 times)


I'm interested in the particular details of how dialogue definition works in your game, whether it's done with a loaded .txt file (or similar) in a specific format, or if you're using language constructs, such as sequenced classes with methods to perform different actions in the scene. Cutscene implementation is one of the more difficult yet arguably fun things to get right.
yeah i'd like a lil overview too

The code to start the cutscene looks like this (C++):
Code: [Select]
// start a test cutscene
cutscene::data::segment seg;
std::vector<cutscene::data::segment> dataVec;

seg.displayedText = "* [a:jitter]This is test speach.[a:none] It will probably[c:ff0000] NOT [c:ffffff]appear anywhere in the game.";
seg.portraitTexture = "ui_portrait_bones";
dataVec.push_back(seg);

seg.displayedText = "* Notice how the camera moved up just now? That's because of cutscene settings!";
seg.displayAtTop = true;
seg.portraitTexture = "ui_portrait_bones";
seg.focusOffset = sf::Vector2i(0, -256);
dataVec.push_back(seg);

seg.displayedText = "* It's all very clever!";
seg.displayAtTop = false;
seg.portraitTexture = "ui_portrait_bones";
seg.focusOffset = sf::Vector2i(0, 0);
dataVec.push_back(seg);

seg.displayedText = "* You can even display text that accepts itself, if you want...";
seg.portraitTexture = "ui_portrait_bones";
seg.waitTime = 4.f;
dataVec.push_back(seg);

seg.displayedText = "* Closing in 3";
seg.portraitTexture = "";
seg.waitTime = 1.f;
seg.textSpeed = -1.f;
dataVec.push_back(seg);

seg.displayedText = "* Closing in 2";
seg.portraitTexture = "";
seg.waitTime = 1.f;
seg.textSpeed = -1.f;
dataVec.push_back(seg);

seg.displayedText = "* Closing in 1";
seg.portraitTexture = "";
seg.waitTime = 1.f;
seg.textSpeed = -1.f;
dataVec.push_back(seg);

cutscene::data cd;
cd.segments = dataVec;

// call func
startCutscene(cd);

Anything inside []s is a "tag" and is hidden and processed. If the program understands it, it'll change the per-letter rendering settings.

i've been working on a video game!!!!!!!!!!!!!!!! it's really early on but i have some Real Shizzle working now

https://dl.dropboxusercontent.com/s/bmtykz0ajlky88l/2016-04-18_23-33-17.mp4

ooo, nice otto


that's like a ton simpler than i would have over-engineered it haha

that's like a ton simpler than i would have over-engineered it haha
I love to over-engineer simple things

also nice otto, but I had no idea wtf was going on at first lol

I'm working on a remake of the classic LEGO LOCO, adding some new features while I'm at it. I've realised a problem, however:



What you're probably noticing, aside from the disgusting colours (to keep me awake) is the amount of "skipping". In LOCO, you can hold the mouse button down and drag to create a line (or just paint an area, sort of like using a 1px brush in Photoshop). Because LOCO is a 2D game without frame-limits, it updates really loving quickly which means it can capture the mouse constantly. Unity, however, is a proper games engine that is constrained and can really only read the mouse once per frame (generally at a frame-rate of 60FPS). What you get is the mouse only reading 60 times a second, so if you move your mouse really loving quickly, the mouse will "skip over" units before its next checked.

I'm wondering how to solve this; you can see that it does appear in LOCO (look at some of the centre lines) but nowhere near as much and thus looks more polished. I could try line-approximation, where I compare the start of a click-hold to the end of a click-hold and then fill in the line between the two points, but this would only work for dead-straight lines on the horizontal or vertical. I could increase the size of the units by zooming in the camera, but that might be a bit annoying for the player. I can't lock the mouse-axis because Unity doesn't allow loving with the cursor position.

Anybody have some suggestions? It's not a huge problem, but it looks kind of crap and I'd certainly like to do something about it.

EDIT: And just to confirm, moving the mouse slow does create straight lines without skipping, but I feel that telling the player to "slow the forget down" is really just a workaround to the issue.
« Last Edit: April 19, 2016, 07:16:00 AM by McJobless »

Make a line from the last known mouse position to the current one and fill all tiles it crosses?

Make a line from the last known mouse position to the current one and fill all tiles it crosses?
That's not bad at all, assuming I can work the maths out (it'll make for a nice programming challenge). I'll post results once I've got it working. I just wonder how it'd handle scenarios like if you try to draw in a circle or something similar.

https://youtu.be/bRcrpOLtfwc?t=20s

unity is a magical thing
also don't ask why it takes so long for it to start, gifcam was being a richardwad

https://youtu.be/bRcrpOLtfwc?t=20s

unity is a magical thing
also don't ask why it takes so long for it to start, gifcam was being a richardwad
Lol you remade it in Unity?

Lol you remade it in Unity?
well i had the chance and i took it

Menus are now magicText, meaning you can do stuff like this:


Also, we have new art:

Menus are now magicText, meaning you can do stuff like this:

what does "magicText" mean, and what part of that is the stuff it enables you to do?

what does "magicText" mean, and what part of that is the stuff it enables you to do?
magicText = text that is batch drawn but can have "tags" inside that change formatting and allow for animations and other cool things.