Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411485 Posts in 69371 Topics- by 58427 Members - Latest Member: shelton786

April 24, 2024, 07:59:20 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsRe:creation - action adventure game about undeads
Pages: 1 ... 4 5 [6] 7 8 9
Print
Author Topic: Re:creation - action adventure game about undeads  (Read 27443 times)
eliasdaler
Guest
« Reply #100 on: March 06, 2016, 12:29:10 PM »

New dev log. January-February 2016.
Here's a new dev log! It talks about the stuff that I did in the last two months.
Some of the stuff I've already posted there, but there's also new stuff!
Here's one of the new screenshots which I haven't posted before.

I'm pretty satisfied about the progress in the last few months. It may not seem that big from the outside, but the changes and improvements I make are making my engine and game a lot better.
There's also a lot of unfinished / spoiler-y stuff I've yet to show.
What do you think about my progress? :D
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #101 on: March 07, 2016, 01:00:57 AM »

I like how the ghost lives in the gut Tongue
Logged
eliasdaler
Guest
« Reply #102 on: March 08, 2016, 12:15:13 AM »

I like how the ghost lives in the gut Tongue
Gut feeling... :D

I'm working on depth and height in the levels and the progress is great so far.
Check out how one of the sides of the platform is not seen when it reaches the lowest point.

I've tested some of the stuff in lots of SNES top down games and it seems like they use the same method that I use: some tiles are just drawn on top of other tiles. The rules of this are not trivial, so I'll probably write an article about it later. More height updates soon!

Btw, here's an awesome chibi Renatus which my GF drawn. It's the first fan art for my game ever. So cool :D


And I've just realized that I forgot to tell you that the protagonist has a name, Renatus! So, here it is :D
The name will be customizable for laughs.
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #103 on: March 08, 2016, 12:21:11 AM »

My mind can't decide if the platform is moving in the Y or Z-axis.

Cute fanart!
Logged
eliasdaler
Guest
« Reply #104 on: March 08, 2016, 12:42:51 AM »

My mind can't decide if the platform is moving in the Y or Z-axis.
It's Y axis. I should work on the art more. If the vertical tiles were better, it would be more readable. (maybe having a bigger gap between two sides would help too :D)
Logged
eliasdaler
Guest
« Reply #105 on: March 08, 2016, 08:26:19 AM »

And here's what I did with tiles... Now the height totally works! I'm very excited about it because I couldn't figure out the way to do this stuff for two days. And there weren't any articles which could help.

I still need to add shadows to make it look more cool, but you get the idea. I'll also add jumping down (and falling!) later.
I'll also write an article about how to do this stuff. It's pretty complicated, so it's worth talking about it in depth. Smiley
Logged
eliasdaler
Guest
« Reply #106 on: March 10, 2016, 03:22:39 AM »

3d stuff update! I can now make levels with height in my level editor!


The gif that was posted previously wasn't using "true" height, the height was emulated by drawing some tiles above everything with less Z. But now I've realized that I can make levels with "cubic" tiles, which kinda work like voxels. It makes collision detection and height stuff much easier.
I'll write about how drawing algorithm works a bit later, because there's so much more stuff I have yet to do and improve. Hopefully, it doesn't suck in the end. Smiley

(Btw, the tiles don't look very well without outlines and shadows and that's something I'll work on in the future)
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #107 on: March 10, 2016, 04:07:14 AM »

I wonder if you could use tile bitmasking in a voxel context; could make things easier for you in the level making department.

Or it could cause you to spend days on an automation solution that doesn't save you those days of work Tongue
Logged
eliasdaler
Guest
« Reply #108 on: March 10, 2016, 10:30:37 PM »

Yeah, this may be useful. I'll try to implement it when I have time because I still had to do lots and lots of stuff :D
Logged
eliasdaler
Guest
« Reply #109 on: March 13, 2016, 11:52:48 AM »

I've been checking out Dear Imgui which is a very nice immediate mode GUI library which lets me write GUIs for debugging and level editor very easily. I just started using it and implemented my old level editor interface in 1-2 hours! (And improved it a lot in the process, the old one didn't have as many cool things!)

I'll write more about experiences with it later, but currently all I can say is this:
Here's all what I have to do to add working checkbox to the window:
Code: (cpp)
ImGui::Checkbox("Show grid", &showGrid); // showGrid is bool
Isn't it cool? :D

