Jump to content
XCOMUFO & Xenocide

Ufo Remake In Java


mrnikosia

Recommended Posts

Big Xcom enemy unknown fan here :)

I'm working on a UFO remake in java, well i will try to get the tactical

field to work first!!

 

I tried to do something similar in the past using c++,

though i have experience in c++, you have ALOT of work

each time writing code for trivial things, it slows down progress bigtime!!

Like eg: you want a dynamic array, then you can write a special class

for it to work etc.... and pointers, you have to always keep them in mind,

also confusing coz, sometimes you use references etc... big headache! :)

 

I got the maps and units working, ill add a screenshot, but

the project still needs LOOOTTTSSS of work :)

 

http://img381.imageshack.us/img381/7849/ufoil4.th.jpg

Link to comment
Share on other sites

  • 3 weeks later...

Hi there,

Currently am working on a ufo remake.

At first I would love to do a new version, in 3D and extras ....

But in the end I'ts ALOT of work, and you don't kinda know where to start,

so i decided to rewrite the game like the original, using most of the orgininal graphics, and maybe add a few features.

And also because my current version has bugs (captured commanders don't show up in alien containment!

so i have to restart the whole game).

 

Now UFO2000 is something similar, but i'm having a headache with c++ OMFG

I tried some code in c++ in the past, but it's at least twice more work!

And like segre says: it's harder to read code than to write code ^_^

Well using java automatically solves the portability problem as well!

and cuts down development time BIGTIME!

Anyway ALOT of respect for all the guys putting there effort in making games

like UFO2000, Xenocde, etc...

 

Well here is a preview of some hard work :P , about a 1 months fulltime work now i think, day in day out,

it's becomming an addication really!

Could you give me some feedback of your framerate, i want to know if the game is slow or not!

For me it's about 60-30 fps average, 30fps when roof of buildings is shown.

 

Running the preview:

- Make sure you have java runtime environment, most people do (at least for their netbanking :))

you can grab it from www.java.com

- Just download the zip file, and extract

it to a folder like "uforemake"

In this folder there will be a subfolder "ufo", copy ufo subfolders in here!

- Double click on uforemake.jar, if java is correctly installed it should run directly

if this doesn't work or you're having an older java version, you can go into the command prompt

and type "java -jar uforemake.jar"

 

Features:

- pcks & mcd loading

- maps: loading, generating radom map

- can fire guns only in aimed, and only 1 gun avail at the time

- inventory basics work

- astar pathfinding

- can walk up stairs

- doors working

- units are skinnable

- Line of fire for bullets is using LOFT templates for collision detection

- unit with the armor suit can fly

- ....

 

----------------------------------------------------------------------------------------------------

 

* 2 DO/Bugs

* ---------

* - inventory

* - map lightning

* - map los

* - explosions

* - throwing

* - items

* - cell or tile takeDamage(amount/points,type=fire/expl/gunfire)

* - largepck loading doesn't work

* - run rendering in seperate thread so we can do infinitive loop

* and take advantage of multiprocessor systems

* - randommap: buildin some rules

* - projectile: - the bullet skips during first 2 frames a bigger distance

* - hittin floor z=0 leaves a hole in the earth

* - make mapscrolling more smoother! -> increase framerate / 10 -> take framerate over 2 seconds

* - normalise all constant sizes to Tile.SX, SY SZ to allow later upgrade of resolution

*

*** Unit Stuff:

*

* - make unitskin suitable for tank etc 2x2 units

*

* Minor bugs

* ----------

* - fix cursor, throw imgage is show without box ...

* - some units cannot walk -> canwalk = false eg: floaters

* - unit cannot fall

* - when we want our unit to fall, allow it! -> last pos eg make possible!

* well with the original sometimes unit goes up the stairs and sometimes behind the stairs?!

* - clicking behind stairs gets unit to climb stairs like the original

* -> it does this: cell -16, if click next to this check if ceiling, if yes go up stairs else walk down!

* - original xcom has shadows of bullets projected on floor

* - if unit falls onto another unit it will be impassable and float above the other unit?

* so we don't have clipping when walking up stairs

* - cleanup the imports for all java files

* - if unit is moving upwards thus halfwaycell not used, keeps movestatus of previous tile instead eg fly (minor bug)

* - Unit foot dissapears when moving upwards w,nw,n

