Support Me on Patreon

Thursday, July 11, 2019

Can't have lag from adding objects if you don't add objects.

There are many sources of lag in games. Most notable is skeletal animations. Loops, print statements, and loops with print statements can also add up. One thing most new developers don't notice, is that adding and removing objects can get heavy for lots of objects. Sometimes you have to add objects, like critters and bombs.

Of course, some objects warrant particle effects or sound effects when they hit. Objects, like bombs, don't usually stick around to play audio or particles.Removing objects early can truncate these effects, and programming a wait timer is something I'm too lazy to do.

You could always add the effect or sound objects and remove them after, but let's keep them in the scene. Better yet, add about 5-10 of these setups to the scene; inactive. Make a global variable in a pre-load script to keep track of which FX setup you are going to use. Before the attack/grenade/ammo is removed, move the current FX setup to the current object and activate it. Leave it there and update the current FX variable for the next FX setup.

By the time you loop through the setups, the first one should be done and inactive. Keep moving and using the setups as needed. Shuffling objects or setups can help for anything and reduces load since you don't keep adding these objects. You could even shuffle raindrops around the player for the illusion of rain if particle effects are unavailable or unusable for rain (some don't handle collisions and rain could clip indoors).

This option works for any kind of visual effect, from gunshots to bullet holes. Keep several in the scene and move them around / make them visible/active as needed.

Monday, July 8, 2019

This Post Sucks.

I was going to enter Adventures' EDGE into the fragment jam, but it does not qualify. None of my unreleased projects could be made ready in two weeks; except one. Using simple vacuum mechanics and a first-person view, this project could see a simple demo quickly. After, there will be enough of a mechanics base to quickly flesh a small game. There is a private collection on open game art just for this project.

The idea was to take some simple mechanics and a few things from AE and prototype a game. Then I'd use the curated collection from OGA to quickly pull together maps and content. After release, I'd upload any assets I'd made to OGA and make the collection public. There is a problem though, two actually.

My project qualifies for an unofficial OGA jam and stress causes chest pain. Add a busy week to that and I'm not sure how much I can get done. Yes, I want to see how much stress is debilitating, no I haven't got the resources for medical help. I'll shamelessly plug my Patreon page here, in case anyone wants to support my endeavors.

This year's plans include:
Completing Both games
Getting health insurance
Attaining some kind of income
Removing the useless things in my life
Or removing the life from the useless things

Actually, the vacuum mechanics are done and I'll be working on storage, water, and plant growth.

Friday, June 28, 2019

Map Hatter

The majority of the maps have been made for Adventures' EDGE. Since the player is in every map, I had to position them at the correct entrance. Therefore, I grouped the exits in pairs. Both exits to and from a map share the same group and have a node that I place the player at on map load.

First I gave each exit a letter in an exported variable, then I grouped them based on that letter (Groupa, ect.) and renamed the variable to the group. As you go through the exit, it will set the current map and exit to the values in the exported varables.

Export variables show up in a nodes properties, so you can edit them as needed without making several scripts or massive if statements. I'm only going to save the map exit/entrance data instead of the players position. That map will load on start and I'll avoid players getting stuck in walls if I have to modify the maps.

These will be implemented in the indev 1.00 version as they are ready for the build.

Future plans include
NPC generation and loading
more NPC features
Completion of current lazuna families
New lazuna families
A basic story intro (very basic)


Friday, June 21, 2019

Boot up the door locks

I'm focusing more on Adventures' EDGE. Mostly I'm testing how much stress causes my chest to hurt. Not the greatest plan, but it's for science. The doors are now working well, and will be found in buildings on the next update. The map enter/exit system is mostly done and the player is placed at the proper entrance (mostly). Now I just need to finish putting the towns together and set all the exit destinations. Then I'll work on making specific doors lock at night. Mostly I'll group them and exclude the player from being noticed by the door during those times. If the player gets trapped, I'll have the floor warp them somewhere (map entrance, I'm being lazy). Don't expect door locks on the next update.

