Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 63
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2018-04-20 16:00:19
Moved SilenceEngine forum to Flarum, and it is so beautiful!

https://silenceengine.goharsha.com/forum/

However I decided for it to be a fresh start because the original SMF version attracted a ton of spam.
2  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2018-04-13 12:31:23
I think I need some help with optimizations now. I've previously never worked with PHP nor MySQL, so I know my code just aims to look pretty. However, it is performing so bad, that it is now taking me complete two days just to migrate all the users, ignore the posts.

Can anyone lend me a hand? The latest code is already in GitHub along with instructions: https://github.com/sriharshachilakapati/JGO-Flarum-Migration/
3  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2018-04-12 07:06:17


Posts in topics are now migrated!!

It seems in very old posts, code tags aren't being used. And also from quotations that were made from deleted posts, it seems to produce some empty quote tags. Will look into it.
4  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2018-04-08 17:53:38
Discussions!! Still not complete, but the first look just for those of you interested:



Currently, only topics are migrated. Posts in it aren't. I need to know all the custom implemented BBCode tags here in order to be able to do that.

@Riven Can you list me all custom tags that are enabled here? I only knew icode, code and youtube tags.
5  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2018-04-01 06:58:27
Nope it isn't dead. I'm just waiting for some issues in the Flarum and mainly waiting for it to get to stable. It's mostly done except for some issues in porting the post content. Feel free to look into the code and test it out.

https://github.com/sriharshachilakapati/JGO-Flarum-Migration
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JavaGLFW - Library on: 2018-03-15 09:24:30
I see that you are exactly doing the same as me, writing OOP wrapper on top of LWJGL provided bindings. You can see mine here:

https://github.com/sriharshachilakapati/SilenceEngine/tree/development/backend-lwjgl/src/main/java/com/shc/silenceengine/backend/lwjgl/glfw

I believe mine aren't up to date, last used them with 3.1.5 LWJGL, but they already had got most of the functionality (although tightly coupled with my engine in some areas, like setting icon from image file, etc.,). Maybe we can join our efforts and make that a separate library?

I however don't know how many people would use it, GLFW is already very usable by newbies too..
7  Java Game APIs & Engines / OpenGL Development / Re: [LWJGL] Cant Figure Out How To Do Frustum Culling on: 2018-03-10 09:54:40
How likely do you think it is that, having not logged in for almost two years now, @Robo11 will remember even the problem he had over three years ago, let alone the solution? (rhetorical question)

Maybe he thought robots can remember everything........
8  Game Development / Newbie & Debugging Questions / Re: Java regex pattern for finding text between [[ ]] on: 2018-03-04 04:57:47
Did you add the multiline option to the Pattern?

1  
Pattern regex = Pattern.compile("--\\[\\[.+?\\]\\]", Pattern.MULTILINE);

Otherwise, regex will stop at a single line.
9  Game Development / Newbie & Debugging Questions / Re: Stream.filter(...).count() didn't work on: 2018-01-30 15:18:34
Use
Arrays.stream
instead. It will become

1  
2  
3  
Arrays.stream(grid.getNeighborsAt(row, col))
      .filter(CellPanel::hasMine)
      .count();

By the way, why convert the list to array in the
getNeighborsAt()
method in the first place?
Use a list directly there, and use collector to collect the stream contents.

1  
2  
3  
4  
5  
6  
7  
8  
public List<CellPanel> getNeighborsAt(int row, int col) {
    return cells.stream().filter(cell ->
            (cell.getRow() == row - 1 && (cell.getCol() >= col - 1 && cell.getCol() <= col + 1) ||
            cell.getRow() == row + 1 && (cell.getCol() >= col - 1 && cell.getCol() <= col + 1) ||
            cell.getCol() == col - 1 && (cell.getRow() >= row - 1 && cell.getRow() <= row + 1) ||
            cell.getCol() == col + 1 && (cell.getRow() >= row - 1 && cell.getRow() <= row + 1))
    ).collect(Collectors.toList());
}