* when try to fix (no halfway method), encountered ceiling clipping with unit

* - pathfinding G scoring needs to be adjusted to weight also the timeunits

* a simple multiply will do (i guess)

* - up/down, unit is still moving sideways during up/down

* - multiple projectiles/bullets per cell would be cool!!

* - pistol should move along with displacements of unit

* problem is the unitpartmode, it is random!!

* maybe just include holdingdisplacement

* - map ispassable does't check unit blocked for -1 or +1

* - unit shoots first and then turns to direction

*

post-14153-1179610787_thumb.png

uforemake.zip

Edited by mrnikosia
Link to comment
Share on other sites

"Could not find the main class. Program will exit." :(

 

I would recommend installing the latest java JRE, on http://www.java.com

I guess that is the problem, to be honest, uforemake has only been

tested on my computer, i will try to run it by some friends later on,

to c if they have the same problem.

 

Thanks for the feedback, this way i can look for a solution!

Cheers

Link to comment
Share on other sites

Guess win98 support is finished quicker than i thought.

Anyway I tried it on another computer and right after i installed the JRE it didn't

work by simply double-clicking on it, so i created a ".bat" file containing

"java -jar uforemake.jar" and that worked.

Double clicking worked by setting the default "open" program to java instead of winrar :)

 

Update uforemake:

- Experimental Line of sight

- Experimental lightsources, i cached all the tiles to 16 variations of brightness

to allow a quicker drawing, thus a better framerate, but it needs about 100megs of ram,

so am looking for other techniques :)

- Beginning implementation of explosions

Link to comment
Share on other sites

  • 1 month later...
Nice :)

 

Good luck with your project and keep us informed ;)

 

Great! thnx

 

Update status:

 

* Timeunits implemented

* several bugfixes

* experimental accuracy algo

* map lightlevels implemented, currently huge memory hog coz it's all cached

-> dynamic lights for flares etc

* experimental explosions: it's really hard to come up with an algorithm that behaves

like the original

* enemy sightings with red indicators, unit stops when new alien spotted

* inventory, reloading weapons is working

* experimental font system

* backbuffer in video ram, faster drawing now

* priming grenades

 

Maybe i'm thinking about doin' open source or somethin',

if there are volunteers who like to code in java on this project, experience in JOGL?

Coz its lots of work doing it singlemanned :)

 

I won't release another preview since i prefer to wait until more progress is made!

 

Take care now, bye bye then

Link to comment
Share on other sites

Nice :)

 

Good luck with your project and keep us informed ;)

 

Great! thnx

 

Update status:

 

* Timeunits implemented

* several bugfixes

* experimental accuracy algo

* map lightlevels implemented, currently huge memory hog coz it's all cached

-> dynamic lights for flares etc

* experimental explosions: it's really hard to come up with an algorithm that behaves

like the original

* enemy sightings with red indicators, unit stops when new alien spotted

* inventory, reloading weapons is working

* experimental font system

* backbuffer in video ram, faster drawing now

* priming grenades

 

Maybe i'm thinking about doin' open source or somethin',

if there are volunteers who like to code in java on this project, experience in JOGL?

Coz its lots of work doing it singlemanned :)

 

I won't release another preview since i prefer to wait until more progress is made!

 

Take care now, bye bye then

 

Yes! Open-source is a very good idea.

Link to comment
Share on other sites

  • 9 months later...

Since i don't have so much time anymore to continue this project, i plan to release the source code

under the GPL, in other words open source!!

If you did something with it contact me and show me, i'd be glad to see!

 

The project is coded in free java netbeans!

For the program to work ufo directory is to be created with ufo game copied in it,

i didn't include it for copyright reasons.

 

So, here it is!

enjoy!

UFORemake.rar

Link to comment
Share on other sites

  • 1 month later...

What's wrong here?

 

http://i255.photobucket.com/albums/hh127/dagorkan/uforemake.jpg

 

I extracted your latest archive straight to the games directory, there was no ufo subdirectory so I created one and copied the Abandonia UFO:EU files into it.

 

Games

======uforemake

==============build

==============dist

==============lib

==============nbproject

==============src

==============ufo

=====================GEODATA

=====================GEOGRAPH

=====================MAPS

=====================etc

 

I couldn't start uforemake.jar in Windows Explorer so I opened dos prompt and typed what you said

 

