Attack on the Forest

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Attack on the Forest

Post by Zedtho » July 27th, 2017, 9:05 pm

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.
Last edited by Zedtho on July 28th, 2017, 8:16 am, edited 1 time in total.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Attack on the Forest

Post by albinopapa » July 28th, 2017, 12:59 am

[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.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Attack on the Forest

Post by Zedtho » July 28th, 2017, 6:32 am

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.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Attack on the Forest

Post by albinopapa » July 28th, 2017, 7:10 am

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.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Attack on the Forest

Post by Zedtho » July 28th, 2017, 9:58 am

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?
Attachments
Tree Version 3 (Smoothed out 2) (Cropped).png
Tried smoothing it out a bit
Tree Version 3 (Smoothed out 2) (Cropped).png (2.77 KiB) Viewed 4195 times
Tree Version 1 (Cropped).png
original tree, this is all obviously subject to change
Tree Version 1 (Cropped).png (1.97 KiB) Viewed 4196 times
Tree Version 2 (First Eerie attempt) (Cropped).png
Changes to first tree
Tree Version 2 (First Eerie attempt) (Cropped).png (2.61 KiB) Viewed 4196 times

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Attack on the Forest

Post by albinopapa » July 28th, 2017, 4:50 pm

The Gimp is free and it's like Photoshop.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Attack on the Forest

Post by albinopapa » July 28th, 2017, 6:12 pm

Tree.png
Here's an example that is rendered from the program
Tree.png (17.01 KiB) Viewed 4181 times
Found this little program that will generate trees for you, looks pretty cool.
Tree[d]
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Attack on the Forest

Post by albinopapa » July 28th, 2017, 6:22 pm

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.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Attack on the Forest

Post by Zedtho » July 29th, 2017, 5:14 pm

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).
Attachments
Tree Version 4 (More leaves version of 3).png
Tree Version 4 (More leaves version of 3).png (3.13 KiB) Viewed 4162 times
Last edited by Zedtho on July 29th, 2017, 7:37 pm, edited 1 time in total.

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Attack on the Forest

Post by Zedtho » July 29th, 2017, 6:54 pm

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.

Post Reply