Tumgik
daniellarsson89 · 1 year
Text
Productive Easter
Hello! Was sometime since I last posted anything here. Figured now would be a good time though. I have been busy this easter and did alot(for me atleast) of coding. I also got tires changed on my car to summertires and met with my mum and sister and her kids, so I did quite alot this easter. Programming wise I continued to work on my inventory code for a arpg I am making. I got pretty far. Can now pickup items, move them/drag them around and put items into equipment slots. This can be seen in my GIF here:
Tumblr media
On development, I was getting alot of troubles during all the steps. Firstly I made a diablo style-ish inventory with a grid. A item could take up say 2x2 slots if it was a glove, or 2x4 slots if it was a bow. I got that working with an image, but could not get my head around making it work with actual items I did pickup so I abandoned that idea and made my own system instead.
How my inventory system works is easier for me to understand, atleast i think so, given steps is roughly: 1.A item is created/spawned on the ground 2. Player clicks on the item 3. The item is picked up(into a single slot system) 4. Player clicks and drag the item in inventory 5. Item moves after the mouse 6. Player drops item on a slot or equipSlot. 7. Item is put into that given slot 8. Player clicks/drags on slot/equipSlot. 9. Item moves after the mouse 10. Player releases mouse on slot 11. Item is put into given slot If for some reason the player releases the mouse inside the inventory but not at a slot, or puts an item ontop of another item; the item should go back to the itemslot that item came from. In similar words, if item is picked up in slot 1,1. Then if player moves it to where another item is on 2,2, the item goes back to 1,1. Hard to explain without showing I guess, but that is how i process how it should work. However I am dragging and showing this “dropping” in the gif above so maybe it is clear anyways.
Another issue I had was when dropping the item outside of the inventory. First I made it so that I checked the mouseposition and then tried to see if mouse was outside of the inventory. In X and Y positions. That worked and I got it fixed when the inventory was 10x and 3y in size (30 slots). When I added equipSlots that went down the dumpster, It didnt work. Since if I clicked an equipSlot and put the item there it actually dropped the item on the ground instead. What I now did was try using mouseposition again and getting it to work in the new size of the inventory. This was stupid and toomuch change each time the inventory changed size. My new plan was to instead use a background image to determine the size, I then used a ray to see if the ray hit the background to determine if we are in the inventory or not. So when the ray hits outside the inventoryBackground it releases the item on the ground. I think that works pretty well with what I wanted it too so I am happy. Hard to put everything in words that I tried and didn’t and I am unsure if this is even useful to someone, but anyway I got these things to look back on myself later, so I guess that is that.
Enough rambling for now. Daniel out.
0 notes
daniellarsson89 · 3 years
Text
Valheim
Warning! Spoilers of game included ahead. If you wish to experience Valheim without knowing much about it read no further. If you have played Valheim before and/or want to know my journey in the game continue reading.
So I did not know much about this game when I started. I looked on some streams to see what kind of game it was. Then I noticed my friend was inside the game on Discord and I wrote to him about it and the game was really starting to grow on him. Few days later I bought the game and me and my friend took the journey to Valheim together.
We got left of by some Valkyries or whatever the angel-like or so thing that dropped us off in the world is called. Then I think you could pickup stuff and that way got stone and some wood and you could do your first axe and/or stick. Cant remember exactly was sometime ago. A bird helped out by telling us about things in this strange world we had entered. Then we picked some berries and ate them for the stamina and health buffs you get from them. We continued hacking on wood and then it was time to find shelter because it got cold during the evening. We made a campfire and got roof on it and repaired our equipment. When the night was over we continued hacking on the nearby trees and scouted out a location for our base. 
After building the base I think we went to the location of trophy and there we found our first stone Vegviser(I think it was called that) marked the location of the first boss. Yes you read right, we got bosses in this survival game! We continued farming the nearby woods and fixed food, gear and staying away from skeletons in the black forest that we also encountered this early on. Damn they hit hard! We then thought it would be best to go to the first boss because we had been farming quite sometime. My friend had already found the spawn location which was on another spot then the marked we had on map. We went to the spawn location and I got to check what was needed to spawn the boss. The stone was marked with a deer so I thought, maybe a deer trophy and I tested it and it worked. Cant remember really if I spawned him without help from friend or not but we both was ready to fight the boss. And Boy it was a big deer that spawned. So I stayed a bit far off trying to learn its attack pattern. My friend just stood there or near him. Here comes the sad part. Appears you can just block the attacks. So that was what my friend was doing, when learning that I entered the fray as well and blocked attacks. Hit. Blocked. Hit. Checked what way he was turning and then hit again. Basically that was it until the boss died. Which was quite lame first boss, but hey its a boss at least. We got the trophy from boss and took it to the trophy stones so we got a power Eikthyr that was really nice to have during long runs and/or climbs on mountains later on.
We then started our journey into the black forest and met some skeletons and trolls. The trolls was big and nasty. The first troll we met held a tree in his right hand and made large swings with it that I couldn't avoid. I think it was a one shot. On me that is. We then went into our first Burial Chamber. Here there was a lot of cramped space and you had to check twice before entering any of the rooms inside because they could be swarmed with skeletons. By swarm I mean like 2-3 but it felt like a swarm. We found some nice loot that we could then build some things in our base. We got back and built portal I think and some other stuff, then we continued on in the black forest and mined a lot of ore that we upgraded our weapons and axes with. Cant remember exactly when we found the Vegviser or whatever it was called that marked the location on the map. Appears the boss was on another island! By now we could build our first boat so my friend made that and then I got to steer the boat on our first boat journey. 
Turns out steering the boat was a nice system. You can turn left and right with A and D and a indicator on how much you turn is shown in the game UI so you don't have to hold down the button to steer a lot which is nice. You can set speed in four steps I think. Back, paddle(one), two or three. That number is how much the sail is curled up or let loose. With three being full sail. Hard to explain but something along those lines. Okay so we went east and were out on water and then we came to a river that we wanted to try sail through because the second boss was on other side of a landmass so we tried. We hit some stones but all in all it went good and we got through. Then it got interesting. We continued and saw some new areas and we heard a strange sound. All of a sudden my friend just said on Discord “I died” and I was like “but how?” Then I saw a large mosquito flying hitting the boat, apparently it had one-shot my friend just because he was standing up in the boat. I tried my best to survive and get as far away I could from the bug. I was stressed out but I made it. Then I turned around and got most of my friends loot. I had to turn back and forth again three times until I got the important stuff because my inventory got cluttered with less valuable things. Then we decided I had to go opposite direction of boss to try rendezvous with my friend and so this journey continued. I got past some new scary looking areas and some black forest then appeared. I got hit by something big and scary though and after awhile the boat just got destroyed. I was in black forest and quite long away from our main base but I moved towards that location at least. During this time my friend was going in another boat to the west instead of east that we took before. I came to a Meadows(first biome) area and there I build a portal. My friend got the boat near me and we relaxed some. Then we continued the journey to the second boss. We got there finally after quite along boat trip.
Time for the second boss. So, Yeah. I got the job to figure out what spawned the boss so I tried all kind of stuff. Trophies, food and other stuff. Then I was about to give up when I asked my friend for advice. He had done it on other character. But I asked if the things on top of the pillars was a clue and he said that it was. I got back to base and then I noticed the things on the pillar resembled an item we had in our base. So I went back to the summoning place and tried it and it worked with the Ancient seeds. A huge tree spawned and we were in trouble. I held my distance trying to read what the boss did. Noticed he spawned many arms, tree arms that I didn't know what they did. But I got it when I closed on them that they hit hard. So tried to avoid those whilst getting closer to the boss. I did bad in the start and had to use healing potion. Then after sometime I got closer to him easier and got some hits in. We continued fighting and then he got down, without any of us two dying so that was nice. Got trophy and went back to trophy stones, his power was quite lame though. Faster/better woodcutting, hello? that is so situational. The one from first boss is so much better and versatile at least between those two.
We could then go into the next area which was a swamp, and boy it was so lame. We managed but it was so hard for me at least, my friend was bit better at knowing what the enemies did. I hate the poison blobs and it was annoying with the Draugr archers, especially the star marked ones hit so freaking hard. So we got a swamp key from second boss and we used that to enter some Swamp ruins and mined from ooze that contained leather scraps and ore. We then made few runs back and forth with that, but it wasn´t a major spot we was at. We then found our way to another swamp and built a base there, where we upgraded most of our gear from I think if I remember right. We also found the way to the third boss which was in another swamp, so we had to get there. We travelled and built a outpost with portal and then headed for the boss. There I had to try figure out again what it was and the hint from the runestone at the summon said something about “Burn its remains” or so and I tried with skeletal fragments and skeleton trophy which didn't work, also tried other things I had on me. I then went back to base and  checked for something “bony” and found Withered bone, which I returned with and that worked. This fatty was so hard though. Around the location of the boss was a lot of water. So when the boss spawned minions and also spit out gas we were in trouble. The gas itself wasn't an issue cause we had resistance potions for that but in combination with the water that limited our movement and the adds and the boss itself it got quite hard to recover. The boss itself was probably not hard but all this in combination made it super hard. Also. A Wraith joined the party and I died. Then ran back, and my friend died too and ran back and I think we then took the boss after we died each one time. That sucked, because it should probably have been easier with more land around the boss. We got the trophy from the boss, which we turned in at trophy stones for physical damage resistance buff,  and also some weird magical bone.
The weird magical bone could be equipped and the bird told us we could find silver with it so on to the mountains it was. It was so cold up there you had to use frost resistance potion or you would freeze and take damage. So we got some potions and ran up. Met some wolves that we killed and De big Dragons also which we shot down with arrows. The dragons hit hard with their attacks but when I learned that you could roll away on them it was quite easy to dodge when you saw them and you were ready. Which wasn´t all the time of course. We went over the first mountain. No way to boss. No silver. We then went to the second mountain. Same thing. No silver. No way to boss. We then took our boat on a journey and found another larger mountain, where we finally found silver. We then shipped that back to nearest base and smelt some and made weapons and upgrades. We then went ahead and found another new mountain where we found not one but two silver veins and one of those was big as hell. There we mined it all and was like “Do we really need this much?” my friend said second vein was the biggest vein he had seen also which was quite nice. We saved all the silver there and then went another way with the boat. There in the horizon we saw it. A huge mountain appeared an we were like “This have to be the boss mountain” when we climbed it. We got all the way to the top and scouted. This is a shot I took.
Tumblr media
No silver vein. We saw no structures. So we moved to another top and then there it was. My friend saw it. A structure! I said “Where?” “Over there” he said. “Where I shoot my arrow” And I saw nothing, turns out it didn't render until I was bit closer. Inside that structure was the pin pointer to the next boss. We took the boat and went on our way. To the mountain. And boy was it a big mountain. Pretty much the same as the one before and it took sometime to get to the top. During this time and when we mined silver we had found some dragon eggs and both me and my friend thought that this had to be what you summoned the next boss with and when we got to the altar it seemed that both of us was correct. But. You needed three eggs! damn son. That was annoying but we had one egg with us and two of the other we could take on this mountain we was at so that was okay. We then spawned the big Mother dragon and fought. We had to shoot it when it was flying and it shot ice down on us that we had to roll out from. I rolled twice when my friend rolled one big roll but I thought it was safer to roll twice. We also ate frost resistance potions here. With our capes we had built from silver we didn't take cold damage from the weather though which I forgot to say until now. Back to the boss, we shot arrows on it when it was in the air and when it got down it bugged out sometimes. Its attack pathing was weird when I and my friend was on opposite sides of the dragon attacking it, it “spazzed” out. Jerked its head back and forth basically. But with that said it got dark and we had adds and I died from a star wolf and a werewolf that wanted to join in on the fun. We had the boss at 20% when this happened and that led to my friend dying too. All seemed lost. We thought the boss would de-spawn. But it didn't. so we got back and got our corpses and took frost resistance potions and fought on and the dragon finally died. We got trophy and turned that in at the stones, the power we got was that we could have tail wind on sails when sailing, which is quite nice on long sea journeys. We then built some upgrades and continued on to next biome.
We had already found the next biome before so we just went to a base with plains nearby and explored from there. The Deathsquitos(Mosquitos) was deadly but they didn't one shot us this time. Which was nice. We also met some furry large creatures that we killed, we could block these so that helped. They also dropped large meat that we could grill and get quite nice food buffs from. We also met a lot of goblins that hit quite hard too but without stars they was quite easy. You pretty much blocked at the right time so they got staggered, then you hit them few times and then blocked again. I was so bad at this but I am starting to learn. You also sometimes cannot block attacks from one or two star marked mobs, which is annoying. This depends on how strong your shield is I think. The ones with stars hit a lot. Suddenly I heard my friend. We were in luck. My friend saw the stone that pointed to the boss and apparently it turns out the boss was on the same island we were at! in the same area we now were in. Look at that! So we continued in that zone. We went ahead to the boss area and we think that we will spawn it with some totems. On the ritual altar there seems to be five slots available so we think you will need five totems to spawn him so we will try to gather that. We then went to a nearby village and tried to hunt some. Damn was it hard. A star marked berserker were going at my friend so we were out of luck, but my friend didn't die. I then died out of nowhere to a two star marked goblin that one shot me. So I ran back with full food buffs and rested and got my gear. You get a corpse run de-buff when you get your corpse that makes you almost invincible so I just spammed attacks on the berserker which then went down. Bam! Hurray for corpse run buff. We then went back to our Outpost 4, yeah did I mention we have 7 Outposts?. And we thought that we should build another base inside the plains so that we could sow some seeds on the new stuff we found, I think it was called Barley. At least the things we could make with the new ingredients were so huge so it would be worth it to have a supply of those materials inside plains. Other thing was fish that also gave pretty good buff so I did some fishing when my friend was expanding the base some. I think I finally got 20 something fish, but man it was boring in this game. Sometimes the fish wouldn't hook so it took ages and/or I had to move position and the fishing minigame wasn't that fun I think. You didn't have to do much but it was so slow and if you sent out the line to far the fish might escape, yeah I just didn't like it. But back to the plains, we were in our Outpost 4 base and prepared things to expand and make a Outpost near the fifth boss. But it got quite late so we were going to bed for the night.
We begun thinking we want a base in plains too so we would be close to the boss and also so that we could grow some barley. So we started building. When we had a shell my friend said “Wouldn't it be better to have it closer to the sea” and I could just agree. So we moved it closer to the sea and begun building. Which took quite sometime. We had stone walls and tree for roof. We also deconstructed Outpost 4 and went with all the mats to Plains base. Boy was it rough. You cannot teleport with some materials in this game, so we had to go by cart. And the cart gets stuck in terrain sometimes so you have to clear the area and sometimes go another way to be able to go forward. So yeah it was rough and after dying sometimes we got to the Plains base, phew! We then farmed some more totems and head for the boss cause we wanted to try it. I told my friend we should have fire resistance potions with us so we had that. Then when we were about to spawn the boss I didn't have full food buffs yet, but he said that I could eat during the fight so we spawned the boss. And Boy was it a boss. A large skeleton appeared that only had his torso and up I think. We began trying to fight. I was far off and he shot out a fire beam which from him and I rolled off, then he made a move with his hand and all of a sudden I took damage from no where. He had shot down meteors from the sky! My friend died from that or other damage. I went in for a hit, but he made area fire damage too sometimes, but apparently that did not tick for much damage so you could just stand in it my friend said. We continued trying to fight and he got his corpse and I died and we rotated like that, then we noticed the boss healed too and we just said. No. We wouldn't be able to take him like this. So we tried to get our corpses and then ran off to base. Seems the boss tried to follow us so we ported to our main base. I hope the boss doesn't ruin our plains base, but we have to see during our next gaming session.
So we started playing again and talked about what to do, the boss hadn't ruined our base, but he started following us when we went to it so it was hard to be there. We decided to build a little farm elsewhere so we set out with the boat. We built a farm some distance away from our main base. We did not see any Sea Serpents on our way over there. So we decided to go further west toward the end of the world, and soon we saw a Serpent and we killed it. It just dropped some meat, turns out you could make some pretty good food out of it, but nothing more. Then we went to try check out Mistlands which we had seen before and I was wondering what it could be. I thought it was a sea area only, and suddenly we had a area that was called Ashland. We went ashore and then built a outpost and started exploring, it was just small Surtlings there. Then we found a deposit that we mined of Flaming metal, that we wanted to see if it gave something new that we could build. So we began a journey to try to find a swamp with Iron in it, turn out the island we were at didn't have any swamp on it. We went with boat to any swamp we could find and set ashore there. My friend found some green things on tree that was glowing and tried to shoot on them, but it didn't do any damage. I tried to make a stair to it and hit with sword but no luck, a bit later he did the same thing but with axe and it worked. Turns out you could build a bow from it so we farmed some more and did that. We didn't see any Sunken Crypt here with Iron in it though, so we went to another swamp. That took sometime to find but finally we were there and my friend found a Crypt pretty fast that we made a small outpost outside and farmed some Scrap Iron. We did a smelter for the iron and I stood stomping there waiting for the 10 Iron to be smelted and then made a Blast Furnace. When I took up the smelted Fire Metal I was sad, it didn't give any new recipes..so sad. So next time we will probably try to cheese the fifth boss with bow and arrow, lets see how that goes.
We did a short session, where we took the iron back to base. We both had the Mother buff that change wind on the sails so that went quite smooth. We then upgraded some gear and grew some Barley for our food supply. My friend farmed some Lox for their meat also. Soon it was time to go to bed, so we decided to stop there without doing much more. 
Today we farmed more food to prepare for the boss fight, and my friend fished some and I got some more Lox meat. Together with Barley we now had three large buffs, Lox meat pie, Blood pudding and Fish wraps I think. After thinking about it we then went to the boss, because with 300 frost arrows each we should probably be able to take down the boss by range. So we started the fight and drank a fire resistance potion each. We then fired arrows when we could and as soon as the boss raised its hand we knew the meteors would come down so then you could run in another direction with sprint and it was fine. Even though I was slow sometimes so one or two meteors hit me, at least it wasn´t lethal. My friend got most of the beams that he did, probably because he mostly was closer to the boss. We continued firing arrows from a distance and my friend went in for some melee hits here and there, thus also triggering the AOE effect that the boss did when you was close. I also went in for some hits with sword and it seems he was vulnerable to that kind of damage, or at least we though so. I mostly did damage with bow though. All of a sudden my friend said “Is that poison arrows?” because he saw a green trail from my arrow. I was like, “oh it probably is”. Seems the game took that automatically instead of my frost arrows when a stack was depleted. It was kind of funny. So we continued to hit the boss and even though it regenerates, we had the continued damage so in the end he got down. We did not die a single time during this try, which was very satisfying.
We now have roughly 80 hours in Valheim together, damn that went by fast. All in all it is a good game even though it is only in early access, so I hope that the team developing the game will be able to create a greater experience now when they have the resources to increase the team if they want to because of the many units sold. I had a blast. Some smaller things may be annoying, like enemies being inside rocks, which makes it harder to hit them. Or inventory equipment showing as grey bar instead of white fully repaired in certain slots. But that only happened once though. And as the game is in early access I can ignore the little faults and see the greater picture and still have a good time.
With that I want to end the post with a screenshot from the fifth bosses trophy. Enjoy!
Tumblr media
1 note · View note
daniellarsson89 · 3 years
Text
Productivity loss
I kind of left the c++ idea for another time and went back to Unity so I have been starting another prototype in C#. This is a Gif of what I have so far that mostly is a beginning of a inventory for a topdown rpg.
Tumblr media
You can pickup item(bit buggy pickup as it is now) and it gets slotted down to the right, then you can click on the boxes to select them. But as you see the select icon appears over the other slots too so that have to be fixed as next thing I guess.
Usually with my projects I come to a spot where it is not as fun anymore and it seems this is it, even though I will try to endure this time around. I did reading on design patterns on the site https://gameprogrammingpatterns.com/contents.html Earlier I did also check a series of youtube videos that explained some topics in Unity that was worthwhile checking, so even though I am not programming I try to be productive and maybe thats why it felt so good to take a break and play some Valheim. I have been playing Valheim a lot with my friend and that have been taking up most of my recent free time and it is both social, fun, hard and quite new for me since I am not used to that genre of game. I have begun writing a post about our adventures that I will share once we feel finished with current content in the game, which is a lot considering it is only in early access. We are at the fifth and final boss (I think) so should be done soon I guess if we game some in the following days.
Anyway I hope I get some motivation going forward to continue with my project, I have a vision that I have written in a game design document that have minimal features to be called “done” so will try working towards that vision. Easier said then done though so I will take it in smaller steps, finishing inventory and item management being the closest one on the horizon. In that order I think. Trying to sort issues one by one, I just hope that type of implementing them doesn’t ruin the whole game later on. 
Anyway, I guess that is enough rambling for now. Have a good one!
0 notes
daniellarsson89 · 3 years
Text
Coding with Godot, in c++
Hello, Time for some programming again. I have used java and c# in the past, mainly it was c# with the Unity game engine and I have done alot of prototypes. I am still learning alot by doing that though, but now I thought it was time to try something else for a challenge.Since I have read that c++ is used quite alot in the computer games industry I wanted to try that. I wanted an open source engine that used c++ so I did some searching and found Godot after awhile. I checked some documentation on their site after downloading mono version and realised I had to download other version for c++(doh!). Then I compiled my first hello world in c++ with SCons(I read in documentation you needed that for Godot) after struggling abit, 
Tumblr media
After that it was time to dive into Godot. I did some digging and found a tutorial on how to setup Visual Studio Community version for c++ with Godot, which was alot harder then I thought, but the tutorial was really something so I followed that.I also had already done the library needed cause I had read in Godot documentation that you needed to do those steps, so that saved me some time. I then built my first c++ code. At first it was only the sprite character without movement and two boxes on screen, but then I added movement code aswell and the result is below.
Tumblr media
Collision worked quite easy out of the box with Godot so kinda nice not having to code that bit when doing simple tests. I got some other ideas on what to add next, but they might be harder to implement. Oh I almost forgot, I also am trying to do a theme song for the game, finding the right melody is the hardest part...I want it to fit the game, but maybe I will settle for something else. Unsure when I will post again, but until next time I write I wish you all the best.
1 note · View note
daniellarsson89 · 4 years
Photo
Tumblr media Tumblr media
This Inventory was made to a 2D RPG i made sometime ago. In first picture is the actual inventory management, second picture is the behaviour which equips items and changes stats accordingly, also the use item function is here.
Behaviour is basically like this: 1. Player presses ‘E’ to pickup an item from the ground. 2. Item gets added to the list of GameObjects named bag. 3. Using UI player can enter a string to find object in the list. 4. IF item is found, it gets either:    4.1 Automatically equipped in that itemSlot. Adds stats if that is changed.    4.2 Item is used if it is a consumable.    4.3 Gold is added to gold count. Classes is quite code heavy and it was challenging to come up with an idea of how an inventory in a RPG might look like. The hardest part was figuring out in what way I should use the string to manipulate the gameObjects and actually getting them equipped on the character.
0 notes
daniellarsson89 · 4 years
Text
Unity-2D Player Movement
Checked through my old code some tooday and wanted to share how I got about movement in Unity. We add playerInput() into the void Update() function. So that we take input from the player in playerInput. This is obviously repeated for right,up and down aswell in a similar fashion.Then we call movePlayerLeft() which makes the actual movement of the Player(Object if you want to call it that). Lastly we attach this script onto the playerObject.
private void playerInput(){ if(Input.GetKey(KeyCode.A)){ this.movePlayerLeft(); }
private void movePlayerLeft(){ this.gameObject.transform.Translate (Vector3.left * moveSpeed * Time.deltaTime); speed = 1; }
0 notes
daniellarsson89 · 9 years
Video
youtube
Worldeditor - Current state + stuck in progress.
I made a quick video showing what currently works in the editor: 1. Placing tiles, beings and items. 2. Collision detection on water/impassable terrain 3. Picking up items 4. Choosing equipment(clip shows equipping magic/Sword) 5. Alot of stuff has been started on but has not been used in clip(but is functional) or isnt finished yet. Examples are Soundmanager, Inventory system and NPC dialogue.
With that said, I am proud what I have done up to this point!. The road has been bumpy and sometimes really frustrating as I´ve done this on and off in my sparetime for roughly 2-3 years(with a long break of around 6-9 months in 2014) whilst also working fulltime. In that time I include time spent starting in java programming as a language from scratch since I´ve only read some basic java at the gymnasium. I started to readup on Java in around Mars 2013 and got a firm grasp of the basics thanks to reading and doing exercises with: Java an introduction to Problem Solving and Programming Sixth Edition by Walter Savitch. I recommend it if you want to start learning java as a language it was really helpful.  Now to the point of this post. The whole project has always been at a comfortable learning curve, meaning that I always felt like I could complete the next task albeit I was aware that it might take some extra time since I was new at it. It was challenging but not impossible and also fun and evolving which made almost every session enjoyable. Until the last few times I´ve programmed on it. Now comes the hard reality. I have now gotten to the point where I can see that my lack of knowledge in the middle of the project is starting to make its appearence. Since when I now try to add new functionality like the obstacle collision detection on my animated enemy for example I get more and more new problems. Which I also find take toolong to actually jump into and fix. Another issue in the same difficulty/timesink range is an issue with drawing the enemys swordEffect. The same effect in all its aspects works on the player. Just can´t get my head around where in the drawing of it that I should troubleshoot or fix. The programming experience I´ve gotten sofar from this project will be invaluable in any other projects(even if its in another language/engine like unity, unreal or whatever) I decide to do in the future if I leave this project now. For completeness I need to add my personal goal with this project aswell. Goal is to do a complete 2d topdown zelda-ish rpg with my personal touch and I am getting there slowly. The programming is a means to and end, but I always enjoy learning new things when they are challenging which the programming has been up until recently like described above. 
My question to you is this: Should I leave this and try to pursue another project? Should I man up and just cling on some distant hope that with even more struggles and alot of my time investment I will actually complete all the issues I will be facing?
0 notes
daniellarsson89 · 9 years
Photo
Tumblr media
Havent done sketching in like ages felt like it and drew this whilst listening to some epic fantasy music on youtube. Took a break from programming tooday and just relaxed with hearthstone and anime.
2 notes · View notes
daniellarsson89 · 9 years
Text
One thing leads to another
So. Coded farily much again tooday! Programming never seized to amaze me since I have got to keep myself updated on the program structure whilst coding new things. The latter part usually leads to some backtracking because something isn´t working. The backtracking mostly consists of adding code thankfully. I had one of those issues tooday and that is the reason Im writing this.
What happened this time was that I tried to improve performance of drawing the animatedEnemies and thats when the issue first appeared. My hardworked save function gave an error!
 Debug began: I compared the output data in the console versus the data that was written to the file, to no avail. Went over the program tree from start to finish on the affected functions and took a break after that, abit let down by the fact I hadn´t found the issue.
The issue was simple when I could track down the culprit variable which I found sometime after that break. The fact was that to be able to place and choose “endCoordinate” of the enemy patrol I had added that endCoordinate value and used that to place the enemyBeing. But that value wasnt saved in my written save/load function. After that got added it worked like a charm!
I guess this is the difference between good and bad(insert majority of my code here) code, that good code is easy to expand on without issues/alot of time invested usually. I feel like I´ve got some fair bits of that “good” code, but I also have ’bad’ code which more so gets noticed when issues like this appear.
Oh and yeah, got some other things done aswell except this troubleshooting ;) Will be glad when I can draw alot of animatedEnemies on the screen at the sametime which is the current step Im on. I already added so that only beings which is visible on the screen is drawn and moving so I can put like really alot of static beings without lagging, Though the animated ones lag alot when they get over like 5-9ish. Did someone say ‘bad’ programming? ;) 
Until next time!
0 notes
daniellarsson89 · 9 years
Text
Productivity Spike!
Another weekend over. This one was really good! It started off with visiting my brother on friday. Did some talking but not so much really, why? He really is ambitious and want to learn new things in his study. Seeing him work as hard as he can and blame himself for not studying more I felt ashamed, too say the least, because I haven´t pumped as much hours into this project as I´d really like. I hope my brother and I can keep encouraging each other! 
When he studied I sat with my gameprogramming. This continued on until one of us was bored of it and then we played some games instead. I didnt stay the whole weekend because I had laundry to do.
This sunday I´ve been programming around nine hours(+-), whilst also mixing in alot of chores like laundry, cleaning, baking bread and eating. Yeah, it´s a chore;p. The chores I found was good to do when I got stuck in my programming because it gave me time to think of the issues whilst doing other things which aided me alot. I bumped into two “major” issues tooday which was timesink issues, but I solved them both when I left the computer and fixed them.
I´m really proud of the progress I did tooday which was : *Fixed loading/saving of “Beings” including the player and his inventory.(Started with the first iteration at my brother but got it working tooday!) *Placement of patrolling enemies now works. (Choose Start and end coordinate) *Fixed selection in WorldBrowser. It selects the right tiletype/being, when moving screen aswell.
*Some small really minor tweaks which had to be done because of above.
Might not seem to be much listed on paper like this, but it is a fair amount of code that has been written.
Until next time!
0 notes
daniellarsson89 · 9 years
Photo
Tumblr media
Worldeditor - Beings.
Had fever last week so took it easy on the programming, read none at all. I did playout Majoras mask on the 3ds though which was ok it felt more of a grind at the end though.. which sucked. I still think Ocarina of Time is alot better!
Yesterday I had a blast programming after work and succesfully wrotecode to add beings to my worldeditor. The result is seen above. There seems to be performance issues when there is alot of animatedBeings at the screen, will have to look that over sometime.
Also did the usual thing fixing the small things which I noticed in the code.. old habits die hard. Perfection isn´t needed everywhere even though I .. kinda .. cannot ... ignore when I see something that I want to change and know a better solution to. Yeah. Aint really THAT bad you know because I am aware of it and mostly can restrain myself.  For example yesterday I wanted to start with doing the “add beings part” but instead improved the editorBrowser to be in x and y instead of only x as it was before. Which I guess is fine, but it took time from the addBeing thingy. Rambling like usual.
Next up I´ll do a save/load function of the beings and check out that draw Performance I think.(Issues probably that my a*star function takes toomuch calculation per gameloop depending on the gridside). 
Until next time!
0 notes
daniellarsson89 · 9 years
Photo
Tumblr media
Generation. Still working on the WorldEditor. Added save/load functionality tooday. Had some issue with the reading function too be honest, but worked out fine in the end. Also added a popup which asks if it should save/load or not.
At the moment only the tiles are able to be saved and loaded, might appear issues after I add the beings on top of this.
0 notes
daniellarsson89 · 9 years
Photo
Tumblr media
Generation WorldEditor - Continued working on it. Added a browserWindow, where all placeable assets will be viewAble later on.
Also added a selection square to the current tile/asset selected.
Next session I will start working on a save/load function for this I think, that or function to place the other assets.
0 notes
daniellarsson89 · 9 years
Photo
Tumblr media
First test worldEditor. All textures used are placeholders that I created really quick in Photoshop. The whole background(array) is filled with grasstiles at first and then I clicked the pattern of ‘yo’ in realtime. #proud of the progress I am doing.
0 notes
daniellarsson89 · 9 years
Text
Generation - WorldEditor
Been having the idea of making a worldeditor for awhile to the game(Workingname Generation) I am making slowly but steady and got to start on it last night. Was fun and progressed smoothly without large issues. I added so that it is possible to change the tiles when clicked on and depending on which tile that is chosen.
Next I will try to implement a save/load function so I can save the map I make in the editor and use inside the game later on. The idea is that this editor will save me time later on, which I am sure it will!
Oh just reminded me that I have like a zillion other things and featured that I wanna do to D:. Lets keep it structured now!
Mandatory picture got added after. Note to self, do add photo next time(!) haha
0 notes
daniellarsson89 · 9 years
Text
Java programming in a nutshell
Been programming a 2D prototype for sometime now and I stumble on different issues, the lastest one is this:
I added a deathAnimation to my player on thursday. It took like 30 min to one hour. Next I called the same code from my “enemy” template. The behaviour of the problem was that the animation played perfectly on the player, but the enemy would instead disappear. I could force the deathAnimation on the  enemy(it was visible then) if I commented out other animations on it.... man was I confused.
I spent the last two days trying to debugg it(8 hours plus) only to find a silly solution of course. Solution: Remove two lines which said: “If below zero health, do not draw”
On the bright side I learned alot on how to debug variables, how to work with breakpoints and step into code which will aid me in the future.
Until next time!
0 notes
daniellarsson89 · 10 years
Text
There and back again - Dark Souls II
Long story short: Bought it, died some, *insert confusing here*, done.
I think I can categorize myself as a casual gamer at the moment, playing once in awhile, but sometimes I bring up the heat and play a long session aswell so it varies quite some. Thus it took time to finish this game, but it was joyful as the game adds alot of excitement, frustration, laughs, facepalms and the occasional sobbing whilst playing.I didn´t play NG+ in the first game and I probably wont in the sequel either.
When starting the game I was comparing it against the first game over and over until I noticed that I didn´t know how to level?! Just realising that took me time to figure out(feeling like a total noob). I even missed the tutorial. Was talking to my brother on skype and he kind of just laughed it off and thought I was stupid(he had already began his journey to an area after the tutorial), anyhow when actually knowing how to level I set out and experienced the game. It has it´s ups and downs. The tough part is knowing where to go.
Ignoring that tutorial part above it was fairly straight forward at the beginning. Though later on and towards the end was a total disaster on my part.I did it, OK! I read a walkthrough to realise that I was at the step for the last boss, but I had spent the last gaming sessions for around 3-4hours total of gametime running around searching for a specific place...Oh well. When finished I played some PVP and tried some spells out, but "meh", the magic was in the game alright but it had left my mind already.If I continue to play the game I will probably do a new character instead, sworddancing here we go!
All in all I like that the covenants was alot better in the sequel and it felt polished overall. I Won´t be one of them achievement hunters who will play through the game without any deaths, ever.
Praise the sun!
0 notes