And I also have a problem which some of you may help me solve...
So, my drawing algorithm currently works like this:
Code: (none)
prevZ = -100
(for each visible tile row) {
   (for each z in row's zs(height variation in row)) {
        draw sprites which lowest Y point is on the row and which have z between prevZ and current Z
        draw tiles with current Z
        prevZ = current Z
    }
}
This gives me correct Z order for everything.
The problem I currently have is that drawing tiles individually is quite slow and I can't really use VertexArray in this case it seems (unless I have VertexArray for each row and z... don't think it will help much). So, does anyone have any ideas how I can improve this?
Logged
eliasdaler
Guest
« Reply #110 on: April 12, 2016, 02:01:54 AM »

Progress update
Studying continues...

Not a lot of time to work on the game, but I managed to work on level editor for some time and implement some cool stuff with ImGui:

There's a room for improvement, of course! For example, adding a small preview for each entity in Entity Creation tab.
I've also drawn some new cool stuff but I'll show it once everything is completed.

I've also made a repository which contains the code which I use for ImGui. The related discussion about it will be here:
http://en.sfml-dev.org/forums/index.php?topic=20137.0
Logged
eliasdaler
Guest
« Reply #111 on: May 07, 2016, 09:09:39 AM »

I'm back again! While I was busy studying I've had some time devoted to the game and I'll have more of it in the next months, so the progress will be faster hopefully. Smiley

Here's the latest screenshot from the game!

As you can see, there are some new graphics there. Houses were previously just sprites, but now they're created out of tiles which makes creating new variations of houses much easier! Their proportions changed too.

I've also redrawn main character sprite which is more undead-y and has a lot more detail in it!

I've also worked on the level editor a lot. (click or zoom in to view in better resolution)

Now I can add tile overlays which makes creating combinations of tiles easier and lets me greatly reduce the number of tiles in tilesets. This makes creating more interesting levels and changing/reusing graphics much easier!
I can also set z-levels for tiles now which determines drawing order (for example, if the tile has z = 1 then all entities with z less than 1 will be drawn below the tile).

One interesting change in code I've done was using std::stringstream to parse bitmap font config files (BMFont format) and level files which reduced loading times a lot (not like it was very high, hehe).  Previously I had a function which worked like this:
Code: (cpp)
auto tokens = splitString("firstToken,secondToken,thirdToken", ','); 
// returns std::vector<std::string> with "firstToken", "secondToken" and "thirdToken" in it
for(auto& token : tokens) {
   ... // do something
}
This function used stringstream internally but it was still much slower than this code:
Code: (cpp)
std::stringstream ss(str);
std::string token;
while(std::getline(ss, token, ',')) {
    ... // do something
}
There were thousands of splitString calls during level/bitmap font loading, so replacing it with a better solution improved perfomance a lot.
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #112 on: May 07, 2016, 10:57:35 PM »

Nice update of the main character! The old one reminded me more of The Scream by Munch - might still want to keep that look for when he's "ghostly"
Logged
bbtombo
Level 1
*


lvl 2 spellcaster


View Profile
« Reply #113 on: May 08, 2016, 07:45:56 PM »

damn, i really like this concept, i'll be following  Gomez
Logged

eliasdaler
Guest
« Reply #114 on: May 08, 2016, 11:43:14 PM »

Nice update of the main character! The old one reminded me more of The Scream by Munch - might still want to keep that look for when he's "ghostly"
Thank you! For now I won't change the ghost look as I'm pretty satisfied with it. Smiley

damn, i really like this concept, i'll be following  Gomez
Thanks! Glad to have you following the thread. Smiley
Logged
Terrytheplatypus
Level 0
***


View Profile
« Reply #115 on: May 09, 2016, 01:59:25 AM »

i like the aesthetic and the tools you've made, nice stuff! just one thing, I've just started trying to make games with sfml, is there a way to compile a program in windows so it wraps all the images and the dlls inside the .exe? I'd be fine with releasing a game with a folder of data stuff, but it would be nicer if it was one .exe.
basically, do you have it like that, and if so what do you do?
thanks
Logged
eliasdaler
Guest
« Reply #116 on: May 10, 2016, 03:36:02 AM »

i like the aesthetic and the tools you've made, nice stuff! just one thing, I've just started trying to make games with sfml, is there a way to compile a program in windows so it wraps all the images and the dlls inside the .exe? I'd be fine with releasing a game with a folder of data stuff, but it would be nicer if it was one .exe.
basically, do you have it like that, and if so what do you do?
thanks
Thanks! Smiley

