Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
games submitted by our members
Games in WIP (562)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Building a 4X game (WIP with pictures)  (Read 5460 times)
0 Members and 1 Guest are viewing this topic.
Offline lastaid

Junior Member


Projects: 1



« Posted 2011-09-19 14:35:50 »

I am currently working on a 4x-ish game, and find this forum extremly helpful.
i just wanted to post a few pictures and maybe get some feedback.



i am currently working on a base data structure together with a friend of mine, so the pictures might not reflect the actual game state, mostly because large parts of the code are just research and different planet types.
the pictures show a galaxy, which is generated randomly. the galaxy consists of sunsystems, those consist of planets.

let me know what you think, and maybe even visit my wip blog coffee2code.blogspot.com
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #1 - Posted 2011-09-19 15:31:10 »

maybe showcase is better place? since u don't have a specific newby question.
Offline lastaid

Junior Member


Projects: 1



« Reply #2 - Posted 2011-09-19 15:35:35 »

maybe your right, didn't know if it is in the right state for showcase
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline lastaid

Junior Member


Projects: 1



« Reply #3 - Posted 2011-09-28 10:01:10 »

Ok, i got some time to do some updating, i am putting everything on my blog.
I will also upload a current "playable" [ its not really playable, but you can explore the galaxy ]
currently a lot of stuff is borrowed or influenced by other peoples work, mostly the procedural ressources.

take a look at my blog and please post what you think of the current state and if oyu have any ideas Smiley

coffee2code.blogspot.com

also pic Smiley


also the game game.zip
Offline philfrei
« Reply #4 - Posted 2011-09-28 23:20:07 »

Neat! Fun project.

I ran the program on my WinXP, Pentium 4, 3.2GHz, 3Gigs RAM.

It seems to take about 5 to 10 seconds for a screen to appear when I click in the "big view" window to go to a new location. Each new location adds a fair bit of RAM to the total being used, according to the Task Manager. If I just go to one screen of galazies and drill straight down to a planet, I can get there with only using about 50MB of RAM, but after a half dozen galaxy clicks I've more than doubled the RAM.

So, probably every Galaxy that is viewed is then preserved? And each has a significant overhead? Given the size of what you want to encode, I'm thinking you will want to look for efficiencies, for example, maybe that allow details to be reconstructed anew rather than preserving each and every detail between visits. Perhaps you are already doing this.

So, what is the latest news from the "Unlimited Detail" people?  Wink

Graphics are pretty neat, but I have a quibble with the orbits. You might check out "Bode's Law" and consider making the distances between planets less regular.

Is there a way yet to climb out of the planet view and back to the galaxies view? I couldn't find one.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline lastaid

Junior Member


Projects: 1



« Reply #5 - Posted 2011-11-05 14:19:53 »

So i finally managed to care for my pet project again.
I first had to take a good look at the data structure and decided that it needed some modifications.
Currently the data structure consists of a single galaxy that contains a hashmap with solarsystems and its identifiers(keys). Every solarsystem consists of Astronomical Objects with completely incorrect distances to each other. After a post from "philfrei" who pointed me at "Bode's Law" i will probably do some research on this but for kow i want to extend the data structure.
What I did first was to instroduce the Universe, a data structure that contains galaxies. For this i had to rewrite the cascading data structure and i found that i could manage the data much better if i would have every planet, solarsystem and so on in the universe and just use the identifiers(keys) for reference in solarsystems and galaxies.


After this, i will start introducing some actual gameplay, currently placing structures on planets.


Will further update, but no nice screenshots for now.

http://coffee2code.blogspot.com/2011/11/still-not-dead.html
Offline lastaid

Junior Member


Projects: 1



« Reply #6 - Posted 2011-11-08 20:00:22 »

As promised, some pictures. Finally something that looks like a game is emerging.
Building something finally works, although it completely ignores levels Cheesy

The ugly lines  in the second picture are the vias that will at some point enhance transportation between solarsystems.

I am off for now, updates will follow ^^





Offline lastaid

Junior Member


Projects: 1



« Reply #7 - Posted 2011-11-27 21:10:52 »

Hey,

still working on that game ^^.

I could really need some help or a hint how to create a user interface i can render on the screen as an overlay. i imagine i would need something layered, so that i have my view in the background, but the ui as an overlay on top, and then check if a user interaction like a click was meant for the overlay, or the the underlying game part [ although this is still part of the user interface ].

i also used a technique which is probably VERY VERY bad, maybe you guys can help me out with this.

