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 simulator anyone? - CX gamer - 12-29-2013

(12-28-2013, 10:14 PM)Chibill Wrote: Also there is beta MCP out for 1.7.2

Ooooh! That's great news! Thanks for letting me know!

EDIT: From the first looks of it, they renamed client.srg to joined.srg, while fields.csv and methods.csv remained the same. The internal syntax hasn't changed so no compatibility issues will arise (but they may merge fields and methods into joined in the future since there used to be a classes.csv as well). Anyway, I'm off to check if my implementation plan is still viable for this build.

EDIT2: Wow! :o

EDIT3: So by the looks of it, the implementation I had in mind changed a bit. The instancing of new blocks works entirely differently, but if I'm not 100% sure if the behind the scenes part are instanced correctly or not, yet. Anyway, I'm going to experiment bits of simulating here and there, but I won't completely finish it until it's out of beta, since I don't want to be referencing to func_149634_a and then forget what it was when its name is updated by MCP. But mostly I'll be preparing and taking notes now. But first I'll make it save to schematics (and possibly add extra tags to be used by the sim only, just like MCedit has/had some extra tags).

EDIT4: Slight update. Haven't really started simulation yet because I was too excited for other things. Instead, with publish you can now also upload your images to imgur. Also we can now save to schematic! Yaaay! Big Grin
On a more serious note though, I was thinking of publishing imgur albums as a reddit thread on a dedicated subreddit. Could be awesome or just too gimmicky, can't really tell.


RE: Redstone simulator anyone? - CX gamer - 02-21-2014

Alright we're back. The last week of school is done and we're cruising onwards toward the exams, which is a very relaxed period. This means that I can finally can get fun stuff one, like the simulator.

About the sim itself, I'm stepping away from doing the GUI in Java, since I eventually want to do fancy things to generate circuits, and there's no way I'll use Java for that.

My current plan is to make only the simulator part in Java, and the GUI in C++ using Qt. They'll communicate using RPC, namely Messagepack. Had a little trouble on the C++ side with that (because I don't have much experience with C++, but I've got a wizard buddy that will always pull me through).

Sorry for leaving you guys without an update for so long, but there was a little bit of progress on the simulator side (I can tickUpdates(), but it does nothing since there there are no planned updates, nor is there a chunkProvider yet). And now that I have time, you might see me in-game again maybe.

EDIT: Swapped 2 alineas.

EDIT2: This isn't a very informative edit, but a lot of progress has been done since last edit. Problems are getting solved quickly and I keep getting surprised to see my "success" console message with no errors. Right now, I can get any Block object, fill up a chunk with them and I implemented IChunkProvider, which is all working. Exciting! Big Grin


RE: Redstone simulator anyone? - Iceglade - 02-21-2014

Awesome! Good luck to you :3


RE: Redstone simulator anyone? - CX gamer - 02-23-2014

Today I've written the function to load in a world from a byte array. I was very content to write this function, since I've been building up to this point for a while.

[Image: Zk7Tr0W.png]

This function was written in one go, so I was a bit nervous to test it, but after fixing a small typo, it worked without errors. This came as a pleasant surprise to me, so I sighed relief pretty deeply. rChunkProvider is an implementation of IChunkProvider, so it will still have to be seen if tickUpdates agrees with it. But yeah, apologies if this isn't a very informative post, but I wanted to share my enthusiasm while at the same time giving you guys an update. I feel like it also helps to keep myself active on the project.

There's still quite a bit of work, but I'm finding my drive. The next steps are to do the other way around (pulling blocks and data from chunks) and the non-trivial tickUpdates (which works now, but I still need to add NextTickListEntries).


RE: Redstone simulator anyone? - Chibill - 02-24-2014

Then is the problem of updating to 1.7's Crazy not id system. other then like an id table in the world some how.


RE: Redstone simulator anyone? - CX gamer - 02-24-2014

There's a static method in Block called func_149729_e which takes an integer and returns a Block object. The prerequisite is that func_149671_p is called once during loading to load up registryNamespaced with all the Block objects, block ids and block names. So no, I don't think it's a problem at all. I'm also buffering the Block objects by their id in a HashMap after the first time they're called, to avoid reflection as much as possible.

In other news, my crazy genius friend believes it is possible to make the sim on Android. Possible or not, we're going for it. This is also brilliant timing, since I haven't started on the Qt GUI yet anyway.

EDIT: Damn I'm excited. Big Grin


RE: Redstone simulator anyone? - Iceglade - 02-24-2014

Oh my god. func_149729_e and that whole naming scheme makes me want to murder innocent little bunnies.

But sounds awesome dude!


RE: Redstone simulator anyone? - Nuuppanaani - 02-24-2014

Android <3 <3 <3


RE: Redstone simulator anyone? - Chibill - 02-25-2014

(02-24-2014, 11:21 AM)CX gamer Wrote: There's a static method in Block called func_149729_e which takes an integer and returns a Block object. The prerequisite is that func_149671_p is called once during loading to load up registryNamespaced with all the Block objects, block ids and block names. So no, I don't think it's a problem at all. I'm also buffering the Block objects by their id in a HashMap after the first time they're called, to avoid reflection as much as possible.

In other news, my crazy genius friend believes it is possible to make the sim on Android. Possible or not, we're going for it. This is also brilliant timing, since I haven't started on the Qt GUI yet anyway.

EDIT: Damn I'm excited. Big Grin

You do know MCP updated more mapping and now those have names.


RE: Redstone simulator anyone? - CX gamer - 02-25-2014

(02-25-2014, 12:15 AM)Chibill Wrote: You do know MCP updated more mapping and now those have names.

Awesome man, thanks for letting me know once more. <3

EDIT: Now they're called appropriately called registerBlocks and getBlockById. Big Grin