Should be better.
10  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-12-16 10:24:12
Nope it isn't. I'm still working on it Roi. Only that I'm having a tough time looking to port the post contents.
11  Discussions / Miscellaneous Topics / Re: Career advice on: 2017-12-08 17:24:21
Am in Bangalore, India. You thought I moved to a different country for a second right?  Wink
12  Discussions / Miscellaneous Topics / Re: Career advice on: 2017-12-08 03:20:33
Thank you all for the responses. I have opted to the startup as well, and it is extremely fun way (though we are working with PureScript, a functional programming language). I just finished moving to the new city.
13  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-25 11:15:37
Thanks for that Riven, but I think that I'm going to do that only once I believe it got to a point to show others. I still have to write code to migrate posts.

However I'm taking some time, as I now have to move to a city that is ~700 km away because of job. I might not be available for two weeks because of house hunting, packing and moving things etc.

I'll be getting back to this from 11 or 12 December. The progress is smooth enough.

Regarding the UI of Flarum, I beleive that it is community centric, as is Discourse. To me they both appear to be same. However, I don't think you can get a sidebar into it. You can, by fiddling with adding a component to Mithril, but I don't think you can integrate it without spoiling the look. That's my opinion though.

See ya soon once I settle down there.
14  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-22 17:19:09
How are things going SHC? Is there somewhere you are hosting it that we can have a play with?

I'm having a little bit of trouble with posts breaking because of tables. Flarum's BBCode plugin has limited tags, so I'm now in the process of writing an extension for it. Also, the icode tag breaks as well.

However the markdown support is good, so in the end, I might be just using the text formatter library and translate from BBCode to markdown. Just now I'm reading up the internal representation of posts. It appears that SMF stores the posts as raw BBCode. Flarum however stores it in a internal XML format that is easier to render.

By the way, I'm not going to host this anywhere without the permission of @Riven. In the meanwhile you can set up a local Flarum instance and run the migrator yourself.
15  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-16 09:22:42
Keep it simple... just require everyone to change their password on first login, move on.

It could stress out JGO servers as requiring to change the password means that the server has to send a lot of mails with links.
16  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-16 04:13:41
A quick change is that I added error reporting and also a progress notifier in the tool. This migration script is CLI based, as you can see it:



This should be more better as I will get to know if the script was hanged or not. I had to admit it is stressing out the MySQL server, as I can see the disk access at 99% rate. I have also added recognition of user groups, and currently this script translates everyone as Members, Mods and Admins.

By the way, did I mention that I'm committing this to GitHub? It's at https://github.com/sriharshachilakapati/JGO-Flarum-Migration

Great progress dudes!

Thanks! That will keep me excited to do, it was boring a bit to stare at the screen doing nothing while the migration is done. Currently for 11513 users, it is taking me ~12 minutes to do the port, that is with the reduced data which excludes people who have never logged in after activating their accounts and also non-activated accounts.

Ofcourse this is one of the first snags of a data-migration: how do we get application X to understand the password-encryption (salted-hash) from application Y. Typically this involves a bit of custom code in the new application. I could PM you your own SMF credentials (as hash+salt) and you could test your new implementation with that.

Yep I agree. I had looked into the sources of Flarum and found that it uses the same hashing used by Laravel framework, which I guess is bcrypt. I'd like to experiment with that, please do send me my own credentials in the PM.

Having to reset your password seems like a pretty reasonable thing when switching to a new site.

True that, it would be fine with most of the users as they log-in with social media anyways, but wouldn't hurt more for experimenting right?
17  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-15 16:55:34
Porting of users is done, but however they are created with no password, and hence they cannot log in. They are required to click on forget password link and create new password for the accounts. Members visible in the admin panel:



And here is a ported user:



Profile pictures are a bit off, but I don't think I can fix that. Still had to search where Flarum stores them. And of course, mods and groups aren't ported yet.
18  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-15 16:35:01
This is really awesome. Congratulations. What do you see as the next steps?

First step is to port the users. Once that is done, I could look into porting the meta data, like the profile picture etc., Right now however profile pictures cannot be ported because it appears to me that Flarum caches them in other locations, and I cannot access the server of JGO to download the images.

After this is done, I can continue to port the posts. The good thing about Flarum is that it supports posts in both BBCode and also Markdown. However, I think I have to modify them a bit.
19  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-15 16:29:40
Hey @Riven, I started migrating the users and found that there are a ton of users who have activated the accounts but haven't logged in even once. The lastLogin field for some is set to 0. Should I migrate them too? Or can I optimize the script to remove them?
20  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-15 02:42:21
That was my thinking when I started inspecting the data, to load as many tables as possible into MySQL and go from there. The tools I have for inspection are not so hot: e.g., Notepad/Wordpad! Advice on a better way to inspect the dump would be appreciated.

