aliens

Author Topic: Battlescape development  (Read 245436 times)

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #315 on: October 13, 2012, 01:48:45 am »
I'll check it out, thanks

edit: and it seems to be working fine, it's added to the code base  :)
« Last Edit: October 13, 2012, 01:58:42 am by Daiky »

Offline Fenyő

  • Colonel
  • ****
  • Posts: 423
    • View Profile
Re: Battlescape development
« Reply #316 on: October 13, 2012, 08:58:54 am »
edit: and it seems to be working fine, it's added to the code base  :)
Excellent! Thank you!!
Oh, and by the way, this code doesn't have any issues with aiming mode!

Now that you added my code to the codebase, if i check it from browser, now i see some lines in the code where are spaces left on the beginning of some lines, screwing up indenting on those points...
I've told you to check indenting.. :)

Offline Fenyő

  • Colonel
  • ****
  • Posts: 423
    • View Profile
Re: Battlescape development
« Reply #317 on: October 13, 2012, 03:07:03 pm »
Here, I present you the "Left-Mouse-Scrolling on the MINIMAP" feature! :)

Daiky!  Please check it, and if its OK, then please commit it in the code base.

Edit:
Oh, and the "right-click closing the minimap" feature is still present, i just put that to mouse-released condition. :)

And the moving with mouse-move is a little fast, i know, since one pixel move of the mouse corresponds to one tile move on the map.
I tried to slow it down by dividing the offset with CELL_WIDTH and CELL_HEIGHT, but the result is not good, this way it can not react to a lot of small movements, and the moving is very laggy.
« Last Edit: October 13, 2012, 03:30:37 pm by fenyo1 »

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Battlescape development
« Reply #318 on: October 16, 2012, 10:21:47 pm »
I like the idea of a mouse scrolling method for the battlescape, that's certainly something that has been long missing. :) to me, however, your way seems counter-intuitive: for mouse-scrolling I would always assume that it works as though you are grabbing the landscape and pulling into a direction by moving. your way is exactly the other way around: you hold the mouse, and when you move the mouse, the landscape is moving into the opposite direction. this behavior is more like the middle-mouse-button-directional-scroll function that you can find in adobe pdf viewer and most browsers (you know the one where a circular "anchor" with four arrows appears where your pointer was, and when you move away from that "anchor", the image starts scrolling in that direction?).

for me, it would feel more logical if the landscape moved as if you were dragging it. just my gut, though.

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: Battlescape development
« Reply #319 on: October 17, 2012, 08:21:53 am »
Maybe we can have a "Invert" switch in the configuration, that way everyone can have what feels natural to them..

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: Battlescape development
« Reply #320 on: October 17, 2012, 11:40:15 am »
It was a real-hard work, due to two idiotic coding schemes used in OpenXcom project:
"Opening brackets - this: { - always lined up in their own lines."
"Spaces after commas, operators, and between actual parameters of a method"
The whole OpenXcom sourcecode is totally unreadable because of these! (and when a tab character is showed as 8 space-characters)

This is a known OXC "issue" :)
« Last Edit: October 17, 2012, 01:07:00 pm by kkmic »

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: Battlescape development
« Reply #321 on: October 17, 2012, 11:46:07 am »
I disagree with the coding scheme being called idiotic; it's not, it's preference...

I always put brackets on seperate lines, unless I'm doing an "} else {", I will space between my brackets (only function call ones though) and after commas too.

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #322 on: October 17, 2012, 12:40:22 pm »
This is a known OXC issue :)
There is no issue. Openxcom uses the international ISO standard of indenting and spacing, which is by default the style if you start a project with Visual Studio.
Let's not start a coding style war here... I started this thread to update you from time to time with the battlescape development progress.
« Last Edit: October 17, 2012, 12:42:19 pm by Daiky »

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: Battlescape development
« Reply #323 on: October 17, 2012, 01:06:41 pm »
Let's not start a coding style war here... I started this thread to update you from time to time with the battlescape development progress.

Agree, let's not steal this topic. So, Daiky - what's up? ;) What's next for battlescape? Stop playing XCom and return to coding OpenXcom ;)

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #324 on: October 17, 2012, 02:56:08 pm »
What's next for battlescape?
I think the alien base mission was already rather complete, it needs some finishing in the way the map modules are glued together, and I think how the items are spawned. Items are now on 1 single stack like in the skyranger, but in an alien base mission, in the original game items on the ground are on different places, if I am not mistaken. I don't know yet what kind of logic is behind the items on the ground in alien base missions...

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Battlescape development
« Reply #325 on: October 17, 2012, 03:03:20 pm »
It was a real-hard work, due to two idiotic coding schemes used in OpenXcom project:
"Opening brackets - this: { - always lined up in their own lines."
"Spaces after commas, operators, and between actual parameters of a method"
The whole OpenXcom sourcecode is totally unreadable because of these! (and when a tab character is showed as 8 space-characters)
When you start your own project, you get to dictate your own coding style. ;)

Anyways it's a non-issue since there's plenty of tools to automatically apply coding styles (eg. Artistic Style), so you can just convert the project to your favorite convention, do your stuff and restore it back when you're done. Everybody wins. :)

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #326 on: October 17, 2012, 08:34:07 pm »
Today I celebrate my 2 years with openxcom, it was October 17, 2010 when I first presented the little community we had those days with a screenshot of the battlescape. One day later I presented SupSuper with a 1787 lines long patch file, which contained the earliest battlescape: it loaded a map and you could scroll around. Everyone was excited about that back then :)
Go back to page 1 of this thread if you want to get that feeling again :)

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: Battlescape development
« Reply #327 on: October 17, 2012, 08:49:45 pm »
Today I celebrate my 2 years with openxcom, it was October 17, 2010 when I first presented the little community we had those days with a screenshot of the battlescape. One day later I presented SupSuper with a 1787 lines long patch file, which contained the earliest battlescape: it loaded a map and you could scroll around. Everyone was excited about that back then :)
Go back to page 1 of this thread if you want to get that feeling again :)

Congratulations - you ( and Supsuper also) are doing a great job

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #328 on: October 17, 2012, 09:49:05 pm »
A quick guide to digging hallways (corridors) between base (alien and xcom) modules:
1) check if we are not at the end of the map and there is a module nextdoors (in xcom bases there can be places filled with dirt)
2) remove 3 tiles of excess dirt and walls
3) place two new walls on the sides of our hallway
4) finish it off with a nice corner
do this for both north-south and east-west hallways

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Battlescape development
« Reply #329 on: October 17, 2012, 09:59:33 pm »
Today I celebrate my 2 years with openxcom, it was October 17, 2010 when I first presented the little community we had those days with a screenshot of the battlescape. One day later I presented SupSuper with a 1787 lines long patch file, which contained the earliest battlescape: it loaded a map and you could scroll around. Everyone was excited about that back then :)
Go back to page 1 of this thread if you want to get that feeling again :)
Ha I remember that feeling. The feeling when I had no clue what to do about the Battlescape and oh gawd everyone is gonna find out how incompetent I actually am and this will never fly and... then you showed up! ;) To many more years of successful development!

It's a shame I never remembered to write down the exact date I started working on OpenXcom, before version control et all, or we could celebrate that too. Earliest I could find was a VC2005 project file last changed February 2009.