Jump to content

DtrollMC

Member
  • Posts

    443
  • Joined

  • Last visited

Reputation Activity

  1. Like
    DtrollMC got a reaction from wasab in Quick Fun Library   
    Have been working on this the past few days, on whatever time I get off work. Some functions and parameters can still be improved, but it is definitely usable enough to show you all! It's a cool little Java library. There are 3 primary classes:
    Tile
    This is an interface which helps define a Tile object. Some concrete classes have been implemented, such as ColorTile and SpriteTile, but many more can be created. 
    TileMap
    A data structure for managing these tile objects in a 2D array (matrix). Comes with an iterator for iterating through the tiles.
    TileMapPanel
    This class is used to visualize the Tile objects. Since the tile interface defines a method paint(Graphics g, int gridScale), the TileMapPanel iterates through it's TileMap and calls the paint(g, gridscale) function on each tile.
     
    All in all, this is a really young library, I have a lot of improvements to make, but it's fun to play around with, and I've thought of a lot of applications, so I thought it'd be cool to see what y'all come up with.
     
    Here are a few quick examples:
     
    package com.carvethsolutions.gridlib import com.carvethsolutions.gridlib.tile.ColorTile import com.carvethsolutions.gridlib.tile.SpriteTile import com.carvethsolutions.gridlib.tile.TileMap import java.awt.Color import java.util.* import javax.swing.JFrame /** * * @project gridlib * @author John on 5/5/2018 */ fun main(args : Array<String>) { val tilemap = TileMap(128) val r = Random() for (x in 0 until 128) { for (y in 0 until 128) { val color = Color(r.nextInt(256), r.nextInt(256), r.nextInt(256)) tilemap.placeTile(ColorTile(color, x, y), x, y) } } val tmp = TileMapPanel(tilemap, 8) val frame = JFrame() frame.add(tmp) frame.pack() frame.show() val frame2 = JFrame() val tilemap2 = TileMap(32) for (x in 0 until 32) { for (y in 0 until 32) { tilemap2.placeTile(SpriteTile("./res/grass.png",x,y),x,y) } } val tmp2 = TileMapPanel(tilemap2) frame2.add(tmp2) frame2.pack() frame2.show() }  
     

     
    The GitHub for this library can be found here: https://github.com/JLCarveth/gridlib
     
     
     
  2. Funny
    DtrollMC got a reaction from wasab in Quick Fun Library   
    glad to see the shitposts get all the replies...
  3. Like
    DtrollMC reacted to reniat in Uncover my highly secured text   
    no offense, but i'm not really into downloading random binaries from the internet even, if they start out as a txt.
     
    Also, as long as you didn't manually modify the file at any point, just changing filetypes won't change the file itself (at least on windows), so changing file types multiple times doesn't do anything more than the first format change does to obscure the contents 
  4. Agree
    DtrollMC got a reaction from Mira Yurizaki in Software Development   
    Not necessarily. Most new programmers do a lot of command line programming. 
     
    Either way,the term software development is the process of creating software, be either programs, frameworks, or what have you. A small portion of that is GUI based applications. 
  5. Like
    DtrollMC reacted to vorticalbox in Software Development   
    visual studio code > visual studio 
  6. Agree
    DtrollMC got a reaction from simson0606 in What is the best language for web development?   
    I can definitely agree. PHP was one of the first languages I learned, and I'm still scared of the include() and require() functions.
  7. Like
    DtrollMC reacted to wasab in How to keep your Python source code secure?   
    Open sourced code is love.  
  8. Informative
    DtrollMC reacted to TheAmazingDanny in A Probability Simulator.   
    I think I answered this in a previous comment; I was using System.Random before another comment mentioned to XORShift, and I went with that since it's much faster.
    You are correct - if time is a number, usually, it's the amount of milliseconds since January 1, 1970, 12:00:00 AM.
    Mouse position could be an interesting way to seed it!
    I swapped mine out for XORShift. See this page for more information on that implementation: http://heliosphan.org/fastrandom.html
     
    Yep! It's more meant to be "sort of" random, but it can't possibly be truly random. See https://www.random.org/ for more information on that.
  9. Like
    DtrollMC reacted to tikker in A Probability Simulator.   
    That's true, so it's useful to use as a seed in that way. The problem is that random number generators aren't completely random (hence why they're called pseudo-RNGs). Let's not derail this further though  
  10. Like
    DtrollMC reacted to wasab in JavaFx random number to word problems   
    Can’t understand what you want to do. What is souts? Writing coherent sentence is a vital forum posting skill. 
  11. Like
    DtrollMC reacted to rentaspoon in Half of the image cut off   
    Try 720p and see if it still happens, I believe it's something to do with the overscan options, failing that see if your TV supports point to point referencing, usually under aspect ratio
     
    Had the same issue on my tv
  12. Like
    DtrollMC reacted to programmer in What is the best language for web development?   
    Java for a back-end or using JSPs/JSFs is still valid but please don't try to use applets, they were always a terrible technology and user experience.
     
    Hacking together a Java back end is pretty easy and it's heavily supported within big companies. I know PHP is supposed to be popular but of the more than a dozen clients I've had, not a single one used it - is it popular as a hobbyists/creatives?
  13. Informative
    DtrollMC reacted to Corwin111 in Half of the image cut off   
    @DtrollMC
     
    I'd say it's the TV. The resolution itself it common enough, but 1080i i is a different scan type than 1080p. I wouldn't be surprised if the devs haven't even began optimizing for that, if they ever would... some PC games get released without ever being compatible with interlaced (i) scanning.
     
    I would suggest checking your TV's serrings to see if you can coerce it to display the game in 1080p instead of i. If I'm right, that should fix it. If the TV doesn't have that option, then a proper monitor would do the trick.
     
    Btw feel free to join us on the  UOLTT discord.
     
    https://discordapp.com/invite/0ZFgG6Y9m9xdFg17
     
     
  14. Like
    DtrollMC reacted to straight_stewie in A Probability Simulator.   
    What exactly is this benchmarking?
  15. Like
    DtrollMC got a reaction from Enocon in Snipping tool on the print screen button   
    I was thinking about this exact thing today. Now if only Microsoft would work to improve SnippingTool
  16. Informative
    DtrollMC got a reaction from elfensky in SC on a Surface Book 2 15"   
    Wow I'm amazed Windows tells you what GPU model you have. I literally cannot find any info on what GPU is in my OG surface book.
  17. Agree
    DtrollMC got a reaction from Damascus in Why is TES V Skyrim the best RPG / game in modern gaming?   
    Skyrim is a good game, don't get me wrong. I have 1000+ hours logged on many different platforms. But it has a ton of problems and I would never consider it the 'best game in modern gaming' by a fucking longshot.
  18. Like
    DtrollMC got a reaction from myselfolli in Looking for artist?   
    I'd suggest looking around locally to you, like Kijiji / etc, see if you like anything you see. Maybe hit up a graphic design school / class at the Uni and post a sign saying your hiring.
  19. Informative
    DtrollMC reacted to mathijs727 in Docker computer application   
    Docker is a software that allows programs to run in Docker containers.
    For all intents and purposes containers act as a virtual machine.
    They build on top of operating system features to provide isolation instead of parsing machine code like a virtual machine would do.
    This means that Docker containers are more efficient than virtual machines but they do not provide the same level of abstraction (you cannot run a windows ".exe" file in a linux docker container and vice versa).
     
     
    The main advantages (compared to no Docker) are:
    Security: the app is completely separated from the rest of the system. So even if the code is malicious (or hacked in some way) it cannot access files and services outside the container. Portability: it's like shipping a virtual machine image containing your software and all its dependencies. No more problems with users having a different OS, compiler or the wrong version of a dependency (no more "it works on my machine"). Ease of deployment: because of the previously mentioned system. Setting up a docker container is as easy as downloading the image and running it. No more problems with installing dependencies.  
     
  20. Informative
    DtrollMC got a reaction from LIQUIDFOX00200 in Docker computer application   
    All I've ever used Docker for was running Umple on a local machine vs using the website.
  21. Agree
    DtrollMC got a reaction from Merkey in Lacking places to learn from!   
    Textbooks are an amazing source.
  22. Agree
    DtrollMC got a reaction from wasab in how to learn?   
    And Android is awesome
  23. Like
    DtrollMC got a reaction from zacRupnow in 100TB+ Server build log (151TB to be precise)   
    So just doing it because you can? This is the true PCMR way!
  24. Like
    DtrollMC reacted to TheSLSAMG in How old do you have to be to be in the org   
    Oh people, please look at what section you're in before you ask questions. He's talking about UOLTT, the Star Citizen org.
  25. Like
    DtrollMC reacted to rentaspoon in Official UOLTTC Squad League   
    I give consent for Catcloud to use and abuse me since Wauthar isn't about atm
×