Jump to content
  • Advertisement

Josip Mati?

  • Content Count

  • Joined

  • Last visited

Community Reputation

1304 Excellent

About Josip Mati?

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Josip Mati?

    Project update

    Hello So, classes started again, and my duties as a student returned. Luckily, my schedule is pretty neat (monday and friday full, wednesday normal, thursday labs here and there, and tuesday empty), so I can pretty much arrange everything to perform at my maximum capacity. Classes I'm attending to are Math 2, Physics 1, Network Programming, Development of Software Applications and Engineering Economics. So, with that in mind, I've been working last few weeks improving the game from my speedrun and I got it to the pretty satisfying state, requiring only few bugfixes here and there to call it mechanically "complete". There are three current issues in the game: While ramming into moving solid tiles (walls, switches), ball is capable of becoming stuck into them. In certain situations, player can move the ball into a non-moving solid tile, becoming pernamently stuck. Players also can get stuck when standing into the place of the appearing wall (I have 2 options here - push ball out of the way or kill player. probably both depending if there's free space around or not). Text scripts aren't implemented properly. Background. For background, I used plasma fractal algorithm to generate it. While it isn't visible from screenshot and requires or demo to show it, constantly exchanging background can irritate eyes. What I aimed for is effect similar to this, but the best I can is shown on video. I don't have any idea how to animate even grayscale to make something decent, nor could I find anything while doing research - all my search showed me the algorithm I already implemented. My next step is to rewrite standalone level editor, which is horrible in the current state. Unlike the game itself, level editor is based on the Windows Form and uses elements like PictureBox, Buttons and others. While the editor... kinda... looks decent: code behind is unmaintainable and full of bugs. For example, when I save a fresh level, then load it again, this happens: The thing is, I don't have any idea why... that... happens.. kill me, I just realized while writing this - when creating an array of tiles (enum), array elements are by default first initialized to 0, which is enum value of gray ball. So, I've decided to rewrite level editor to use XNA and behaves like a game, trading one set of problems for another. XNA doesn't have controls like windows forms have, so I'll have to write similar things myself. I also hope it will end up visually more appealing, and one day I might even integrate it into game itself as game is close to the end of its lifespan. If I ever get to that point. Back to the game itself, I'm currently looking to upgrade sprites and music - either by doing them myself, or to find someone willing to do it instead of me, as I suck in both. Maybe even change the background. Also, Softpedia put both on my games on their page, only notifying me after that. While I was initially suprised, I'm glad they did that. Plan for the game is this: Finish it completely for Windows using XNA and polish it as much as possible. Convert it to Monogame and release Linux and Mac friendly version Given enough interest, either manually rewrite it into Java for Android and iOS or pay access to Xamarin to be able to simply port it with Monogame. Thanks for reading!
  2. Josip Mati?

    Post-semester speedrun

    Phew, it's been a while. Semester finally over, all classes have been passed, now I have free time until summer semester starts full force. Not that I've had to do much anyway as classes were easier... Anyway. This will be like a personal diary, so my rambling might be incoherent. Speedrun Yesterday, after exam passed, I came up on the idea of performing a programming speedrun, in order to see how fast, using tools I know, can I spit out working prototype of the game. For game, I choose a simple gamplay: a ball which moves vertically at a constant speed, chaging direction when it hits an obstacle. Player navigates through the labyrinth using left and right arrow to control its horizontal movement and has to come to the exit while avoiding hazards. So, armed with C#, XNA and Photoshop, I started at exactly 0:00 CET from complete scratch. 2 hours later, after basic code was written with some hardcoding of values, I've started to get something which looks like the game I had in mind: At that moment, only level loading, ball vertical movement and vertical reflection were implemented. Code was a mess even at that point, but I didn't stop and refactor, but continued writing for 1 hour and 40 minutes, finishing the game with horizontal movement, hazard detection, camera movement and exit point: https://www.dropbox.com/s/glbl4b9y5dmrfnm/BouncyBall.rar (requires .NET 4.0 and XNA Redistributable) So, in total, 3 hours and 40 minutes (pauses included) were taken for a complete game. And now, I'm in dilemma: what now to do with it? I've got so many questions for myself which I'm unable to answer. I could polish it in few days of pure work, but I don't know if it's worth it. Biggest issue with the game itself is rectangle-rectangle collision between ball and objects, which I left in the game to be faster and should be fixed as it is fake difficulty. Other basic additions are main menu, proper level progression, level editor and multiple obstacles and hazards. Code itself is also a complete and utter mess which should be sliced apart with refactor knife... Screenshot showing how insane levels can be... About other topics... Tank City is still on hold until I raise enough will to finish it. I plan to do it before summer semester starts. As a player of Star Trek Online and member of one fleet there, I've teamed up with one other programmer for a "fleet project". We've started work on our "Ship Build planner" to incorporate with our fleet site and, if possible, compete with STO Academy's Build planner. I hope I'll learn more about web developing, databases etc. from that. On the artistic side, I've finally properly took pen and pencil and started drawing. After copying few images only by eye, I've set out to draw characters from my mind with as little references as possible. Results were... well... satisfying for me, considering those are 6th and 7th drawing: I need to learn to properly draw eyes (big eyes aren't problem, but when I need to draw them small...) and hands. I hope I'll learn to use sister's tablet and be able to redraw them properly in digital format... Thanks for reading!
  3. Josip Mati?

    I quit my job...

    Best of luck!
  4. Josip Mati?

    In defence of hit points

    I like this, we can discuss it all day. I'm in a hurry, so I won't be able to write everything I want   For starters, I always though that "hit points" or "health points" (pick your choice) are abstract number that represents how much damage character / unit / whatever can take until it dies / is destroyed, assuming it has at least some armor.   However, that definition very often falls flat in games where you can't control character(s) / unit(s) in order to evade attacks like sword in the neck. In my opinion, it is impossible to devise a system where you could faithfully approximate those kinds of attacks without being antifun to play with.   I have to agree with Bacterius - not only is it idiotic, it cannot be rationally explained (unless it's some kind of energy shield, like Protoss in StarCraft series; for those who don't know, Protoss units have non-regenerable hit points and shield points which regenerate when units are out of battle) and doesn't punish mistakes. Also, games with a mechanic like that usually have opponents dealing more damage to you than in FPSs with health bar, forcing you to hide, and tend to bore fast: shoot, cover, shoot, cover, run, cover, shoot... I still like the games like Unreal (1!!), Half-Life
  5. Learned about chiptunes... now to make some music ^^
  6. Sound effects added, I feel like 5yo again. Now back to graphics and polishing some details.
  7. Refactoring completed. coop basically fixed, playing now with microphone for sound effects
  8. Josip Mati?

    Embedding Math Equations in Articles

  9. Josip Mati?

    Fighting the code backfire

    Thanks for the for the quick lesson and warnings, I appreciate it and make sure I remember it for later. :) I also liked your composition example.   Anyway, what I wanted to point out with "lesson 1" is to use what language has to offer. I probably didn't express myself properly.   Going back to my code, instead of possible branching dozens of times I used what C# has to offer. So, I decided to solve co-op through inheritance and just extract co-op parts into the inheriting class because 90% of code used by both modes is basically the same, so I just had to extend the functionality to cover 2nd player, hence the inheritance. If problem was different, I would use different solution to it. Isn't that what programming basically is? :)
  10. Josip Mati?

    Fighting the code backfire

    Hello While it's on my mind, I wanted to write here few lessons I learned in last few days. If the language supports polymorphism, USE IT. Design before coding. Having properly structured code helps. A LOT. Keep the objects closely related on one heap. Those points don't seem to be related, right? Allow me to explain. I've started to hunt coop related bugs in the game. Code, on the first look, seems to work perfectly; however, most code is structured like:if (multiPlayer == 0){ // do single player behavior}else{ // do co op behavior} or a variation of that code, depending on player which "activates" part of the code. So, here's lesson 1: Why making numerous comparisons like that through the whole class - some of which are surprisingly volatile - when I can make new class which inherits the current one and override specific methods to adapt them for co-op mode of the game. With that, I'm also avoiding the problem of pointless allocation of resources (time and memory) for object related to co-op mode. Sound simple, right? Well, lessons 2 and 3 strike here at the same time. Due to "designing on the fly", I have to rewrite and refactor big parts of the code to adapt them for polymorphism. This means a lot of wasted time, due to the though process: "Hmm, I'd like to add . Well, I can add this code here, and that code there... *writing code* Oh cool, this works! Yaay!" "Now, to add ... *writing* Crap, code isn't good here anymore... *moving and/or rewriting code* Good, now works." "OK, is next... oh not again, is broken. *rewriting and/or moving code*" "ARRRRRGH, NOT AGAIN!" (I'm now at this point) Result: lots of wasted time trying to improve the structure of the game while trying to preserve current functionality (a.k.a. trying to NOT break it). However, while I'm rewriting the code, I have to be careful. Some parts of the code, with best example being Draw(GameTime) method where last drawn object is on top, require executing in specific order. So, I can't simply do this:public class A : GameScreen{ // ... public override void Draw(GameTime gameTime) { // ... }}public class B : A{ // ... public override void Draw(GameTime gameTime) { // ... spriteBatch.Draw(player2texture, player2rectangle, Color.White); base.Draw(gameTime); }} because Player 2's sprite would end on bottom of everything, which may not be desirable. Solution for that problem that I came up with is to extract relevant parts of A.Draw() and raise them to Protected level:public class A : GameScreen{ // ... public override void Draw(GameTime gameTime) { PartA(); PartB(); } protected void PartA() { // ... } protected void PartB() { // ... }}public class B : A{ // ... public override void Draw(GameTime gameTime) { PartA(); spriteBatch.Draw(player2texture, player2rectangle, Color.White); PartB(); }} This is also why properly structured code is necessary. Instead of having massive amount of code inside one method, having the same code split over several methods improves maintainability and readability. Lesson 4 is connected to 2 and 3 as well. Inside my Gameplay class (the one having actual game logic) I had few... awkward? objects:Texture2D player1Texture;byte player1spawnID;Texture2D player2Texture;byte player2spawnID; Why is that?Player player1;Player player2;public override void LoadContent(){ player1 = ScreenManager.Player1; player2 = ScreenManager.Player2;} In other words, I have objects related to players, whose objects persist through whole game, being created, disposed and recreated inside the class having game logic. Memory problems aside, not having player sprites stored inside player classes also forces me to needlessly duplicate the code and use additional checks to decide whose texture I need to move. Luckily, I don't need to do much to restructure the code and eliminate that annoyance. Suddenly, improving level fie doesn't seem so important. So, what did I learn from all that for next project (which is already defined in my head)? I wasted too much time restructuring current project to enable modifications and upgrades. In order to avoid this in next project, I need to write Game Design Document and Tech Document in order to precisely define project and save time. I hope that I won't repeat mistakes in the next project (Snake clone with 3D camera.) After reading some topics on GameDev.Net, especially this one, I realized I have to learn the following: Garbage collector Making unit tests Thanks for reading, I'm returning to my code.
  11. Josip Mati?

    Hard lessons

    Thanks for the lesson, I learned a lot and remembered some things from Computer Architecture course :)
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!