the minimap on the top right of the galaxyview is a Image that gets generated every time i move in the galaxyview. so everytime this happens i take the positions of all the stars, paint them in an imageBuffer, turn the imagebuffer into an image, then render the image onscreen. some help on this would be greatly appreciated.

now for some screenshots again Smiley, the game looks a little nicer now, i generate a background with stars that looks better then just black void. this background would still need some improvement, like nebulas etc, but i didn't figure out a way to create one, but it will probably involve noise and fractals Cheesy









please comment, i need some feedback on what to do and how to do it Smiley



Offline Gornova

Senior Member


Medals: 1
Projects: 3



« Reply #8 - Posted 2011-11-28 11:21:20 »

hi!
I'm also trying to build a 4x game with Slick 2d !
For now I have only systems and planets generation and my biggest problem is find a decent way to place systems in a galaxy form and create connections between them.

I've found your blog very good at this, do you plan to opensource your game code? Or maybe just galaxy generation code?

thanks in advance!

here link to my demo (WIP on Slick forum)

Blog | Last game Drone Defense 0.2 | In progress Drone Defense
Offline lastaid

Junior Member


Projects: 1



« Reply #9 - Posted 2011-11-28 23:09:32 »

Hi  Gornova,

as of now the generation code is quite messy, but i can break the steps down for you some time this week.
i have problems generating the vias [ this is what i call the lines between solarsystems or in your case planets ]
as of now, i dont use any sort of algorith, i just calculate a distance and if the distance is small énought roll a dice to generate a via. i want to use an algorith that creates small subsystems without to many unnecessary vias

as for the galaxy generation code:
i took an image from wikipedia containing galaxytypes
then i used the images like a heightmap to calculate a chance that a solarsystem is created at that point in the galaxy. i am pretty sure using an algorithm would work too, and i would prefer such a solution, but as of know this is all the "magic"

the solarsystems are generated random as well, as an array with stars that have an image that is generated with an algorithm and an angle to the sun as well as a distance.

i am not sure where i want to go with this game, so no source code yet.

you seem to go in the same direction, i really want to know how you did the user interface because i have no experience in doing this.

-lastaid
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Gornova

Senior Member


Medals: 1
Projects: 3



« Reply #10 - Posted 2011-11-29 10:46:22 »

wtf, here the magic Cheesy thanks for explanation! I didn't get this first time on your blog!

There is around some tutorial about creating a galaxy (here and here and example, but I'm not able to do nothing good!
Any idea are welcome!

About interface:
I think I will use TWL (http://twl.l33tlabs.org/) for my project and trying to follow freeorion approach to interface (http://www.freeorion.org/index.php/Main_Page).
This screenshot explain beauty of this approach:
- up part of the screen for fast summary of your empire (see starcraft and rts genre about this),
- you can navigate throught galaxy and game show you where you are (center of the screen), with navigation routes
- right widget for system summary and planets control

If you want to contact me for a more indeep (email maybe) compare about this topic, please send me a pm!

Blog | Last game Drone Defense 0.2 | In progress Drone Defense
Offline lastaid

Junior Member


Projects: 1



« Reply #11 - Posted 2011-11-29 15:09:30 »

Hey, while on a train ride i invested some time tweaking the generation of path between solarsystems.
Generating the 4000 Solarsystems with on avg. 9 planets only takes 1000ms at maximum. but the algorithm to produce nice ways between the solarsystems clocked in at 80seconds, after some tweaking at 5seconds.

it still looks like crap, so i will check some algorithms and ideas before i try again. another method might be generating all vias, then checking for intersecting lines and delete those, then check if all planets are connected [ if this is what you want ] generate new vias, try again. this would be quite unressourceful, so i need a better aproach. you can email me at: callmesascha [ ät ] gmail [ dot ] com and you are always welcome to place comments in my blog, its hard to get a blog rolling, especially with such a generic topic.

-lastaid
Offline Gornova

Senior Member


Medals: 1
Projects: 3



« Reply #12 - Posted 2011-11-29 19:23:34 »

I'm sending you and email Cheesy

Blog | Last game Drone Defense 0.2 | In progress Drone Defense
Offline uaequals_42

Junior Newbie





« Reply #13 - Posted 2012-02-21 05:35:47 »

Cool project.   Grin   Have you any new news about your progress?
Offline tberthel
« Reply #14 - Posted 2012-02-21 16:49:46 »

Very nice.  I especially like the medium zoom star systems pic.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (28 views)
2014-09-21 02:42:18

BurntPizza (18 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (27 views)
2014-09-20 20:14:06

BurntPizza (29 views)
2014-09-19 03:14:18

Dwinin (46 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (102 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56

mitcheeb (71 views)
2014-09-08 06:06:29
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!