Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 [3]
  ignore  |  Print  
  Sunland Villagers (was: Learning OpenGL/LWJGL)  (Read 11248 times)
0 Members and 1 Guest are viewing this topic.
Offline RobinB

JGO Knight


Medals: 37
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #60 - Posted 2012-12-02 22:49:20 »

Much better, but..

Left and right are inverted   Huh
Offline Varkas
« Reply #61 - Posted 2012-12-02 23:37:10 »

I'm not quite sure which left and right you refer to? Mouse buttons? Scroll directions? Both appear to work the same on my computer as they did in the former versions.

Or I just fell through the looking glass and didn't notice Grin

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline RobinB

JGO Knight


Medals: 37
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #62 - Posted 2012-12-03 10:06:50 »

Probably the scrolling, i was referring to the right and left arrows on the keyboard.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Varkas
« Reply #63 - Posted 2012-12-03 14:16:56 »

I see. I had forgotten about the key bindings and indeed they have been inverted. Will be fixed in the next release, thanks for the report Smiley

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline Varkas
« Reply #64 - Posted 2012-12-03 22:32:43 »

I've been working on buttons for the UI ... on one hand I like how they turned out, on the other hand I ask myself how to make the UI more clear to the player. The upper group of buttons selects the type of things to be shown for selection - buildings are then subgrouped into three more groups. Maybe this was planning "too big", and just one panel would be good enough for all buildings. It would make the UI appear less cluttered also, to have only the upper button group.



Ideas and feedback are welcome Smiley

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline RobinB

JGO Knight


Medals: 37
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #65 - Posted 2012-12-03 22:37:52 »

Maybe you should create some kind of table with all buildings / chains for yourself.
When you have enough buildings, you could try to find out what would be the best way to group them.
Are you going to work in different techs / ages / styles or something, then these could be nice groups.

The most important is that you know what you wanna put there, the amount of time i have put in GUI's i needed to throw away due to new insights... :S
Offline Varkas
« Reply #66 - Posted 2012-12-03 22:52:22 »

I have no plan of all buildings yet ... I thought I'll start small and "let it grow". But I must admit, this sort of game design is among my weaknesses. The next building which I have prepared is a home for a clay-digger, who will produce clay for a pottery and a brickyard.

There fit 3 buildings in a row in the panel, and it has space for 7 rows, so there is space for about 20 buildings. It will definitely take a while to have this many.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline RobinB

JGO Knight


Medals: 37
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #67 - Posted 2012-12-03 23:19:43 »

I have no plan of all buildings yet ... I thought I'll start small and "let it grow". But I must admit, this sort of game design is among my weaknesses. The next building which I have prepared is a home for a clay-digger, who will produce clay for a pottery and a brickyard.

There fit 3 buildings in a row in the panel, and it has space for 7 rows, so there is space for about 20 buildings. It will definitely take a while to have this many.


Well i dont mean planning evrything beforehand, but i bet you have some sort of plan going on?
I mean groups like this:
Social - Material - Food - Misc

Or like:
Primitive - Middle age - Colonial - Modern

Also, i would recommend an scrollbar, so you wont have to worry about fitting stuff into category's Smiley
Offline ctomni231

JGO Ninja


Medals: 71
Projects: 1
Exp: 7 years


Not a glitch. Just have a lil' pixelexia...


« Reply #68 - Posted 2012-12-04 03:28:36 »

I suggest just having pictures of the buildings in small picture tiles. It is easier to recognize images on one full page than it is to see buildings split into different size groups. If you have different ages, that is the only way I'd see you splitting buildings per age. People can tell how large a building is if you leave a shaded footprint on the land, or just show a small text that says "3x3".


Offline Ultroman

JGO Knight


Medals: 24
Projects: 1


Snappin' at snizzes since '83


« Reply #69 - Posted 2012-12-04 03:57:02 »

Tried it out. Worked fine. Sawmill not doing any work yet? It doesn't seem to do anything.
Suddenly an extra flag was being drawn a bit right and down from another flag it seemed to be mimicking. Whenever a log was placed at the "real" flag, a log would also be drawn at the mimicking flag. I tried to click the flag with the "?" active, and it asked me if I wanted to remove it. I clicked remove in the box, and the game crashed.
I'd recommend adding the line "pause" to the end of your .bat file, so users have a chance to write down an error message for you. Alternatively, make an errorwriter, which writes errors to a text-file we can send you.

