Page 1 of 6

Attack on the Forest

Posted: July 27th, 2017, 9:05 pm
by Zedtho
Hi again! I've been working on another project, taking a break from Simon Says, to work on an (at the moment) small PVE game. I had the idea for a while, but then Arkhayla (Terraria Developer) challenged me to do it, after that I made fun of Stardew Valley's fighting mechanics. The name of the game will really only make sense after a while when I start turning it into a PVE, wave-based game, but my prior task should be to get the PVE system going.
In this project I want to try get everything very object-oriented and try out states and how to make animations. Also, I haven't done a lot with collision boxes yet, so that should be interesting. Also, I think this is the first program I make that'll need proper github work, which is what I've been avoiding, looking forward to that :(.

I'll post the first version of the PVE game as soon as it's ready. At the moment the thread is just here to get my upcoming bugs squashed.

Re: Attack on the Forest

Posted: July 28th, 2017, 12:59 am
by albinopapa
[quote="Zedtho"to get my upcoming bugs squashed.[/quote]

Lol, I like it.

You should check out my Animated Sprites for the Chili framework? if you are wanting to do animations before chili covers image loading et al.

Re: Attack on the Forest

Posted: July 28th, 2017, 6:32 am
by Zedtho
Oh yeah, I should definitely do that! That came just in time!

By the way, how will I do the textures? I've been making them in MS Paint, but I've got a feeling that that isn't the best way of doing things.

Re: Attack on the Forest

Posted: July 28th, 2017, 7:10 am
by albinopapa
I'll have to test some sprite sheets to see how that works, but the project should be able to load BMP, JPG and PNG files. Right now, the Sprite class will load the whole image, so if it's a sprite sheet, you'll have to calculate where to draw from for each "frame". The AnimationController takes in a Frames object. The Frames object is currently designed to load in image series; image00.png, image01.png, etc, not chop up a sprite sheet.

If that's what you're after, you'll either have to wait until I get around to coming up with something, or create your own class that takes a Sprite object and creates a Frames object from all the different tiles OR a class that stores a Sprite object and based on position and orientation calculate which pixels to draw from that Sprite object.

There are four versions of Draw functions, two pairs of normal and reversed ( mirrored ). One set is designed to draw the entire sprite, the other is designed to pick a rectangle of pixels from the sprite. You'd want to use that one if you are using sprite sheets and don't want to or can't make a class to chop up the sprite sheet into individual sprites.

I wasn't thinking of sprite sheets when I made the classes as you might can tell. I'd have to add a few functions here and there to at least the Frames class and the Sprite class to allow such an intermediary class to chop up a sprite and produce a Frames object.

Let me know how I can help and what I should add. If you come up with something that you'd like to add to the project, post the files here or if you are savvy enough with GitHub,
  • fork the project into your account
  • add the stuff you want to add
  • push the changes to your GitHub repository
  • Create a pull request, comparing against the branch in my repository that matches the one you were working on
  • Let me know you sent the pull request here on the forums ( I don't check email much )
About the pull request:
Say you made a new branch created from my Camera branch. When you create the pull request, it will ask you to compare your branch with one of yours or one of mine, if you forked from mine. Choose the Camera branch from mine to compare it to. What this does is it shows changes and additions that you have made. This way I can see the changes directly and not have to hunt them down.

Re: Attack on the Forest

Posted: July 28th, 2017, 9:58 am
by Zedtho
Thanks Albinopapa for the info :D.

Currently working on some sprites, need it to be a little bit eerie, I guess

Tips as to how I should do that would be nice. . At the end I'll need such trees filling a 1920x1080 space. Currently, this tree is about 100 pixels wide, but will probably make it 200 pixels wide or else there'll be a lot on the screen. I'm still using MS Paint for this, by the way. I've been told shading in Photoshop is a lot better, don't want to cash that much money out though. Does anyone know any alternatives to Photoshop?

Re: Attack on the Forest

Posted: July 28th, 2017, 4:50 pm
by albinopapa
The Gimp is free and it's like Photoshop.

Re: Attack on the Forest

Posted: July 28th, 2017, 6:12 pm
by albinopapa
Tree.png
Here's an example that is rendered from the program
Tree.png (17.01 KiB) Viewed 4192 times
Found this little program that will generate trees for you, looks pretty cool.
Tree[d]

Re: Attack on the Forest

Posted: July 28th, 2017, 6:22 pm
by albinopapa
You can render 128x128, 256x256 or 512x512 images into PNG format so it keeps the alpha channel.

You could also try figuring out Blender, it's a free 3D rendering software. You can export the tree objects from Tree[d] then import them into Blender to render the image.

I use a free software called DAZ3D for rendering stuff. The animation of the women walking in my animated sprite project was animated and rendered using DAZ3D. The software is free and comes with some free content, but you have to look for other free content or buy content. Most Poser content on the internet is compatible with DAZ3D and the sites usually say if it is or isn't.

Another free 3D modeling tool is Wings3D. You can use it to create basic models with textures. It doesn't have bones or anything, so you'd have to import the object into another software for that. It's pretty basic, there are few bells and whistles so everything needs to be done by hand. I found it easier to use than blender though.

Re: Attack on the Forest

Posted: July 29th, 2017, 5:14 pm
by Zedtho
Awesome, will definitely check that out, thanks a lot for helping people out! I've been trying to get the hang of Gimp for the past hour. Seems to be going fine. I'll continue working on the game soon but want to get Albino's animation and sprite stuff going first :D. Here's another tree, the last one I make in paint (hopefully).

Re: Attack on the Forest

Posted: July 29th, 2017, 6:54 pm
by Zedtho
I also added the current "game" if you would call it that to the github. It's nothing more than a few squares that can attack eachother at the moment really. I'm mainly asking for feedback on how I'm handling states at the moment. https://github.com/Zedtho/Attack-on-the-Forest

Also, I'm wondering how I should handle Swords and fighting items in this game. Currently, it's being handled by taking a Damagevalue from the user and applying it to the Entity in a function inside Game.cpp. I have a feeling this should be done inside the User class though. Also, I want to keep the possibility for different weapons later on in the game open, so if you have an idea on that, any information would be awesome.