Forums - Open Redstone Engineers
MCsim (pre-alpha release) - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: Off-Topic (https://forum.openredstone.org/forum-4.html)
+--- Forum: Programming (https://forum.openredstone.org/forum-8.html)
+--- Thread: MCsim (pre-alpha release) (/thread-1606.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20


RE: Redstone lab (Open source) - Chibill - 07-27-2014

Also you should add to the readme about needing to download objenesis-2.1.jar.


RE: Redstone lab (Open source) - CX gamer - 07-27-2014

(07-27-2014, 12:36 AM)Chibill Wrote: Cx I can get it so it does not need you to copy the stuff from .minecraft by using the way MC gets the .json file for library and then downloading them. And using a simple check you can stop it from redownloading every time.

I may be misunderstanding, but is that really better than just getting it from the already downloaded files? Now, if it finds the default windows path first, and then checks if it's in its own directory. The plan was to just to add the paths for linux and mac as well, and then ask the user where it is if it doesn't find it.
If the MC launcher downloads a version of minecraft, it will get the libraries as well. So I don't really see the advantage of downloading them separately?

(07-27-2014, 03:57 AM)Chibill Wrote: Also you should add to the readme about needing to download objenesis-2.1.jar.

Oh sorry about that, I was ignoring .jar without thinking much about it. It's now included.


RE: Redstone lab (Open source) - Chibill - 07-27-2014

Thanks and also if you want to use it with Eclipse you need to make your own project right now because the .gitignore ignores the .project file. So you can't just sellect you github folder as a workspace.


RE: Redstone lab (Open source) - CX gamer - 07-27-2014

In retrospect, that does not seem very smart indeed, I thought it was best-practice or something. I think at some point I was going to develop in IntelliJ IDEA, but since MCP generates eclipse, I'll keep using 1 IDE for sake of simplicity.

Oh I also made a new vid, basically doing the same but all buttons do what they need to do now.

https://www.youtube.com/watch?v=uU7N_U7h72E


RE: Redstone lab (Open source) - CX gamer - 08-02-2014

I think I just figured something out. There's still the problem that updating tileEntities causes it to create new ones, rather than finding the existing ones that were loaded in. My idea is that because I'm loading new instances in, a generic list's .contains method won't find the old ones. So the solution should be to instead of using a schematic for it, just keeping the objects, and use the schematic's Entities, TileEntities and TickTicks for saving and loading.

At this time, my studying is intensifying, so work on the sim will be limited until 2/3rd august.


RE: Redstone lab (Open source) - jxu - 08-06-2014

I don't want to discourage you, but I feel like all this time spent essentially recreating minecraft could've been spent creating something entirely new.


RE: Redstone lab (Open source) - Chibill - 08-06-2014

He is using minecraft .


RE: Redstone lab (Open source) - CX gamer - 08-08-2014

(08-06-2014, 12:43 AM)͝ ͟ ͜ Wrote: recreating minecraft

Yeah, as Chibill said, I am using MC to perform the mechanics. What I'm doing is take a schematic, convert its data into what's readable for minecraft, then use minecraft.jar to load it as a world, tick it, get data back and display what has happened.

When I'm working on improving the simulation, it means just importing and exporting more things. Like right now, I can use the game to simulate basically any block behavior that does not use entities or tileEntities. When those are finished as well, it'll simulate most of the game's mechanics.

After that, improvements will be made in smaller steps, like configuration options for time of day, biomes, world loading, world type, ... However in doing so, it will use MC once again. So if the code for loading a world is changed, the simulator will update with it. In the best case scenario, no new release is needed even. But I will probably need to fix a couple things here and there every new version, as with any mod (but this is not a mod, to avoid confusion).

As for progress, I'm not discouraged at all. But the next couple of weeks decide if I waste a year of my life and lose a lot of money, or if I graduate. It's very important that I don't fuck up. That's why there hasn't been any progress lately.


RE: Redstone lab (Open source) - CX gamer - 08-14-2014

Alright I'm finding some time in the evenings that I'm not studying. So now the simulator has a new state saving mechanism. Rather than converting everything to a schematic to unpack it again, it's saving the exact instances of the objects created by MC. The result is that now the racing condition of page 9 is fixed. The downside is that the tileTick-, entity- and tileEntity-objects are manipulable by themselves, so it serves no other purpose than going back in time correctly. Schematics will now only be used while saving and loading (though I broke that functionality in the latest commit).

EDIT: Had some fun and tried another theme with a custom background:

[Image: bYb7UPK.png]

The image was made by iWithered. I like the image, but I'm not too sure to keep the look and feel. But the alternative would be system default.

EDIT2: Also just found out that MC will handle placing torches on walls, that saves some work. Big Grin

EDIT3: The look and feel is called Nimbus and is causing way too much lag, so now it's back to system default again. Sad

EDIT4: EDIT2 only applies to torches for some reason.

EDIT5: I made a video showing the start of the toolbar:

https://www.youtube.com/v/m7sizpfWR0

Activate is basically "right click" (linked with the XML of page 7), but doesn't properly update as it should, as a button won't pop back up. So I'll search for either a cleaner method of "right clicking" or some workaround. Lots of bugs in the XML also (can't right click activated repeaters for example), and there's no way of knowing if a rotation is correct, making torches pop off, for example. For the latter, I'll just try all options until I find one that doesn't make it pop off.


RE: Redstone lab (Open source) - CX gamer - 08-18-2014

I investigated the right click problem of last post more thoroughly, and I think it will be advantageous to use Block's OnBlockActivated, rather than manually modifying blocks. To my demise, I noticed that that method required a player entity to be passed on, for things such as opening an inventory window, starting a sound at the player's location, buffs, ... I haven't created a player yet, and it's definitely not trivial to do so. But luckily, most interesting blocks can be right clicked whilst nulling the player:
  • Button
  • Noteblock
  • PistonMoving
  • RedstoneComparator
  • RedstoneRepeater
  • RedstoneOre
  • DragonEgg
  • Lever
  • PistonBase
  • Stairs

So if I update to use the method, right clicking these will work (but some probably won't do anything useful). However, for the rest I'll have to create a dummy player that will ignore things like opening a gui and such, not even sure if that's possible (I've done it with interfaces, not with classes yet). There may be a way to generalize editing the inventory blocks. Either way, it's back to puzzling for that part.