http://crayz.tv/files/sharex/devmeme.jpg
Each project brings in a new set of challenges, and the knowledge I gained from Fragsurf will be very valuable going forward. Abandoning projects isn't necessarily a bad thing, but making claims and announcements definitely can be bad.
People are going to start doubting me when they see me doubting myself. So I'm not creating any games anymore, I'm just doing shit with C# and Unity.
I'm working on my ARPG again. Not doing anything multiplayer, and I'm trying to maintain a progressive mindset where instead of polishing the shit out of certain things, I'm going to figure out what's needed next, implement it, repeat.
I'm a bit more open-minded towards creating my own assets this time around. I used MakeHuman to generate a few character models, then animated them in blender. The playable character is a naked adult, and the monsters are over-sized green skinned demon babies who kick you. Right now you can just run around and punch these babies to death and collect some basic loot
https://streamable.com/mm9a1
I set it up so I can easily create both static and procedural zones, and move between them with "doorway" entities. The first zone in this video is a static zone which will eventually be my act 1 town, and the 2nd zone is a procedural zone which will be the introductory combat area. Here's what my procedural shit looks like..
https://streamable.com/qwhdg
Like Fragsurf, a great portion of this is powered by data and logic loaded during runtime, which can ofc be reloaded at any time. Here's some examples of item and affix scripts. My data structures are still sort of in the planning stages, but I think they're going to work just fine for the end-goal.
AddedLife = BaseAffix:extend()
AddedLife.targetName = "AddedLife"
AddedLife.attribute = Attribute.Life
AddedLife.attributeType = AttributeModifierType.Flat
AddedLife.intelligence = false
AddedLife.spawnsOn = {
GearSlot.Helmet
}
AddedLife.tiers =
{
[0] =
{
name = "Small",
minValue = 5,
maxValue = 15
},
[1] =
{
}
}
items.affixes["AddedLife"] = AddedLife
Added bonus being able to execute logic as well
SmallLifePotion = BaseItem:extend()
SmallLifePotion.targetName = "SmallLifePotion"
SmallLifePotion.printName = "Small Potion of Life"
SmallLifePotion.gearSlot = GearSlot.Belt
SmallLifePotion.texture = "ProjectName/Textures/Items/SmallLifePotion"
SmallLifePotion.width = 1
SmallLifePotion.height = 1
SmallLifePotion.itemLevel = 0
SmallLifePotion.useType = ItemUseType.Instant
function SmallLifePotion:onUse(event)
-- event.Entity.Life = event.Entity.Life + 50
CS.UnityEngine.Debug.Log("USE IT!")
end
items.bases["SmallLifePotion"] = SmallLifePotion
Dungeon decoration is done via Lua too, that way I don't have to wait around for Unity or anything while creating my dungeon generation shit, just hit reload and go
tileMap["Walls"] = {
{ "Tilesets/Dungeon/{0}/Wall_UDL", Up | Down | Left },
{ "Tilesets/Dungeon/{0}/Wall_UD", Up | Down }
}
tileMap["Doors"] = {
{ "Tilesets/Dungeon/{0}/Door_UD", Up | Down }
}
tileMap["Floors"] = {
{ "Tilesets/Dungeon/{0}/Floor" }
}
function Dungeon_PlaceRoom(params)
place_walls(params)
place_floors(params)
end
function place_walls(params)
local placer = params.RoomPlacer
local map = params.Map
local room = params.Room
local roomCenter = room.Rectangle.Center
local roomSize = Vector2(room.Rectangle.Width, room.Rectangle.Height)
local roomHalf = Vector2(roomSize.x / 2, roomSize.y / 2)
local totalWalls = ((roomSize.x * 2) / tileSize.x) + ((roomSize.y * 2) / tileSize.y)
-- place all inner and outer walls
local curX = 0
local curY = 0
local dir = Up
local offset = Vector2(0, tileHalf.y)
for i = 0, totalWalls, 1
do
local posX = roomCenter.x - roomHalf.x + (curX * tileSize.x) + offset.x
local posY = roomCenter.y - roomHalf.y + (curY * tileSize.y) + offset.y
local pv2 = Vector2(posX, posY)
local wallType = room:GetWallType(pv2)
local assetPath, assetDirections
-- outer wall
if wallType == WallType.Outer then
assetPath = tileMap["Walls"][1][1]:gsub("{0}", params.Tileset)
assetDirections = tileMap["Walls"][1][2]
-- inner wall
elseif wallType == WallType.Inner then
goto skip
-- place door?
local doorway = room:FindDoorway(pv2)
if doorway ~= nil and not cache_contains_doorway(doorway) then
assetPath = tileMap["Doors"][1][1]:gsub("{0}", params.Tileset)
assetDirections = tileMap["Doors"][1][2]
table.insert(doorway_cache, doorway)
else
assetPath = tileMap["Walls"][2][1]:gsub("{0}", params.Tileset)
assetDirections = tileMap["Walls"][2][2]
end
::skip::
end
if not cache_contains_point(pv2) and assetPath ~= nil then
-- spawn an asset with proper position and rotation
local asset = spawn_asset(assetPath, assetDirections, placer, pv2, dir, room, false)
table.insert(point_cache, pv2)
end
if dir == Up then
curY = curY + 1
if curY >= (roomSize.y / tileSize.y) then
dir = Right
offset = Vector2(tileHalf.x, 0)
end
elseif dir == Right then
curX = curX + 1
if curX >= (roomSize.x / tileSize.x) then
dir = Down
offset = Vector2(0, -tileHalf.y)
end
elseif dir == Down then
curY = curY - 1
if curY <= 0 then
dir = Left
offset = Vector2(-tileHalf.x, 0)
end
elseif dir == Left then
curX = curX - 1
if curX <= 0 then
break
end
end
end
end
function place_floors(params)
--
local placer = params.RoomPlacer
local map = params.Map
local room = params.Room
local roomCenter = room.Rectangle.Center
local roomSize = Vector2(room.Rectangle.Width, room.Rectangle.Height)
local roomHalf = Vector2(roomSize.x / 2, roomSize.y / 2)
local totalWalls = ((roomSize.x * 2) / tileSize.x) + ((roomSize.y * 2) / tileSize.y)
--
local floorPath = tileMap["Floors"][1][1]:gsub("{0}", params.Tileset)
local asset = placer:SpawnAsset(floorPath, room, true)
--local cube = placer:SpawnPrimitive(PrimitiveType.Cube, room, true)
asset.transform.position = Vector3(roomCenter.x, 0, roomCenter.y)
asset.transform.localScale = Vector3(roomSize.x / tileSize.x, roomSize.y / tileSize.y, 1)
end
Pretty fucking ugly, but it's a complex thing and I'm going to have to really spend some time with it, so this is good for now.
I'm not sure how things will play out for me in the next few months, but IRL responsibilities are catching up very quickly. I'll be putting work into my Unity shit whenever I have the time. I'd really like for my work to someday pay the bills, that way I don't have to stress about shitty labor work.
Sorry, you need to Log In to post a reply to this thread.