Most of the maps are done, but some town data must be programmed and generated. Then I'll start working on the story some. I'll have to make more Lazuna and modify the skills. Sounds must be created and added. The title screen might get some changes, not sure what. Plenty to do.

Thursday, May 30, 2019

Sounds Raw

There are many ways to create sound effects. Recording different sounds and actions, vocalizations, Digital Audio Workstations (DAWs), sfx generators (Bfxr, LabChirp), and sound editing. One option most people are unaware of in importing files as raw data. This is easiest is Audacity.

Once you have installed and opened Audacity, choose 'File > Import > Raw Data' and choose a file on your computer.

There are some things to keep in mind.
Any file can be used, even video and audio files.
Avoid opening files larger than ten megabytes.
Files around five megabytes seem to have the best results.
On average, one megabyte of data equates to about 4-10 seconds of audio.

You'll usually see something like the image below.





This is mostly noise. You'll have to remove the noise to find any potential audio gems. Select a small sample of the noise with the selection tool. The selection tool looks like a giant "I" under the Analyze menu. Now chose with 'Effect > Noise Reduction'. A new  window will open.




Click 'Get Noise Profile' then reopen the noise reduction window. Copy the settings, or choose your own, then click OK.Next use 'Effect > Repeat Noise Reduction' or use Ctrl + R. You'll want to reduce the noise 2-3 times for best results. The noise reduction takes an average of one second for every ten seconds of audio.

The first file I used yielded no results, so I tried a second file.




Installation files and jar files seem to give the most sounds. You'll usually get chirps, horns, beeps, squeaks, rumbles, and heartbeats from this. 'File > Export' the audio as Wav format to work on later. Now you can split and modify the separate sounds to something you find useful.

Your results and mileage may vary.



Thursday, May 23, 2019

The walls are closing in

I finished modeling the buildings last week, but I've been busy with other things recently. The meshes have been imported int Adventures' EDGE and I'll be assembling the parts into the final scenes. Afterward I'll assemble the maps and code in the NPC loader and start wrapping things up.

It is slightly discouraging to work so long without any support. Maybe I'll look over my page and see if I can boost traffic to it. Perhaps I'll ask individuals for support. Just need something big enough to turn heads.

After building the maps, I'll have to code NPC loading. Then I'll start working on a basic save/load system. I'll fix some minor problems and modify the AI and battle systems a bit. Once those are done, I'll be adding more lazunas and making the skills look unique.

I've made a random word generator to help generate creature names. You past a list of words in and it uses two methods to generate a list of words. There are a few minor things I need to add before it is finished (bigger font, instructions, graphics) and I'll want to make sure it doesn't crash from someone adding too many words. It will be on my itch account once done. Check later today (5-23-2019) or next week, I have a few errands to run.

Thursday, May 9, 2019

Doing Buildings in Bleder

You should have a basic knowledge of Blender and Inkscape or similar 3D/graphics programs. Having house textures  ready will also help.


I tend to make both the interior and exterior of buildings as one thing. In the past games had to make interiors as separate maps (and use numerous tricks) due to memory constraints. Today this is not as necessary, so the interior and exterior can be on the same map or object. I usually do three objects; roof, walls, and floor. This makes things easier in single-level buildings. Multi-level buildings would have every level as separate walls and floor/ceiling.

Blender and Gimp are tools of choice when I make 3D objects. Inkscape is used to plan building layouts. I usually make a texture atlas for walls, roof, and floor. A texture atlas is a group of smaller textures in one bigger texture. They are mostly used for animated textures or conserving memory by having one texture shared by many objects.






First, let's use inkscape to create a building layout. I like to keep things simple as layouts can change when modeling. All it takes is a few squares/rectangles. Select them and use Path>"Object to path" then arrange and color them how you want. You don't need complicated layouts or special floor plan software.






I already have a land section to define the max size of the building and some objects to build the pieces from. Most of these were made from extruding cubes or planes and have been measured using the grid. Everything *should* fit together with little problem or editing. You will need to edit some things as you construct the building.