- Jonas
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Varkas
« Reply #70 - Posted 2012-12-04 11:56:50 »

Well i dont mean planning evrything beforehand, but i bet you have some sort of plan going on?

I guess my motivations were quite a bit convoluted. Once I liked the Settlers II game a lot, and had already tried to make a clone some years ago, but I stopped it. I don't remember exactly why. I couldn't find the sources anymore though, so I had to start freshly.

Recently my interest picked up again and I looked for open source Settler remakes - I found two, but both in C++ and I don't like C++ anymore. I tried one of them, and it felt a bit incomplete, still rather good:

http://wl.widelands.org/

I was considering to port it to Java, but they program in a style which I don't like, and porting seemed to be about as much work as writing it freshly in Java. So I started coding from scratch. I also considered doing only the code and using their graphics and map data, but I don't like their way to store maps, and I don't like some of their graphics.

Admitted, my own way to save maps is very kludgy, so beyond the "don't like" I have no reason for making a format of my own. And the graphics - I'll make my own ones where I think I can do better, and borrow from theirs where theirs are better.

Widelands is open source and GPLv2, my project is also open source and GPLv2, so it's no problem to share elements between the projects.

Now that I have the basics together (landscape, pathes, carriers, buildings, workers, storage ...) I feel uncertain how to continue. I'm not really a game designer, just a programmer and self-tought graphics artist.

I see that I could go and make my own game from the elements that I have, but my design skills aren't good enough, I guess. I also could try to make an amalgamation of Settlers II and ideas from the Anno series, but since I didn't play any of the Anno games, and don't know much about it, it will be difficult. And I certainly could make a plain Settlers II clone, but I don't want to do that, I'd at least like to expand the concept, and leave out the fighting and military parts, replace them by trading and negotiations.

I have a lot of options right now, and don't know which way to go  Undecided

I suggest just having pictures of the buildings in small picture tiles. It is easier to recognize images on one full page than it is to see buildings split into different size groups.

I'm not sure if I understand this correctly. The panels show small versions of the buildings, isn't that what you suggest? The grouping by size was due to the assumption, that if there are a lot of buildings, it is easier to switch to a given group (assuming one remembers the buildings size) and have a smaller number of buildings to search till the right one is found.

Sawmill not doing any work yet? It doesn't seem to do anything.

It doesn't produce anything yet. I added it to test the goods distribution code. The sawmill has a higher priority to get trunks than the headqarter/warehouse has. I wanted to see if the priorities work.

Suddenly an extra flag was being drawn a bit right and down from another flag it seemed to be mimicking. Whenever a log was placed at the "real" flag, a log would also be drawn at the mimicking flag. I tried to click the flag with the "?" active, and it asked me if I wanted to remove it. I clicked remove in the box, and the game crashed.
I'd recommend adding the line "pause" to the end of your .bat file, so users have a chance to write down an error message for you. Alternatively, make an errorwriter, which writes errors to a text-file we can send you.