For this large data, phpMyAdmin and other web based tools will trigger a post error, you need to work from the command line. After you create the database, do this from cmd:

1  
2  
3  
4  
$ mysql -uuname -p
Enter password: *****
mysql> use dbname
mysql> source path/to/dumpFile.sql

That will do the trick of importing. It took me 30 seconds for that to complete.
21  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-14 16:04:10
After spending two hours to understand the tables and relations, wrote a script to migrate the categories and boards. The current output is like this:



The script also maintains the order of the categories and the boards inside them.
22  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-14 09:03:01
I got the dump imported into MySQL. Am now trying to get it into Flarum.

23  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-06 08:05:33
Where? I'm hosting the backups that you are providing everyday with cron jobs at https://jgorecovery.goharsha.com but aren't they encrypted?
24  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-06 06:49:00
I definitely want to try it out @Riven, that would be something I'm really willing to do. However I can't say an expected date or so, this is experimentation and I'm going to start in a month after my exams. Will you please PM me with a link to the database dump you said earlier?

The idea of the freezing up of the current forum as an archive is pretty simple that it is the first one that came to my mind, and especially as I've witnessed it on the GameDev.net community, it went completely smooth and I like it. However from some previous messages, I understand @Riven is not interested in this, he wants a completely migrated community and also be happy with the links.