You can put SFML code in your exe by compiling with static libraries. As for images and other resources... I don't really know the way to put it into .exe, but generally they're either put into some folder (I do this right now) or it's put into .zip and then put to some "resources" folder.
Logged
eliasdaler
Guest
« Reply #117 on: May 14, 2016, 01:30:23 PM »

Progress update! (very excited about it)

A long time ago I've written serialization system which was used for my Qt animation editor. But now I've expanded it immensely and remade most of it in ImGui! (still hard to believe I did it in just one day)

Here's how serialization code looks:
Code: (cpp)
void Animation::registerClass(MetaBuilder<Animation>& builder)
{
    builder.add("name", &Animation::name);
    builder.add("looped", &Animation::looped);
    builder.add("frameCount", &Animation::frameCount);
    builder.add("frameRect", &Animation::frameRect);
    builder.add("frameTime", &Animation::frameTime);
    builder.add("offset", &Animation::offset);
    builder.add("offsets", &Animation::offsets);
    builder.add("frames", &Animation::frameRects);
    builder.add("sounds", &Animation::soundInfo);
}
The ImGui window is composed by using info from Meta<T> class and each type has specialized element for displaying and editing it! (Bools have checkboxes, sf::Time has InputInt with ms label etc.)

But that's not all. I've previously had some problems with circular dependencies which prevented me from making recursive serialization, but now I've solved it! I can also serialize some STL containers (vector, map, unordered_map) and some SFML stuff (Vector2<T>, Time, Rect<T>)

Here's what I can do. Suppose I have a classes A and B.
Code: (cpp)
struct A {
   std::unordered_map<std::string,B> bs;
}

struct B {
    std::string name;
    int age;
}

Here's how A registered:
Code: (cpp)
builder.add("bs", &A::bs);
And here's how B registered:
Code: (cpp)
builder.add("name", &B::name);
builder.add("age", &B::age);

Suppose there's an instance of A like this:
Code: (cpp)
A a;
a.bs = {
    "first_key" = B{"John Smith", 28},
    "second_key" = B{"Jane Doe", 34}
};
And now I can serialize any instance of A to json by just doing this:
Code: (cpp)
Meta<A>::serialize(a);
This will return this JSON:
Code: (none)
{
    "first_key" = {
        name = "John Smith",
        age = 28
     },
     "second_key" = {
        name = "Jane Doe",
        age = 34
     }
}
Here are two things to note:
unordered_map is serialized into a JSON map. Each value of the map is serialized by using Meta<B>::serialize (that's where recursion comes in!)
For defined types (int, float, bool, string, etc.) there are Meta<> specializations, so recursion stops there.

Same stuff works for ImGui almost the same, but the neat thing is that I can map each member directly to a GUI control by passing a pointer to the member into ImGui function. There's no copies, no temporary objects. The C++ object is modified directly. And this is really great and awesome!

And here are some questions I have...
1) How should I handle error handling? Should I throw exceptions? I want to be able to write error messages like this: "Error: Animation::name should be string, but int was passed" if JSON is incorrect. Should serialize/deserialize throw exceptions like this? (Right now I only return true if deserialization was successful and false otherwise... which is not great, of course!), or maybe there are other ways to handle errors... (Silently ignoring them is not the way!)
2) Is there any reliable way to create function for template class which will be called on template class instantiation?  Is such thing possible? How can I achieve it and be sure that static members are initialized at the point the function is called?
For example, I write this function:
Code: (cpp)
void Animation::registerClass(MetaBuilder<Animation>& builder)
and I want it to be called automatically by Meta<Animation> class. I want this to be called automatically because of Meta<T> instantiation:
Code: (cpp)
Meta<T>::init() {
    T::registerClass(MetaBuilder<T>());
}

P.S. All meta stuff code will be open sourced soon! I'll also show how to use ImGui with it a bit later. Smiley
Logged
eliasdaler
Guest
« Reply #118 on: May 31, 2016, 02:49:07 PM »

Here's how my animation editor looks now:

Animation properties part is generated with Meta stuff and directly maps widgets to C++ variables, which is pretty cool and shows that spending some time on all this template stuff was useful. Smiley
I also wrote the tutorial about how to use ImGui with SFML which some of you may find useful. Smiley
Logged
wizered67
Level 1
*


View Profile
« Reply #119 on: May 31, 2016, 04:12:14 PM »

This looks like a really fun game Smiley Following and can't wait to play!
Logged
Pages: 1 ... 4 5 [6] 7 8 9
Print
Jump to:  

Theme orange-lt created by panic