I'll add the pause to the batch file. I have no real ide how you got the duplicate of the flag, but the games structures allow such a bug. I'll keep an eye on it, maybe I find the reason (it must have been registered twice at different locations, but I don#t know what input/event would make that happen.)

Meanwhile I have continued to work on the UI, and this is the current incarnation.


Thanks for all the feedback Smiley

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline Ultroman

JGO Knight


Medals: 24
Projects: 1


Snappin' at snizzes since '83


« Reply #71 - Posted 2012-12-04 18:47:18 »

I'll add the pause to the batch file. I have no real idea how you got the duplicate of the flag, but the games structures allow such a bug. I'll keep an eye on it, maybe I find the reason (it must have been registered twice at different locations, but I don#t know what input/event would make that happen.)

Meanwhile I have continued to work on the UI, and this is the current incarnation.

-- image --

Thanks for all the feedback Smiley
You're very welcome. It's looking good. I like the buttons Smiley

About the bug...it might have been something like scrolling the map with right-click while having the flag-planting thingie turned on, while left-clicking ferociously. I was trying a bunch of right-clicking+left-clicking and generally being an idiot, trying to force "The Settlers" behavior ^^ It's a good thing. It's all a bit hard to get used to ATM, but with a few kinks ironed out, I could be very happy playing this game. Anyway, you should definitely ensure that nothing gets built, unless the clicking is done exactly right. Be vigorous in your control-system from the beginning. It'll make debugging that much easier along the way.

Good luck! Looking forward to building massive cities to test your memory-handling ^^

- Jonas
Offline Varkas
« Reply #72 - Posted 2012-12-05 16:10:03 »

I have some problems to display proper windows/popups on top of the OpenGL display. After some consideration I decided to just let that be and display the results of an inspection below the map. It's not perfect, but it seems to work. The "start.bat" still misses the pause command, but it includes the new UI buttons:

http://sourceforge.net/projects/sunlands/files/v0.15/

Talking about memory problems - since the release I already found one. Carriers were not removed from the list of all carriers when their paths were removed, and remained in the list. Once this was a memory leak, and it also could cause propblems if later another carrier was created for the same path as one of the "old" carriers. Will be fixed in the next release.

I'll also look into the mouse handler. At least I can ignore left clicks while the map is dragged. I must say I didn't think of that, and you made me curious now what sort of effects one can trigger in the original Settlers game this way Grin

Logging to a file should be in the next release too.

Thanks again for all the hints and tips Smiley Soon the sawmill should work too ...

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline RobinB

JGO Knight


Medals: 37
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #73 - Posted 2012-12-05 16:44:55 »

Im getting really tempted to give this genre a try, like your doing.
Also an reason why im posting so much in this WIP project Wink
The only problem is that graphics is an issue here, cant draw anything nice myself.
What program are you using to draw the buildings, or did you just download them?
Offline Ultroman

JGO Knight


Medals: 24
Projects: 1


Snappin' at snizzes since '83


« Reply #74 - Posted 2012-12-05 16:48:28 »

I have some problems to display proper windows/popups on top of the OpenGL display.
You should make your own menu-system to be displayed inside OpenGL. It's a bit tedious, but if done right, you never have to do it again Smiley

Talking about memory problems - since the release I already found one. Carriers were not removed from the list of all carriers when their paths were removed, and remained in the list. Once this was a memory leak, and it also could cause problems if later another carrier was created for the same path as one of the "old" carriers. Will be fixed in the next release.
Maybe this could've had something to do that extra flag?

I'll also look into the mouse handler. At least I can ignore left clicks while the map is dragged. I must say I didn't think of that, and you made me curious now what sort of effects one can trigger in the original Settlers game this way Grin
I don't think you should screw with your mousehandling at the source (your mouseevent handler). More like limit the actions that it triggers.
In the original Settlers they used left+right-clicking a lot. If you did it on a road, it would ask if you wanted to remove it. If on a flag, it would prompt the "send geologist to flag"-window. If done on the build-menu button, it toggled the "where-can-I-build-what" overlay, which you've already implemented. There are a few more, but I think those were the primary ones.

Logging to a file should be in the next release too.
Great! It'll make it much easier for you to debug Smiley

Thanks again for all the hints and tips Smiley Soon the sawmill should work too ...
You're welcome. Looking forward to it Cheesy

- Jonas
Offline Varkas
« Reply #75 - Posted 2012-12-07 12:19:19 »

Left + right click: I didn't think of that, so far the code is designed to trigger an action on left click, and scroll/drag the map on right click. Thanks for the info though Smiley

I've implemented portable UI toolkits in C++ twice for old projects of mine, but I feel not motivated to do it again, even porting one of them looks too tedious. It sure has a coolness factor when doing it the first time, but it wears off soon Grin

I hope that I can get around the work by using customized Swing UI elements to the right and below the map display. At a first I was hesitant about that, because it implies larger mouse travels, and the information isn't shown where the player looks at at the very moment, but it worked surpsingly well. The benefits are that the information is always shown in the same place, and doesn't obstruct parts of the map display. Feedback on this decision is welcome, though Smiley

It's been surpsingly difficult to have constructions sites. The need to order construction material to the work site, wait for the arrival and finally create the building introduced quite some new states to the game data, and particularly saving and loading all states correctly turned out to be very error prone - and even small mistakes like a plank that was confirmed for the construction site, but never delivered just caused the construction to be never finished. This really requires 100% correctness. Having two game threads (+ java's own VM threads) I still fear inconsistencies in rare cases which might be very difficult to detect and fix.



I now have something that seems to work though. The headquarter comes with 20 planks in storage right away, and construction of a building needs two planks - no rocks/bricks yet, and always two planks. I'll expand this one the basic code has proven to be stable. The construction site graphics were done in a hurry, just good enough to show the constructiopn steps. I might do something better later, but I like the "here will be built" sign for new construction sites Grin

http://sourceforge.net/projects/sunlands/files/v0.17/

There is a small demo game included with two construction sites in progress. The sawmill produces planks from trunks now, so with a forester, a woodcutter and a sawmill you have infinite supply of planks.

At the moment I don't try to keep saved games compatible between versions - IMO the game is too young and there are too many and too deep changes from version to version. But it's on my list and it was a conscious decision to defer it till later. It's just extra work that I don't want to do while there are so much other things missing in the game, which seem to be more urgent to implement. Also a lot of bugs to hunt and fix.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline Varkas
« Reply #76 - Posted 2012-12-11 14:54:17 »

Since the last release it's been mostly bug hunting and fixing:

- Map creation bugfixes
- Path splitting bugfixes
- Zoom related bugfixes
- Landscape and buildings now fully configurable (unless I missed something ...)
- More landscape deco objects
- Texture supersampling added (might render slower, but rendering wasn't a bottleneck so far).

http://sourceforge.net/projects/sunlands/files/v0.18/

If you find any bugs and problems, please let me know.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline Ultroman

JGO Knight


Medals: 24
Projects: 1


Snappin' at snizzes since '83


« Reply #77 - Posted 2012-12-11 19:13:56 »

Humongous bug:
- Create a flag
- Make a path from this flag, and end it with another flag
- Add another flag on the path you just made
- Now add yet another flag to the same path

SO MANY LITTLE BLUE MEN! I have 4 of them hugging the same pole ^^

- Jonas
Offline Varkas
« Reply #78 - Posted 2012-12-12 22:45:57 »

You can get up to 6  Grin

Place a single flag. Build pathes from all adjacent vertices to this one flag. 6 carriers having smalltalk that the flag Smiley

Maybe you found a different bug, though. I know about a problem that carriers do not stand in the middle of their path, if the path has an odd length. I tried to fix it, but it turned out to be more complicated than expected first.

I could fix a weird bug in workplace lookup though, which at times caused path not allowed on seemingly random spots on the map, because the code miscalculated this spot to be occupied by a workplace building. Most likely this bug also had other strange effects:

http://sourceforge.net/projects/sunlands/files/v0.19/

The v0.19 also has a new building, a clay diggers hut, and a new worker who can dig clay. No brickworks yet though to make use of the clay, also no pottery, but they will come.

I've got a few ideas for the evolution of a settlement now, and I hope I can make it a real game some day.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline Ultroman

JGO Knight


Medals: 24
Projects: 1


Snappin' at snizzes since '83


« Reply #79 - Posted 2012-12-13 07:39:14 »

Well, The Settlers had a similar "problem" to what you described, when the paths were of certain sizes or shapes, the men would stand at weird points. The problem I've described is very different, though.

I'll try to draw it for ya.

- Jonas
Pages: 1 2 [3]
  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.

xsi3rr4x (63 views)
2014-04-15 18:08:23

BurntPizza (61 views)
2014-04-15 03:46:01

UprightPath (74 views)
2014-04-14 17:39:50

UprightPath (57 views)
2014-04-14 17:35:47

Porlus (74 views)
2014-04-14 15:48:38

tom_mai78101 (100 views)
2014-04-10 04:04:31

BurntPizza (160 views)
2014-04-08 23:06:04

tom_mai78101 (255 views)
2014-04-05 13:34:39

trollwarrior1 (208 views)
2014-04-04 12:06:45

CJLetsGame (215 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!