EDuke32 2.0 and Polymer! "talk about the wonders of EDuke32 and the new renderer"
#4196 Posted 13 January 2014 - 02:07 PM
What I want to do is modify the end of level code. When the end of level is triggered, .gm is set to MODE_EOL, and it changes the values for .volume_number, .level_number and .eog. And to create my own end of level code I must undo all of these, which works fine for single-player but not multiplayer.
Edit: Well, I do need to set .eog so startlevel will end the game. It would require that command to accept -1 as an entry for the next level w/hich would end the game.
This post has been edited by Fox: 14 January 2014 - 12:03 AM
#4197 Posted 14 January 2014 - 02:38 AM
#4198 Posted 14 January 2014 - 12:13 PM
Fox, on 13 January 2014 - 02:07 PM, said:
See, that's the problem right there! You're not supposed to know all these internals details as a scripting coder! Rather, the scripting system should simply provide a function like "now, initiate the end of the level", and the hard-coded level ending should be cancelable in some way, maybe using an event, maybe something else. It's all about clear interfaces, good documentation and not exposing internals the user doesn't need to know about.
Quote
Why to you even bother about multiplayer at this stage? It's not finished. The code you write now may cease to function as intended in the future. Similar issue here, really: it's not documented, so you can't really make any assumptions about it.
#4199 Posted 14 January 2014 - 12:17 PM
Plain Simple Garek, on 14 January 2014 - 02:38 AM, said:
do for i selsprites, ife .picum SOMEPIC, set .hitag XXX
Quote
The sprite member is called "ang". M32script descended from CON, so the it shares many aspects with it.
#4200 Posted 14 January 2014 - 04:00 PM
Helixhorned, on 14 January 2014 - 12:13 PM, said:
I know, it's not a priority. But I hoped the game would at least work with fake multiplayer.
#4201 Posted 15 January 2014 - 05:58 PM
Helixhorned, on 13 January 2014 - 01:42 PM, said:
VOLUME and LEVEL are merely read-only aliases to the respective userdefs members. The general pattern is that you want to set these to affect commands that behave conditionally on them. So the real solution is to make the commands (in Lunatic: functions, for example in 'gv' if there's no better place for them) accept these conditioning values as arguments. For example, the Lunatic interface could (and probably will) look like that:
gv.currentLevel() -- will be one-based, I think. It's just more natural that way because it's how everyone thinks of these gv.currentEpisode() gv.currentMapName([ep, lev]) -- this one returns the current map name if passed no args, or that of E<ep>L<lev>
I think having those be one-based is weird. What's the point of breaking from the established functionality and operation here? It seems like you're going out of your way to make a programming language seem less like a programming language and the result is merely another sticking point on the list of differences between Lunatic and CON. Why? I mean, we aren't shifting all the tile numbers up by one and calling tile 0 tile 1 because logically it's the "first" tile...
#4202 Posted 15 January 2014 - 06:53 PM
#4203 Posted 15 January 2014 - 07:12 PM
#4204 Posted 15 January 2014 - 09:24 PM
Also since I updated to r 4240 (for all I know it could have started earlier), and it's still happening with 4260, sometimes when selecting a tile from the tile screen that shows already-used tiles, it actually uses the next tile up. E.g if I chose tile 245, it'll place tile 246 in game.
#4205 Posted 16 January 2014 - 03:43 AM
TerminX, on 15 January 2014 - 05:58 PM, said:
There are some diffences between volume/level numbers and tile numbers. The former are usually (but not always) referred to using one as the base, as in "E1L1", while
I don't think such "cosmetic" tweaks make Lunatic more or less of a programming language. Look at it that way: if the tweak allows users to write shorter and/or clearer code, I consider it a good one. With E/L numbers, I guess that the two major use cases are 1) retrieving them for sticking them into another command (like the one getting the name of the current level, no difference in user code length) and 2) getting them for printing and comparison, like "local ep, lev = gv.currentEpisode(), gv.currentLevel(); if (ep==1 and lev==1) then ...". In the second example, I bet that most users unaware of ambiguities such as the definelevelname/music one would read this as "if the current level is E1L1", not "E2L2".
#4206 Posted 16 January 2014 - 03:46 AM
Plain Simple Garek, on 15 January 2014 - 09:24 PM, said:
Can't you extract only the relevant part? It's always good style to give developers minimal, or at least not too big test cases for reproducing a particular bug.
Edit: Also, is that in classic or in one of the GL renderers? Interestingly, better mask (i.e. sprite and masked wall) sorting is on Ken's list and that's also something I'd eventually be interested in tackling.
#4207 Posted 16 January 2014 - 03:54 AM
#4208 Posted 16 January 2014 - 05:04 AM
Helixhorned, on 16 January 2014 - 03:46 AM, said:
Oops, I shouldn't have been so fast to blame Ken. The example you PM'd me displays perfectly fine in Duke3D 1.5!
#4209 Posted 16 January 2014 - 05:16 AM
Edit: continued here
#4210 Posted 18 January 2014 - 03:43 AM
#4211 Posted 18 January 2014 - 04:10 AM
#define MAXQUOTES 16384 // The last couple of hundred are reserved for internal use! Let's say, 0..15999 is for users. #define MAXGAMEVARS 2048 #define MAXGAMEARRAYS (MAXGAMEVARS>>2) // i.e. 512
#4212 Posted 18 January 2014 - 04:22 AM
#4213 Posted 18 January 2014 - 04:29 AM
#4214 Posted 18 January 2014 - 04:35 AM
sizeof(spritetype) == 44
I don't know why this particular limit is in place.
#4215 Posted 18 January 2014 - 04:52 AM
Hendricks266, on 18 January 2014 - 04:35 AM, said:
sizeof(spritetype) == 44
I don't know why this particular limit is in place.
It's because C-CON uses sprite[] as temporary storage for the labels instead of allocating its own memory. Such "memory-saving tricks" probably mattered back then, but it's problematic as it makes the limit depend on how EDuke32 is built: I remember zykov eddy actually stumbling into it on Wii, with his Sonic 3D mod. If you let me do a bit advertising, LunaCON doesn't have an arbitrary limit on the number of defined labels.
#4216 Posted 18 January 2014 - 05:00 AM
#4217 Posted 18 January 2014 - 08:50 AM
Edit:

I can only make the loading bar work if the value is exposed in CON. =/
This post has been edited by Fox: 18 January 2014 - 08:51 AM
#4218 Posted 18 January 2014 - 09:11 AM
#4219 Posted 18 January 2014 - 09:55 AM
James, on 18 January 2014 - 05:00 AM, said:
A label is merely a means of giving names integer values at CON translation time. By the time the game runs, they're not "present" any more: the bytecode contains the numbers literally. In other words, they're purely a convenience feature for humans; every CON code can be rewritten to equivalent code without using define at all. Moves and actions are different: they're mappings of a name to a tuple of numbers, and there's no syntax for literal ones (except that 0 and 1 are legal and are occasionally used for initialization purposes).
#4220 Posted 18 January 2014 - 09:58 AM
James, on 18 January 2014 - 09:11 AM, said:
You have to name the ART file like the map base name, suffixed with '_00.art', '_01.art', etc. The first time a file in this sequence is not found, loading is aborted. That is, if you have MYMAP_00.art and MYMAP_02.art, only the first one gets loaded.
#4221 Posted 18 January 2014 - 10:19 AM
Helixhorned, on 18 January 2014 - 09:58 AM, said:
That's not how I expected it to work either. Most user maps with new art usually just come with a replacement for tiles014.art and tiles015.art, maybe some higher .art files too. Why does this system need every art tile to be
This post has been edited by Drek: 18 January 2014 - 10:20 AM
#4222 Posted 18 January 2014 - 10:33 AM
This post has been edited by James: 18 January 2014 - 10:33 AM
#4223 Posted 18 January 2014 - 11:32 AM
#4224 Posted 18 January 2014 - 11:41 AM
This post has been edited by James: 18 January 2014 - 11:41 AM

Help
Duke4.net
DNF #1
Duke 3D #1


