The XcomResourcePack loads everything in the constructor of the class;
so there's two options here, either I create a function in the XcomResourcePack to load battlescape tilesheets (and unload them at the end) or create a seperate resourcepack with tilesheets, sounds for battlescape and delete the resourcepack when battle ends.
To know what we are talking about I just tested it with one single resourcepack loading at startup. Loading 48 extra battlescape PCK (which is terrain+units) files takes up about 12Mb of extra memory. And maybe 1 second of extra loading time my laptop.The XcomResourcePack loads everything in the constructor of the class;
so there's two options here, either I create a function in the XcomResourcePack to load battlescape tilesheets (and unload them at the end) or create a seperate resourcepack with tilesheets, sounds for battlescape and delete the resourcepack when battle ends.
Or just load everything at game start and don't care about memory usage. But on the other side maybe it would be better to keep memory usage lower - for some devices with less memory.
small update on milestone 5:
- XCom Craft placement (done)
- Ufo placement (todo)
- Battlescape starts when landing skyranger at a crash site (todo)
- big code review so this patch can be integrated for the first time in the openxcom SVN repository (in progress)
Expecting patch somewhere this week...
Daiky i think that is small bug in battlescape, in mission during night source of light under solder is too big. its made 4 squares bright not only one under solder.Hi Yankes,
Daiky i think that is small bug in battlescape, in mission during night source of light under solder is too big. its made 4 squares bright not only one under solder.It's fixed now.
- items in soldiers hands displayed on the unit
Btw, does fire emit light? Did it in original?Shame on you michal, you call yourself an x-com fan? ;)
oe oe oe ! A new git build: https://openxcom.ninex.info/git_builds/2011_02_16_2218 version from that link is buged, in misions everything is black. (no light)
Featuring: nothing very impressive really...
The crew on your skyranger gets a few test-items pushed in their hands. And if you click the item you get a cross-hairs cursor to aim :) And if you right-click you cancel the action.
They are not allowed to shoot - just yet :)
Could you please give more info when you report a bug, like a screenshot in this case and system you are working on, and also report it in the bug report board? Thanks.WinXP sp3
btw Volutar, Do you have any idea which bullet trail belongs to which weapons.Of course. There is a table with info such as bullet sprite, fire sound id, hit sound id and hit animation type. For each weapon.
Also any idea on the correct starting voxel of the bullet? (I guess it depends on stuff like kneeling/direction of looking).Height of unit (table data), kneeling height (table data), current elevation (according tile height unit standing, also table data) used in calculating Z position of fire origin MINUS hardcoded level of chest (I don't remember exact number - it doesn't matter really). X and Y coordinates in voxel space taken from 2 tables (depends on small or large unit) which contain X and Y offsets for each direction.
By the way this calculated "origin" point also used for sight calculation for EVERY unit.
All this info is in https://ufopaedia.org (at least on discussion pages).
Hi Yankes, I have located & fixed this bug. So if you take the latest build from the git builds page, you should not see this random black-tiles effect anymore.Could you please give more info when you report a bug, like a screenshot in this case and system you are working on, and also report it in the bug report board? Thanks.WinXP sp3
some screenshots: https://www.mediafire.com/?p7bx53qa59b3a81
usually day missions have this
Am i the only one to think that openxcom development accelerated recently? :) There are many new features in battlescape, also geoscape isn't worse (purchase, transfers) :)AI will probably be the hardest feature, everything else is pretty direct. :)
If such rate will be maintaned i fell that openxcom will be playable (maybe not finished, but playable) in this year :D
Yeah, but even most stupid ai can give game a bit of playability and enjoyment ;)Don't be silly, there is no finishing in X-Com, only death. :P
For now, project is more a tech demo than actual game. When we will be able to finish mission (or die) it will became a game ;)
There is two minor fixes you should consider (1st if yours, and 2 is probably SupSuper's).I think both are mine. :P And thanks, I knew the Battlescape text was drawn differently but I couldn't figure out exactly how.
1) Energy numbers are slightly in wrong place, and should be shifted 1 pixel right.
2) There are two different modes for text drawing functions. Mode A - ordinary colored letters, when every font pixel value just added to font color - *screen=color+letter_val. And mode B (which is used for BattleScape) - when every font pixel value added with x3 value (so called high-contrast mode) - *screen=color+3*letter_val.
I am still lurking watching your working, coming along really well mate super job!!
Changing:
Soldier - implements Unit, although this changes nothing on the geoscape side.
BattleUnit - holds pointer to Unit.
[...]
Note that BattleUnit is not a descendant of Unit, this is intentional. Otherwise if a Soldier enters a battlescape, the Soldier class should be "morphed" into a BattleSoldier class, this is tricky business and especially hard to maintain - if new attributes are added to the Soldier class. So for each Unit participating in battle a BattleUnit instance is created which holds it's corresponding Unit pointer.
As a rule the Alien class counts for all NPC units: so including civilians. The type of class does not define whether a unit's AI is hostile towards x-com. This is taken care of with a "faction" attribute : friendly, neutral or hostile.
I think 0.3 is a big step for the battlescape. Probably the only other big piece missing from the battlescape is the AI.
I think 0.3 is a big step for the battlescape. Probably the only other big piece missing from the battlescape is the AI.
What about 2x2 units? Won't it require many changes to pathfinding? Or will it be simple?
looks like development extremly slowed down.. nuff saidlooks like you don't contribute anything but only negative comments.. nuff said
i know whats programming because tried it many times ;)
and happy such provocate post motivated team
sometimes critic even not too objective speed up development
dont be angry on me plz :D
looks like development extremly slowed down.. nuff said(https://i6.photobucket.com/albums/y237/supsuper/OpenXcom/openxcom_dev.png)
but for some reason the automatic build did not work...
before people start panicking about the fewer updates on my side... I'm on holiday for 2 weeks... without my c++ compiler :pHow can you live without it! :o
If I would have to re-implement this I would just remove the "set timer" screen entirely.
Well, action is a big word :) I'm doing a few things from time to time, especially the more fun stuff, leaving boring things for last :pYeah boring stuff is my job. :P
Hehe, do you remember these?I remember them but not very fondly. :P Nice work.
I have to cheat a bit to get tanks on the screen however, I don't think people will get to see them in the next beta without cheating. Because at the alien side they only appear on terror missions. On the soldier side you can't equip the craft with HWPs yet.
But I think people will have plenty of other things to play with.
- For people that can not wait to test vehicles in the intermediate build, I will commit some code this week that gives you a free tank/cannon in any mission.
if (part < 0)
{
part = 0;
}
Reaper arent biological? you can fear them and probably stun.
Base defense mission is almost implemented (only missing the logic of the aliens trying to destroy the facilities and actually removing the facilities from the base, and a few other details :p).
The trick is to use blaster bombs on the hangars and access lift early in the game, and those are facilities that can not get destroyed. When the aliens get further inside your base you better use more precise weapons and be careful that aliens are not using blaster launchers to destroy your base :p
If the hangar would get damaged by grenades, the first thing the aliens will do when they spawn in your hangar is damaging it with grenades :p and you can do nothing about it... wouldn't that be a bit too harsh?After further consideration, I agree that this will be too harsh.
at the same time, if your base defenses shoot the ufo down, it should crash and appear as a geoscape crashed ufo, right?
Any news on when Terror Sites will become active?I still need to add civilians. Terror Sites are your favorite part of the game isn't it? :)
Conti-k, I know those 3 issues you mention
and eventually I'll hope to get around polishing the AI a bit more later on, but I've put it a bit lower on my list of todo.
Item | Battlescape | Research | Manufacture | Ufopaedia |
Laser pistol | Yes | Yes | Yes | Yes |
Personal armour | Yes | No | No | No |
Feature | Implemented |
Shooting | Yes |
Dying | Yes |
Lifts | No |
Psi control | No |
Feature | Implemented |
Shooting UFO | Yes |
Shooting X-com interceptor | No |
I recently found a copy of the book "Art of Game design": https://artofgamedesign.com/Doesn't armed civilians work already? I never tried, I don't know what happens when you put a weapon in a civilians' hands :p Probably doesn't work.
it's really a great book, so in my free time I'm going to read that.
And other than that I'll just play openxcom a bit and see what is missing and then implement that missing part. I'm going to check if personal armor works in battlescape, I think not. So that might be next.
damn, personal armor already does work perfectly in battlescape :) I'll implement the destruction of items on the ground by explosions today.
My Battlescape TODO-list for this month in the order it will be implemented. We'll see how far I get :p
If you want a challenge, you can write the drawing routine for the Sectopod :p
Here are the frames:
https://www.ufopaedia.org/index.php?title=X_ROB.PCK
It's like putting together a puzzle.
you will find that pckview comes in several versions, some of which work better than others. for me, on win7, the one that comes with mapview appears to work best:
If you want a challenge, you can write the drawing routine for the Sectopod :p
alien life forms drawing:
(there is certainly an overlap between some of them)
- floater
- reaper
- snakeman
- chryssalid
- zombie
- muton
- celatid
- silacoid
- sectopod
STATUS_FALLING is the dieing animation, used for both dieing or falling unconscious, hence the nameThought so, but am confused on why the sectopod dies properly when I don't handle that code :D
Great work so far by the way. I've done de mind probe and working on the psi-amp. But the week-end was way to short :pGood stuff. I'm afraid I didn't get to finish the arms off. I'll see how I am for time this week :)
I think that you should get points (and "live" aliens) for any mind-controlled and stunned alien on the map.
so, quick status update:Good job!
- psionics are in (panic / mind control), however not sure if mind control will already behave perfectly all the time, probably not.
- mind probe is in
or refer to original, 100% correct data. It's your choice.You mean you got the exact data for all units? Or going from screenshots?
You mean you got the exact data for all units?Strange question:) Exact data, and don't you doubt!
Strange question:) Exact data, and don't you doubt!Not really all that strange, I've never seen any about. Care to share the data? Would help tremendously
Not really all that strange, I've never seen any about. Care to share the data? Would help tremendouslySure, I'm often on the IRC.
I feel like doing the alien base mission next... and together with pmprog getting as much aliens done... some more AI... and then BIIIG holiday for me ;DStill on big holiday :p But I still feel like doing the alien base mission next. Perhaps this week.
edit: and it seems to be working fine, it's added to the code base :)Excellent! Thank you!!
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 :)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.
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...
It was a real-hard work, due to two idiotic coding schemes used in OpenXcom project:When you start your own project, you get to dictate your own coding style. ;)
"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)
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 :)
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 :)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!
Go back to page 1 of this thread if you want to get that feeling again :)
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.Actually it shows you the place where you move the mouse. :)
Maybe we can have a "Invert" switch in the configuration, that way everyone can have what feels natural to them..That's an other good idea!!
I disagree with the coding scheme ... it's preference...Not for me...
ISO standard of indenting and spacing,Just for curiosity, could you please give me a reference, where it is officially stated, that this indenting and spacing is the ISO? (i haven't found any)
which is by default the style if you start a project with Visual Studio.That's the first thing i change by loading back my configuration after an install.
Anyways it's a non-issue since there's plenty of tools to automatically apply coding styles (eg. Artistic Style (https://astyle.sourceforge.net/)), so you can just convert the project to your favorite convention, do your stuff and restore it back when you're done. Everybody wins. :)Wow! Long time i planned to make such a thing to avoid these situations. Its good to know, that somebody already done this!
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 :)Congratulations ;)
Go back to page 1 of this thread if you want to get that feeling again :)
fenyo1 - there's an edit option for your posts. Posting 6 times in a row looks kind of silly...Yeah, but it is simpler. (editing, and a lot of copy&paste we're talking about)
SupSuper!Hmm really? I remember the camera often ended up somewhere random after loads, and it'd be handy for all the battlescape stuff where the camera ends up focused on something completely unrelated. I'll wait for Daiky's opinion on it.
I think there is no reason to the implementation named "- Added Battlescape camera position to saves.", if the game centers the currently selected unit anyways. (after game-load) :)
I'd say you should save the camera position. After all, it is a "saved" game, right?It is already saved. :)
before 1.0 releases:D
I'm currently busy merging in Warboy's battlescape work into openxcom, starting with all the aliens we are still missing. It goes well so far, I'm however not committing anything yet, I don't want to keep SupSuper from wrapping up his 0.4.5 version
if you move your cursor to the edge of the screen (or window if playing windowed), the game starts its usual edge-scrolling! so if for example you want to scroll to the right, you "grab" something on the right-hand side of the screen and "drag" to the left, but once you reach the edge it starts scrolling to the left, because you hit the left edge!Yeah, i noticed that too. That's a downside of the inverted mode. :)
I think there are two possible fixes for this:I prefer this one. :)
1) disable the edge-scrolling mechanism while holding right mouse button (scrolling should continue beyond the edges of the screen, then.)
2) invert the edge-scrolling mechanism while "battleScrollButton: [whatever]" is pressed AND "battleScrollButtonInvertMode" is "inverted"I don't see the point in this.
btw, I think you should change that "battleScrollButtonInvertMode" to accept "true" and "false" as options, to have it consistent with the other "switches" in the config file, don't you think? maybe call it "battleScrollButtonModeInverted" instead, defaulting to "false".Maybe. :)
The rest is still text, but they are a lot smaller. The yaml library automatically encodes binary to base64.try this
edit: having lots of troubles getting it working however. I'm not very experienced with binary, for example how to convert a series of unsigned char * to int's or vice versa. I'm doing things like buffer[ptr] + buffer[ptr+1] << 8 + buffer[ptr+2] << 16 + buffer[ptr+3] << 24 ... don't know if it's best practice. The version I currently have is constantly crashing on loading, so there must be things wrong.
buffer[ptr] + (buffer[ptr+1] << 8) + (buffer[ptr+2] << 16) + (buffer[ptr+3] << 24)
and remember std::cout<< a + 5 << std::endl;
use same operator :>
try thisCode: [Select]buffer[ptr] + (buffer[ptr+1] << 8) + (buffer[ptr+2] << 16) + (buffer[ptr+3] << 24)
*((int*) (buffer+ptr))
or *((int*) &(buffer[ptr]))
#include<stdio.h>
#include<stdlib.h>
int main()
{
unsigned char buffer[] = {0xff, 0x7f, 0, 0};
char caveat[] = {0xff, 0x7f, 0, 0};
int ptr = 0;
printf("%d\n", *((int*) (buffer+ptr)));
printf("%d\n", buffer[ptr] + (buffer[ptr+1] << 8) + (buffer[ptr+2] << 16) + (buffer[ptr+3] << 24));
printf("%d\n", caveat[ptr] + (caveat[ptr+1] << 8) + (caveat[ptr+2] << 16) + (caveat[ptr+3] << 24));
}
32767
32767
32511
thanks for the hint.
So if you save a file and transfer it to a system with other endianness and try to load it there, that'll not work with that casting/pointer thing. So I prefer the one with the shifts, so you convert using same endianness?
i = ntohl(*((int*) (buffer+ptr)));
and the write operation:*((int*) (buffer+ptr)) = htonl(i);
Volutar, thanks for clarify that one up :) It must have been something like that.I have no problem with people making fixed version of the data files (just make it separate from the binary release). After all people have been patching the original (https://www.strategycore.co.uk/files/ufo-enemy-unknown/patches/) for ages. It's just me and Warboy found out those patches have their own bugs... so, you know, if anyone actually manages to fix the bugs without introducing new ones, I'm totally all for it. :P
We probably have to make the discussion of openxcom providing patches to data files active again.
AVOID the strategycore combo patch!Could you list these problems, so Zombie can fix them?
it contains AT LEAST one garbled tileset, and causes numerous problems.
The terrain selection part of the battlescape generation is now unhardcoded and moved to the ruleset. [...] it's another small step towards TFTD and more moddability.
snuck this in while no one was looking: (https://github.com/SupSuper/OpenXcom/commit/297a25c4dbf8ca737d0a88344bbda58bbb3bd149)
I see. Also, I hadn't realized this was actually a vanilla game mechanic (it never happened to me!) so that is interesting.
for a facility to be considered "destructible" by the engine, it must have an "object" on the top floor whose MCD has byte 60 set.
and any incoming item transfers end up at the dead letter office.Does this mean that from the player perspective they're lost forever?
It's neat to see the accuracy by the crosshair now, but I'm not sure what exactly it means.
Why only on the top floor? To make them harder to reach by the aliens?It's just how the facility maps are designed, the bottom floor is just corridors, the top floor has the actual facility. See here for more details: https://www.ufopaedia.org/index.php?title=Base_Defense#Destruction_Of_Base_Facilities
it refers to a unit type, rank is defined by that. also, what sailors? we only have males and females here in ufo defense.
i merely added the capacity to define the civilians according to the terrain set.
If you have resolved the multiple pallette problem by code
this work is useless therefore I can address other features that i like.
you'd need a complete ruleset for that, and i haven't even decided which research tree to run with yet.
problem with that tech tree is that it's the one that has the bugs