I start with the floor first. As you can see, I've already modified some of the faces to fill some gaps. The player won't notice that much. I selected and joined the objects together. See that red/white banded circle in the center? That is where all the parts will be centered later. Now I just tab into edit mode, press W and remove doubles, then remove the interior faces manually. Using the num pad, or number keys if you have set blender to emulate the num pad, you can change the view to make selecting inner faces easier.





I've unwrapped the floor faces and applied textures. Just choosing to reset the faces and scaling/moving them to a texture works well. Snapping the uv layout to pixels (in edit mode: UVs>Snap to pixels) helps.





I've extruded the walls for a single room to have tabs. This allows them to fit together once I join them. Now I'll remove double vertices and remove interior faces. Be careful you don't remove any faces you need. This will be done for each room, and then the rooms will be joined together. Next I'll begin adding textures to the walls and aligning things. Be careful with your doors and corners.





I've selected the top and bottom faces, reset their UV layouts, and scaled them on a texture to look nice. The player won't see them, but I might have damaged buildings later. Keeping things tidy and looking nice helps. Next, I select the large interior faces, reset their UV layout, and scale them to the texture I want. Scaling slightly smaller then the texture can avoid distance seams. There are three wall colors, and I color the rooms differently. Pink for bathrooms, green for storage/office/kitchen areas and blue for most other things. Feel free to have more colored walls in your atlas, I just like to keep things simple.

I tend to start by putting all the faces on the blue wall first and scaling them correctly. Then I can just select and move other room faces to other colors.

As you can notice, the faces I have left are doors and corners. For doors, I collectively select their faces, change the camera to face the door, and set the UV lay out by view (bounds). Then I scale and arrange the layout to the wall color needed. You can usually get both sides of the doorway at once and move the other side if it needs a different wall color.

For the corners, or slivers, I select them on one side or another of a larger wall piece and do the same thing. Just change the camera view and get the UV layout by view (bounds). Now just scale/move to the texture you want. Once the interior is done, I'll layout the exterior.



For the exterior I unwrap the faces individually by view (bounds). I select the slivers, or corners, with another face and unwrap them together. The door faces are also collectively unwrapped. Try to keep the corner slivers on the same side of another face where you can. Now I select each face and face section on one side and scale/arrange them on the brick part of the texture.


As you can see, there are seems between sections. Just select every other section, go to the UV texture, select and flip the UV layout for those parts. (S,X,-,1, ENTER) rapid succession, no commas. This solves the seams for the brick walls. There might be seams on the corners, but that's not a big deal. Once done with all the walls, the roof/ceiling is made in a similar manner.

After you're done with the walls, select them and set the selection to cursor (shift+s). Now go into edit mode, select all faces (a), and move the walls back flush with the floor. Using the grid, and snapping to it (ctrl), helps. Do the same for the floor, making it flush with the walls. This is best done in wireframe mode (z).

I usually select both and drag them back on top of the land area that was underneath them. This centers the objects together to reduce hassle on importing them to another game engine. More centering, less moving.







I've arranged/modified the roof pieces. Like the walls/floor join everything and remove doubles and interior faces. Then extrude edges to cover the center gaps and remove doubles. Select all faces and reset the UV layout and arrange/scale to the texture.

 


Now I'll select the corner triangles and set their UV layout to view (bounds) and scale them to look better. Afterward, grab the bottom faces and move them to the ceiling part of the texture. After centering the roof with the other house parts, I'm done.

I'll be making a navigation mesh and adding doors later. Since this is dependent on the building and how I'm going to use it, I won't be covering this part. 

Remember to select each part, go into edit mode, and normalize faces (ctrl+n). Having to re-import because you have a hole from an errant face is annoying. Giving your meshes/objects descriptive names helps. I'll probably name them Diner Roof/Wall/Floor/Navi for each part.

That should give you all tips and starting points to make your own buildings.








So many buildings. Gonna take a 3-day weekend.





Distance seams are seams that appear/worsen as the player moves away. This is largely due to textures from an atlas bleeding on the edges of a face.