New Dawn
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Latest topics
» The good, the bad, and the ugly
The good, the bad, and the ugly EmptySun Jun 20, 2010 7:45 pm by Admin

» Events are happing
The good, the bad, and the ugly EmptyWed Apr 14, 2010 11:29 pm by Admin

» Progress! . . .
The good, the bad, and the ugly EmptyFri Apr 09, 2010 5:10 pm by Admin

» Soulmen(jordan)
The good, the bad, and the ugly EmptyWed Feb 24, 2010 7:56 pm by soulmen

» Basic starting blocks
The good, the bad, and the ugly EmptyWed Feb 24, 2010 7:41 pm by Admin

» Okay so uni isn’t so demanding as I first thought.
The good, the bad, and the ugly EmptyMon Oct 26, 2009 4:39 pm by Admin

» MP Architecture: Client/Server or Peer-2-Peer?
The good, the bad, and the ugly EmptySun Oct 04, 2009 2:34 pm by Daemn

» What I am working on at the Moment READ!
The good, the bad, and the ugly EmptyFri Sep 25, 2009 5:15 pm by Admin

» Development Framework available at SourceForge
The good, the bad, and the ugly EmptyTue Sep 22, 2009 9:46 am by Hairein

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

The good, the bad, and the ugly

Go down

20100620

Post 

The good, the bad, and the ugly Empty The good, the bad, and the ugly




I haven’t been as active in programming lately, having said that I have made some additional “breakthroughs”. But firstly I shall start with the negative stuff.

I did get a few people on board, and e-mails where flowing back and forth, the persons involved where very counterproductive. I was rather disappointed as I spent a lot of time writing step by step guides of how to carry out their set tasks. Three weeks passed and the people involved hadn’t even looked at the code, let alone make an attempt at programming. I kept getting e-mails saying,” I’ll look at it later”, or “I don’t know how to do that”. In the end I did it myself, it took me a whole 10 seconds to complete. I lobbed the code into MS word, found all words with the phrase ‘unit’ in them and replaced with ‘building’.

Having said all this, please don’t let it put you off this project, thinking I’m some kind of evil mad man who will throw you in the deep end, giving you no support. If you’re beginning programming I welcome you to join the team, I’ll do what I can to help you settle in/ get started as long as I see effort and comment from you. Bitch over.

Lately the organization has begun to suffer as I’ve been adding snippets of code here, there, and in the most unexpected places. One of my main focuses of the next couple of month’s weeks will be sort this out. On the same theme, having not spent much time on the project lately I noticed that my most recent frenzy of programming was left uncommented, as a result it took me a while to remember what certain pieces of code did, or how they related to the master plan. What I’m getting at and my advice to other is don’t follow my example and leave any piece of code uncommented. I’m not saying comment everything down to the last integer, but rather comment every block of code and how it relates to the bigger picture.

I now have the very basics of movement implemented into the engine. ‘Unit images’ are now able to interact with “map tiles”. When moving across the screen, an image doesn’t re-calculate which tile it is current in, it just glides to match the X value location of whichever map tile was clicked. I’ve only written code for moving in the X direction so far as, a) I’m too lazy to change a few values to make Y travel a reality and b) I don’t know enough about path finding yet.

With regards to images and the rest of the engine; at current the images are just that, images. When saying this I mean the image of a swordsman doesn’t know they’re a swordsman or where they’re in relation to the rest of the map. The same can be said for a map tile, the tile doesn’t know that it forms part of a larger landscape as far as it’s concerned it’s just ‘there’.

I’m not sure if I’ve mentioned this before, but when there are two or more overlapping images if the user clicks or triggers events in this area, all events for all images concerned are activated. I haven’t managed to solve this problem yet. I’m guessing this could be solved using some form of Z-ordering, although I haven’t had much luck in my searches for this. If anyone could point me in the direction of some references, or example code I would be most grateful.

The animation code has made progress too, though the way animation images are loaded has added few problems. Anything that is animated has been mostly hard coded, unlike single images which are all scripted. Hopefully this shouldn’t prove too problematic; adding an option/function for multiple images using the same Surface would solve this. I may even set up an entirely separate class to handle this that way I’m not going to have a load of unrelated functions/variables in the same class.

In addition to what I may have mentioned briefly above my main focuses for the next few weeks/months will be on; path finding, re-commenting code, and tying ‘images’ to game objects.

For those of you who read to the end thank you for showing an interest in this project. Even though this is the end of my post there are rather a lot of things I haven’t mentioned, I’ll save that for another day, hopefully the interval between this post and the next won’t be so great. Until next time.
avatar
Admin
Admin
Admin

Posts : 105
Points : 5613
Reputation : 3
Join date : 2009-07-16
Age : 34
Location : Wrexham, United Kingdom

https://spartanstudioforum.darkbb.com

Back to top Go down

Share this post on: reddit

 
Permissions in this forum:
You cannot reply to topics in this forum