BIGLETS.dat is present

Edited by dagorkan
Link to comment
Share on other sites

Thought it might be that the files are for the Windows 'Gold' version.

 

Copying the subdirectories for the DOS version into uforemake/dist/ufo/*.*

 

I get

 

http://i255.photobucket.com/albums/hh127/dagorkan/uforemake2.jpg

 

Ufotact.pal is a file from your archive located in the main directory - ie games/uforemake/ufotact.pal

Edited by dagorkan
Link to comment
Share on other sites

Thought it might be that the files are for the Windows 'Gold' version.

 

Copying the subdirectories for the DOS version into uforemake/dist/ufo/*.*

 

I get

 

http://i255.photobucket.com/albums/hh127/dagorkan/uforemake2.jpg

 

Ufotact.pal is a file from your archive located in the main directory - ie games/uforemake/ufotact.pal

 

 

Indeed, good point! i forgot to include these files! (.pal)

Here they are

missingfiles.rar

Link to comment
Share on other sites

  • 1 year later...

Didnt our old site have the site name of 'ufo-clan'.

 

Bastards i hate when compnays add extra charges on and then say 'o srry did we not mention that'...........of course ye if-you-see-Kaying didnt you moneygrabbing if-you-see-Kaywits

Link to comment
Share on other sites

  • 3 years later...

I never knew about this, so thanks! It works fine for me, you just have to put any version of x-com1 into a folder called ufo inside the remake folder. :)

 

Edit: Ok, so .jar doesn't work, but if you have Netbeans (development suite for Java among other languages) you can open the project and run it from there.

Edited by 3llense'g
Link to comment
Share on other sites

Excellent, I will set up Netbeans and try again! Glad to hear the code is "working" and that there is someone else who is intersted in Java/X-com. I hope you don't mind if I ask you a few questions later if they come up.

 

I never knew about this, so thanks! It works fine for me, you just have to put any version of x-com1 into a folder called ufo inside the remake folder. :)

 

Edit: Ok, so .jar doesn't work, but if you have Netbeans (development suite for Java among other languages) you can open the project and run it from there.

Link to comment
Share on other sites

Excellent, I will set up Netbeans and try again! Glad to hear the code is "working" and that there is someone else who is intersted in Java/X-com. I hope you don't mind if I ask you a few questions later if they come up.

 

I never knew about this, so thanks! It works fine for me, you just have to put any version of x-com1 into a folder called ufo inside the remake folder. :)

 

Edit: Ok, so .jar doesn't work, but if you have Netbeans (development suite for Java among other languages) you can open the project and run it from there.

I don't know if I can help. I was trying to figure out how to make the falling work, but didn't get far. I think I have a method to show doors even if you are on the wrong side, but we'll see. :)

Link to comment
Share on other sites

I don't know if I can help. I was trying to figure out how to make the falling work, but didn't get far. I think I have a method to show doors even if you are on the wrong side, but we'll see. :)

 

Oh I really just meant getting it to run at all on any level. I am an old hat at many computer languagebut just starting on Java. I have not had a chance to work on it since my initial attempt but hope to do so during my lunch break at work.

 

So, if you would like to "help out" with code, that is awesome but I really meant get it to the opperational level that you have achived.

Link to comment
Share on other sites

I am getting this error:

 

ant -f C:\\JavaDemo\\UFO run

init:

deps-jar:

Updating property file: C:\JavaDemo\UFO\build\built-jar.properties

Created dir: C:\JavaDemo\UFO\build\empty

Created dir: C:\JavaDemo\UFO\build\generated-sources\ap-source-output

compile:

run:

loadFont failed file=ufo\geodata\biglets.dat msg=ufo\geodata\biglets.dat (The system cannot find the path specified)

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1

at java.util.Vector.elementData(Vector.java:730)

at java.util.Vector.get(Vector.java:746)

at uforemake.ImageList.get(ImageList.java:423)

at uforemake.ImageList.getImage(ImageList.java:441)

at uforemake.Font.setLetters(Font.java:69)

at uforemake.Main.<init>(Main.java:335)

at uforemake.Main.main(Main.java:1122)

 

 

Not sure where exactly I am suppose to put the "missing" files so that might be a part of it. Also I just put the "UFO-EnemyUnknown" directory inside The UFO directory I am using for the project. Any advice?

 

Cheers

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...