In this way, my guess is that we have to first start tinkering with a modern PHP system (I'm looking at Flarum) and then spend some time analyzing how it stores the posts in the database. I had worked with PHP and MySQL in the past (but not a forum software though, nor I had written any mods for SMF) and I think a bit of looking into should get us something. My guess is that this approach works, but in the longer end.

  • Start with analyzing the database table structures.
  • Write scripts to automate the process.
  • At each iteration, test and improvise the script.

If you permit, I'd like to take the dump you're going to provide, and create a repo on GitHub and commit this dump into it. Our tool should be able to take a basic site of Flarum and modify the database after reading all the posts and the users. What do you think?

And we could always take the help of experienced and willing to contribute members like @philfrei.

By the way, I opened a support ticket in the Flarum forums: https://discuss.flarum.org/d/7290-migration-for-a-very-large-smf-forum
25  Discussions / General Discussions / Re: Gosh, it's quiet in here on: 2017-11-05 12:55:55
I see three main problems for this forum being so quite. The first thing, is that the forum software is old. So old that I remember once reading that Riven said it is not possible to even theme it as it is already running on a lot of mods. One solution is migrating the forum to a new software, like Discourse? If the need for Ruby was the problem, why not Flarum? I know it's really in the beta, but it looks stunningly good.

Second problem as above all mentioned, there are more people who read than people who contribute and post here. Number one reason again is the forum software, it is preventing newbies from registering or changing email address. Second thing, professors seem not to encourage gaming or game development, some here strongly believe that traditional reading and writing answers is the real way of learning. I even experienced situations with professors trying to steer me away from games in general for my own good, and I feel like WTH?

Regarding with frameworks etc., that is not the cause of steering away. Today's people want to show something, they want immediate results. That is favoured by large and already matured engines like Unity and people prefer them. They do have a point as they are already mature engines used by tonnes of successful games. As I see in my surroundings, in college, I always see people want to get something up and running, nobody really wanted to explore what it is under the hood.

The third main problem is the language getting old, and Oracle is having focus on features that not everyone would use or such. It's not a wrong thing, but even being a fan of Java language for its simplicity, I really don't see the need of having modules other than in case of enterprise developers. In my case, most of that is already being done by Gradle and other build systems. I really want to see C# like features, specially the events, delegates, properties, async functions, etc., I'm looking for the introduction of value classes to Java. Kotlin in that end seems promising.

Apart from all this, everyone will have their own personal reasons for not contributing much, as I had my excuse of career building. I'm now in the final year of college, having lots of assignments, exams, and at the same time I had to work on projects, internship, etc., I really used to have a lot of time 6 months ago that I now lack. Since I'm missing a lot of classes now, I had to self study and it also adds to it. Anyways, I'll look into getting more time for the community now.

By the way Riven, is it possible to migrate to a new forum software now? I really hate surfing it on mobile. If you need any help I can do regarding this, let me know. I'll be having more time after a month.
26  Discussions / Miscellaneous Topics / Career advice on: 2017-10-10 14:29:21
Hi friends, I'm posting in JGO after a long while today. I'm in my final year of my college and had spent the last two months attending interviews. I'm posting this today because I'm in a dilemma and I need a career advice from someone experienced.

My first interview was in an MNC, which had 60 years of industry experience. I was asked questions on Assembly programming there and I cracked it. However, two things I'm concerned are the pay package and the available projects; they are offering me 3.36 as the package, which is half of my father's current pay (he earns 7 per annum).

My second one was a startup, which was founded in 2012, and they held the interview on purely technical rounds. I cracked it too, and apart from a job, they asked me to join early for a mandatory student internship in the next semester. The package is much higher here, they initially offered me a package of 8 per annum, and said that depending on my performance in the internship they might increase it to 12.

I'm not thinking only in terms of salary, but also in terms of the projects that I'll be working on; the big MNC is a service based one, and mostly works with low level technologies and databases. The new startup is a national payment gateway in India, and it's major client is the reserve bank. The Technology they are using is PureScript which is a functional language.

Regarding company size, the MNC has got 3,86,000 employees while the startup had got less than a hundred employees.

Now I'm in a dilemma. What factors should I be considering as a fresher?
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-09-30 19:33:38
I experimented with creating a UWP app with Java, and it seems with GWT it is possible, although I had to use a hack.

https://github.com/sriharshachilakapati/JavaUWPExperiment

More details coming soon. I'm very sleepy now.
28  Game Development / Newbie & Debugging Questions / Re: No OpenGL context found with new game sessions. on: 2017-09-06 09:51:40
It seems to me that you are creating the texture on the networking thread, where OpenGL context is not current. I think you should be creating the thread in the main thread. Maybe make request handler queue the requests and you process that request queue in your game's update operation.
29  Game Development / Newbie & Debugging Questions / Re: graphics2d.scale to make full screen on: 2017-09-03 05:02:59
I'd not deal with the scales of Java2D. When I used to do it, I used to do it with triple buffering. One is the on screen image, and two BufferedImage instances for off screen. I kept the screen image (window) completely resizable. Off screen buffers are in game resolution.

When presenting, I used to calculate the aspect, and find the scales. Then draw the image on the screen with the drawImage method.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
// new_(width|height) is the dimension of the scaled image
// bound_(width|height) is the dimension of the window
// original_(width|height) is the dimension of the game resolution

// first check if we need to scale width
if (original_width > bound_width)
{
    //scale width to fit
    new_width = bound_width;
    //scale height to maintain aspect ratio
    new_height = (new_width * original_height) / original_width;
}

// then check if we need to scale even with the new height
if (new_height > bound_height)
{
    //scale height to fit instead
    new_height = bound_height;
    //scale width to maintain aspect ratio
    new_width = (new_height * original_width) / original_height;
}

// Now clear the screen
g2d.setColor(Color.BLACK);
g2d.fillRect(0, 0, bound_width, bound_height);

// Calculate the offset x and offset y
int offsetX = Math.abs((new_width - bound_width) / 2);
int offsetY = Math.abs((new_height - bound_height) / 2);

// Draw the image onto the screen
g2d.drawImage(offScreenImage, offsetX, offsetY, new_width, new_height, this /* window */);

This is what I used to do, and it worked for me perfectly.
30  Game Development / Newbie & Debugging Questions / Re: JavaFX updating a Label on: 2017-08-26 14:13:47
Use Platform.runLater(Runnable) to delegate to the UI thread.
Pages: [1] 2 3 ... 63
 
nelsongames (19 views)
2018-04-24 18:15:36

nelsongames (17 views)
2018-04-24 18:14:32

ivj94 (608 views)
2018-03-24 14:47:39

ivj94 (53 views)
2018-03-24 14:46:31

ivj94 (401 views)
2018-03-24 14:43:53

Solater (66 views)
2018-03-17 05:04:08

nelsongames (111 views)
2018-03-05 17:56:34

Gornova (176 views)
2018-03-02 22:15:33

buddyBro (747 views)
2018-02-28 16:59:18

buddyBro (94 views)
2018-02-28 16:45:17
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
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!